-
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emulator crashing? #67
Comments
I haven't read through all the logs and your test code, but let's try to narrow down the issue a little:
|
Hello ychescale9, on API 29 the tests always crash. My application do requests camera permission but I don't use camera in the tests yet. I tested with API 23 and now the emulator didn't crash so each of the tests failed separately :) I will have to play with the emulator options and will come back to you. |
@lz1asl @ychescale9 I am facing a similar issue although it seems to be unrelated to this action. In my case, the tests execute fine on my local Linux machine but the Instrumentation process crashes in Github Runner (MacOS) for some reason. I also ran a few tests from android/testing-samples and these run fine with this action. Unfortunately I am not able to reproduce the problem locally since I don't own a Mac. My best guess is that problem is originating from upstream, potentially due to a recent emulator update or something. |
@ashutoshgngwr you could try to pin the emulator binary version to a specific version by specifying the Have you tried running on lower API-levels? Usually if it works on certain API levels it's easier to debug the issue. If it works on |
@ychescale9 I am using Mockk which forces me to run my tests on Android 29 or higher. Besides, I did run the tests on Let me see if I can get it working by pinning the emulator version to last successful build. PS, I just realised that I confused Android Pie with 29. Mockk can work on Pie. Let me also check if that works. |
And its gone. The error is gone. I did nothing except adding 28 to my build matrix and the error is gone. I have been at this for 3-4 hours now. 😐 |
Update: From my experience, I think instrumentation process is crashing with Google API emulator images. Prior to this I was running tests on the default images with x86 arch and everything was working smoothly. Due to recent changes in my project, I had to use Google API images with x86_64 arch and since then, I am occasionally seeing this issue along with Out of Memory errors. |
Yeah I have similar experience with google API and Play store images 😞 . What's the lowest API level you can test with? I think lower API levels are more stable in general. |
@ychescale9 I am testing with 28 and 29. Seems to work fine but sometimes instrumentation process crashes. And this time I can reproduce these random crashes on my local Linux machine. |
Might be worth filing a bug on the issue tracker. |
I am not so sure about that. Their standard solution for the issue is to use Android Test Orchestrator. Test orchestrator is capable of running each test in its own instrumentation process so if one of the test crashes, rest of the suit can still run but it makes everything very very slow. It also has a 'clearPackageData' option that removes the app's state from RAM and CPU before each test. This can be used to mitigate OOM kills in tests but it is not capable of generating coverage reports since that data is also cleared. |
I don’t think the orchestrator is a solution to the crash caused by the system image. It just makes it easier to identify which test is causing a crash. In this case if the crash you’re getting is completely random and there’s nothing you can do in your code to fix it, you probably want to file a bug. |
A bug is already filed. It's not on the Google's issue tracker though. Edit: Apparently there's another report in the samples repo. Still no solutions though. I think it's safe to close this issue here. When it was filed, the instrumentation process was crashing with consistency so that might have been a bug in the emulator that got resolved. |
Firing the issue on the issuetracker will have a much better chance getting to the Emulator team who have been very responsive and helpful in my personal experience (sometimes they will even send you an unreleased emulator binary for you to try). If it's a bug in the emulator binary or system images, those GitHub repos are completely irrelevant and the best they can do is firing the issue for you. Closing now as no action can be taken on our side. |
Filed an issue after an in-depth analysis of the problem. |
In my case the emulator(api-29) was crashing while executing line containing Removing such code temporarily resolved the crashing issue. I think there is some issue while clearing the adapter (or the list used in adapter). Its not because of any exception. This works well in api 28 and below emulator but only crashing with api 29 emulator |
Hi All getting the same issue |
Hello there!
First of all, congratulations on the work done on this great project.
I am facing the following problem:
- name: Connected tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 script: ./gradlew connectedAndroidTest
Task :connectedDefaultFlavorDebugAndroidTest Starting 12 tests on test(AVD) - 10 com.astoev.cave.survey.test.service.data.ExcelExportTest > excelExportTest[test(AVD) - 10] FAILED Test failed to run to completion. Reason: 'Test run failed to complete. Expected 12 tests, received 6'. Check device logcat for details Tests on test(AVD) - 10 failed: Test run failed to complete. Expected 12 tests, received 6. onError: commandError=false message=INSTRUMENTATION_ABORTED: System has crashed. > Task :connectedDefaultFlavorDebugAndroidTest FAILED
--------- beginning of crash 06-08 20:23:57.017 1590 1590 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 1590 (surfaceflinger), pid 1590 (surfaceflinger)
but am still not sure what is causing it.
Do you think you can have a look? Same tests work fine locally.
The text was updated successfully, but these errors were encountered: