-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Getting spammed with [CAMetalLayer nextDrawable] returning nil because device is nil on latest macOS Agent #6365
Comments
@mrk-han thanks, we will take a look |
Hi @mrk-han can you provide exact repro steps? |
CC: @dsame |
It's possible that the new screenshot APIs that come with android 3.5.0 espresso alpha could be causing this? But not sure. May be a red herring. Check below for the screenshot sample with that setup and GitHub action stuff. I'd need to fork that and add the GitHub action .yml that I pasted below, but not sure I have time for that today.
You can find code to use here: https://github.com/android/testing-samples/tree/main/ui/espresso/ScreenshotSample but I think we need to hook this sample up to a basic Github Action using the following:
|
@igorboskovic3 @mikhailkoliada I think the screenshot API is a red herring. I noticed in my log it starts appearing after we revoke the microphone permission
|
Nevermind, it seems the |
Yes, HAXM isnt installed on our MacOS images, you can check same thread for installation, thank you |
I'll implement shortly and let you know. Thank you! |
@mrk-han did installing HAXM fix the issue for you? |
I attempted to install HAXM like this:
It gave the following output:
and to verify, after the tests I ran:
but received:
And then the bug still existed:
|
Note: This is also showing in the logs from @igorboskovic3 's run here: https://github.com/igorboskovic3/actions-test/actions/runs/3023933068/jobs/4864768035 |
Based on the comments on my issue, does not seem like something fixable #6369 |
@mrk-han this is my testing repo, i wouldnt use that as a reference, as I answered on other thread here, you have there successful and unsuccessful actions so you should use for example successful one https://github.com/igorboskovic3/actions-test/actions/runs/3239143575. Please use this snippet or android-27 or below for successful action |
@igorboskovic3 Thank you so much. I got HAXM working and I am still seeing this output spammed |
@mrk-han Code is working and you have output spammed or doesnt work at all? |
@igorboskovic3 Well, the stability of the emulator itself is causing UI tests to be very unstable. That is the heart of the issue. When debugging things, this spam is incredible excessive (happening anywhere from 3-7 times a second), it makes it hard to read. My concern is the amount of times this error is happening is either indicative of, or itself causing performance issues. Or means something is misconfigured. Here is a picture of the state of the machine when these logs are getting spammed: And this is happening on every API level / Architecture I run tests with |
I am really not sure if this is a problem because of the Google Emulator team, or the MacOS Runner configuration. |
Looking at the screenshot, looks very much like a GitHub runner configuration issue. Especially the system dialogue complaining about nested virtualization and plus the GPU driver information system image as well |
@ssrinivasKG Exactly, these macOS agents are VMs, and the Android Emulator is a VM -- so it is using Nested Virtualization. But without proper Hardware Support, the Emulators are super flakey -- which is why we are trying to enable HAXM to help. @igorboskovic3 Across many teams, plus others I have spoken to, none of us are able to get reliable test suites (with Android Emulators) working on Github's MacOS Runners. |
Hello, we have the exact same issue, this is our branch : pass-culture/pass-culture-app-native#3840 We are trying to run appium to perform e2e tests, did you find a workaround ? I have tried all github action for avd and none works. |
Yes, we are also tried various approaches, but we dont have of support of HAXM for VMs from one side (as you can see here) and also we get various results randomly for same code which suggest it could be performance issue. |
I was getting spammed with this message as well as getting a grey/black screen in my Android emulator, and I could fix it by changing the rendering mode.
and after removing the
This may not be the case of everyone, but I wanted to post it as it can be helpful 🙂 |
@voghDev The problem is we have to use swiftshader_indirect on Github's macOS runners. This is good info though, thank you. |
It turns out, we don't need HAXM anymore -- because of the default hypervisor provided by Apple. However, this is only VM acceleration and not Graphics acceleration. If you use the newer Android tooling, then |
@mrk-han Have you got a working emulator now? We're running out of options for our E2E tests |
The issue caused by the low performance of the runner hosts it is reproduced locally it and does not depends on the software configuration. It is expected to be solved with the hardware upgrade. |
so this is about performance in the runners ? im using macos11, if use macos13 will it go away or how does it solveS? |
Description
We are getting spammed by this one message in our emulator android test runs on the latest macOS agent.
You can see the same logs appear in this ticket too: #6252
I'm not sure anything is wrong because of it, but it is quite distracting to troubleshoot emulator issues with the spam.
[CAMetalLayer nextDrawable] returning nil because device is nil
.Platforms affected
Runner images affected
Image version and build link
1.0.0.0-main-20220916-1
Is it regression?
Not sure
Expected behavior
I'm not quite sure why, but recently in our logs with the above emulator setup, we're getting spammed by this message
[CAMetalLayer nextDrawable] returning nil because device is nil on latest macOS Agent
, hundreds of times in a runActual behavior
Not getting this spam message
Repro steps
Start up an emulator on the latest (1.0.0.0-main-20220916-1) macOS agent with the above emulator architecture.
The text was updated successfully, but these errors were encountered: