Android emulator on macos blank screenshots and videos
See original GitHub issueDescribe the bug
We use GitHub action for end to end testing for iOS and Android app, in case of failure, we take screenshots and video of the tests.
It works fine locally for both iOS and Android, in GitHub action, it works with iOS simulator, but on Android, the screenshots and video are transparent and black
- Issue was reported to appium https://github.com/appium/appium/issues/17837 , but they advised us to ask here.
- Duplicate also here https://github.com/wix/Detox/issues/3578
To Reproduce
See below for workflow, this is an example of workflow that have the problem : https://github.com/pass-culture/pass-culture-app-native/actions/runs/3574751323
Expected behavior We expect to have proper screenshots and video of our app
Runner Version and Platform
macos-12
What’s not working?
This is how it look like for the screenshots
This is the video shot in CI:
<video src="https://user-images.githubusercontent.com/77674046/204561099-597271b2-9bcd-4b68-ba41-e7273432b2b6.mp4"></video> This is the video log: wdio-0-0-Video-reporter.log
Job Log Output
- github action workflow: https://github.com/pass-culture/pass-culture-app-native/blob/8ee2e682c8b0d299e8aa64586efc627a9b6b65ab/.github/workflows/e2e-android-app.yml
- code to do screenshot: https://github.com/pass-culture/pass-culture-app-native/blob/8ee2e682c8b0d299e8aa64586efc627a9b6b65ab/e2e/config/wdio.shared.conf.ts#L159-L174
Runner and Worker’s Diagnostic Logs
Appium log : https://github.com/pass-culture/pass-culture-app-native/actions/runs/3573959420/jobs/6008640936
Issue Analytics
- State:
- Created 10 months ago
- Comments:12 (3 by maintainers)
Top GitHub Comments
Hey @kopax-polyconseil,
The issue is being closed since it is not related to the runner. As pointed out, this affects the machine running your runner, so Virtual Environments Repository repository is the place to go. The runner basically runs what you tell it to run. If the machine does not support that action, it won’t be executed. The same issue would be with a docker action if you don’t have a docker installed on your machine.
This issue is the same. If the runner running on your machine does not have a support to execute a command, the command will fail (either with exit code or not executing what you have expected). That is why I suggested that you post the issue to the VirtualEnvironments. The repository is maintaining images running hosted runners. So they can provide better explanation or help you fix your issue
Try setting the avd to use “-gpu host”, this solved my issue.
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-snapshot -no-audio -gpu host -no-boot-anim -qemu -m 2048 > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'