-
Notifications
You must be signed in to change notification settings - Fork 143
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
Problem with android emulator - stuck at 'Starting emulator' #19
Comments
Screenshots has code in place for running in multiple locales. However, because of flutter/flutter#27785, flutter driver is behaving incorrectly. This makes the code for multiple locales ineffective. While what you describe may be an issue with running in multiple locales, for now (and until flutter/flutter#27785 is resolved), in order for you to continue, I would recommend specify one locale (probably the default locale) in screenshots.yaml. As an interesting experiment and possible workaround for flutter/flutter#27785, it might be worth adding a job to .travis.yml to set the locale on the macOS and running with a matching screenshots.yaml |
To anyone else reading this, who wants to generate screenshots in multiple locales, please give a thumbs-up to the first comment in flutter/flutter#27785 (comment). The Flutter Team uses the number of thumbs-up in the first comment to help prioritize the issue and get it fixed faster. thnx! |
@mmcc007 Did you related the wrong issue maybe? I opened two issues: One for the localization problem and one with a hanging screenshots command while waiting for android emu. |
Maybe 🤣... I had not noticed your other issue at time of writing. The hanging-on-emulator issue (this one), may well be an issue with running in multiple locales. But, because of mentioned Flutter issue, multiple locales are not working anyway. Hence, I re-labeled this issue. Will try to sort out any potential for confusion. thnx for your feedback |
BTW: if so inclined, you can try forking and running the example on Travis with your screenshots.yaml. If it reproduces the hanging-on-emulator problem from this issue, that would be helpful (especially after the flutter issue is resolved) |
@mmcc007 what OS you are using? I experience this issue on my two developer machines with MacOS. So maybe this is a mac issue.
|
The reference environment I use for Screenshots builds is on Travis using the example (internationalized) app. Even though the example app supports en-US and fr-CA the screenshots.yaml has been set to the default locale of the device (en-US) because of the above mentioned flutter bug. Using multiple locales in screenshots.yaml will cause the test to hang and timeout (probably the same thing you are experiencing). This problem can be reproduced on a device completely independently from Screenshots. So probably shouldn't really be considered a Screenshots bug. (I probably should remove the bug label on this issue for clarification). The flutter issue is that Flutter Driver does not work with internationalized apps (in particular, when an integration test is run in a locale different from the devices default locale, ie, the locale of a device has been changed prior to running the test). To demonstrate this, and as referenced in the flutter issue, I setup a demo test using an iOS simulator (is also reproducible on an android emulator). You can see the test running on travis here: Since the problem can be reproduced independently of Screenshots, searching for workarounds should probably be done independently of Screenshots. If a workaround is found, it will probably be possible to use the workaround in Screenshots. (btw: in this context device is interchangeable with iOS simulator and android emulator) The flutter issue can be tricky to explain so apologies if I am not explaining it clearly. Based on my testing, I suspect there is not a workaround for this on emulated devices. It might be worth trying on real devices. You might have better luck than me. If no workaround is available, it might be possible to dig into the flutter driver code, or the flutter engine code, to find the problem and maybe develop a fix. |
I'm seeing this issue as well with Android emulators (iOS simulators work fine), and am using only en-US: screenshots.yaml:
Issue exists for both Nexus 5X and 6P.
|
@noumaans Can you send me the output your are getting when running screenshots. ... and your 'flutter doctor -v' BTW: does your app use internationalization? thnx. |
@ykorzikowski Could you take a look at #29 ... it may be related to this issue. It's possible I may have misunderstood and that this issue may be unrelated to internationalization. So if you could try the fix mentioned in #29 and let me know, that would be great. Thnx a bunch! |
Added a fix for localization. Try it out with:
Give it a shot and let me know how it goes. A confirmation of fix would help get fix into a release. |
Hi @mmcc007 and sorry for opening this issue again, but I'm still experiencing an error related to this issue. What's happening is, while I'm trying to automate my Android screenshots, the App is stuck on the splash screen and the test just times out after some time. I'm having two languages to localize and I realized everything is working fine for the first language, but after the first run is done and Only removing the app from the emulator and quitting the emulator fixes this behaviour and makes These are my logs:
My
|
I suspect this may have something to do with flutter/flutter#27785 (comment) To get to a basis for comparison, try running the example app which implements internationalization and uses the recommended way to run integration tests for internationalized apps.
If this succeeds, then try using the example app as a model for implementing integration tests for internationalization. If it fails send me the output. |
Hey @mmcc007 , thank you very much for your quick response. Indeed, the example ran smoothly and the problem existed in my local test setup. For anybody who might end up here struggling and using the For me it did the trick to add change my
and simply calling that in the
Thanks again for your help, from my view this issue can be closed with the reference you provided to the example. |
Glad you got it working. I suspect this might be a common problem for new internationalized apps. Should probably mention it in README. |
This is based on a single locale configuration. Do you have any further idea? |
The issue was sorted in my case by adjusting the configuration to use the device name instead of ID:
|
Former-commit-id: f39d2191b2b90d0509c6d50e94e83a41fe569810
Error: Screenshot command stays at starting emulator. Emulator is starting on a new window. It does not recognize that the emulator started.
Android sdk:
Flutter-Doc:
Screenshot command:
The text was updated successfully, but these errors were encountered: