-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Runner action hangs after killing emulator with stop: not implemented #385
Comments
Seems like there should be a step at the end that Either that or disable |
So far I've managed to find out that I've done some digging in the emulator source repo. It seems the emulator uses crashpad to report crashes back to Google, so we're not going to be able to prevent the Killing them after the emulator has shutdown seems like a reasonable workaround, but we should do that with I'm fairly certain that this will need to be done as part of the action though. I suspect, but haven't confirmed, that the root cause of this is that when the emulator is told to shutdown, some node.js code sends a signal to the emulator, but then waits for the whole process tree to end, not just the emulator process. However, if the emulator doesn't pass on signals to it's child processes, they won't receive any signal telling them to quit, so the waiting will go on forever. If I'm correct (will try to find out this week), trying to kill the extra processes outside of the action won't work, since that code will be waiting for the action to finish to have a chance to run. It's a classic deadlock effectively. |
To work around a timeout caused by ReactiveCircus/android-emulator-runner/issues/385
Are there any updates here? My log output is exactly same as in the original issue, it completes all processes then just hangs forever. Trying to kill the crashpad process with |
I have a similar issue here: https://github.com/callstack/react-native-pager-view/actions/runs/9576519647/job/26403174451?pr=829 . Does anyone know how to fix it? |
I have the same issue. Emulator just hangs forever |
For anyone facing this issue, I've discovered that setting the environment variable In my case, the issue seemed to be affected by the emulator saved snapshot, so not saving the AVD snapshot should help as well. If none of the previous solutions work, as @grodin mentioned regarding the
This should definitely stop the hang issue. |
@mustalk are you sure that step will work? My understanding is that the previous step will hang and stop execution of that step that will kill |
@ericswpark that's what i thought at first too, but to my surprise it did execute, even without the |
I was having this issue while running manually android emulator (I'm not using # Being XXXXXX pid for android sdk qemu-system process
kill STOP XXXXXXX That will handle snapshot generation and crashpad_handler as expected and emulator will end successfully |
@mustalk your suggestion didn't work for me https://github.com/ashishb/adb-enhanced/actions/runs/10024919828/job/27707518728?pr=246, it is stuck at the emulator execution step for me Strangely, it only impacts API 26 and 29 though for me. |
Fixes that worked for me was to use |
We are already using runs-on: macos-13 , but still shwoing above error. |
I am facing the same issue. The step does not terminate the emulator, and it stays stuck in the step. I tried @mustalk suggestion, but the workflow is not able to reach the step where it kills the - name: Set up the Android emulator and run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 33
target: google_apis_playstore
arch: x86_64
emulator-boot-timeout: 600
disable-animations: true
script: ./scripts/run-tests.sh Added process termination commands within the custom script ./scripts/run-tests.sh, but still no success. This script runs the Appium testing that I have integrated. In addition, I have :
Context and Background Emulator macOS vs. Ubuntu Hardware Acceleration - name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm Questions: Any suggestions or guidance on resolving this issue would be greatly appreciated. Specifically, I need help ensuring the emulator terminates properly, and the workflow can proceed without getting stuck. I read earlier that this could be fixed by using the |
I've faced the same issue and was able to resolve it by making sure the you can check |
Thanks a million @vaind. That was indeed my issue. Seems that the |
I ran into a similar issue and seemingly fixed it by removing the step for AVD caching and setting |
Same issue here, from React Native. I tried all the solution proposed here:
I'm now trying to give more power to the machine and to the emulator to see if it helps. Weirdly, on main it is still working fine.
@ychescale9 I'm sorry to ping you directly, but do you mind having a look at this or rerouting it to the right person? |
Does it fail with all API levels? And did it just start failing recently? Chances are a newer version of emulator binary or system image might have introduced new issues. If that's the case pinging the |
Thanks! I think I find the issue: I have a local server to which the emulator connects by using websockets. If I teardown the server, the emulator shuts down properly. I think that the action is not able to shut down the emulator if there is something that it is connected to. |
For me it only happens when avd cache is enabled and the cache itself exists before the run. After removing cache file the whole pipeline goes well for the first time. On the second push it always fails. It's true for API <= 29. It never fails for API 34 and I haven't tested it yet between 29 and 34. Can anybody confirm that having a cache can somehow cause the issue? |
@Braggiouy How did you manage to kill the appium instance ? I also have Appium tests integrated. I use:
just right after the gradle command line to execute Appium tests. But the workflow never reaches that line, it sticks in the gradle command line causing the job hangs indefinitely. |
In my solution, I use an external script that runs alongside This script is responsible for starting As an example, this is how I managed to follow the previous steps : # Start Appium Server
appium &
APPIUM_PID=$!
sleep 10
# Run Android Tests
yarn test:android
# Shut down Appium Server
kill $APPIUM_PID
Explanation: This avoids the issue with the method you mentioned, where the Hope this helps! |
Just for completeness sake, I've worked around this by adding the following line to the end of the script run by the action:
The It seems to fix things for me, so far. |
When running my GitHub Actions workflow, the emulator runner action hangs after the emulator is killed, with the following log output:
The text was updated successfully, but these errors were encountered: