-
Notifications
You must be signed in to change notification settings - Fork 324
QEMU launch may fail silently #4839
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
Comments
Is it possible you can enable the Flutter Daemon log (https://dartcode.org/docs/logging/#flutter-daemon) and see what it captures when you hit this? Thanks! |
I see the following, if I'm running VirtualBox:
I assume the error message would be slightly different if virtualization is disabled, but the error |
Ah, I see. It seems like the errors aren't in the response to the |
@DanTup thanks for the quick fix! |
np! If you didn't already see it, I pushed a pre-release version earlier that would've included this, so you should be able to test if you're on that (and let me know if you see anything not working right). |
@DanTup Yes, this worked! Thanks: [ERR] The Android emulator exited with code 1 during startup
[ERR] Android emulator stderr:
[ERR] ERROR | Running multiple emulators with the same AVD
[ERR] ERROR | is an experimental feature.
[ERR] ERROR | Please use -read-only flag to enable this feature.
[ERR] Address these issues and try again. It's probably a good idea to add "[ERR]" and "The Android emulator exited with code" to the list of things you catch. I would prefer this output to be in the debug console, not the output pane, if that's possible, but that's no big deal. |
The "[ERR]" text is added in the extension here so it won't be in the strings we check. I didn't include "The Android emulator exited with code" because I was nervous that it's generic enough that it might just show up when you close the emulator and there was existing code to show the output pane that had been disabled for being too aggressive, so I wanted to be careful. If any cases come up where the existing text isn't matching though, I'm happy to revisit (or to try and push this up into |
Sounds good. Thanks! |
For the record, here is the error when virtualization is disabled. Your patch did catch this... but maybe add "emulation currently requires hardware acceleration"? Or not, it's not currently needed :-) Starting device daemon...
[ERR] The Android emulator exited with code 1 during startup
[ERR] Android emulator stderr:
[ERR] ERROR | x86_64 emulation currently requires hardware acceleration!
[ERR] CPU acceleration status: /dev/kvm is not found: VT disabled in BIOS or KVM kernel module not loaded
[ERR] More info on configuring VM acceleration on Linux:
[ERR] https://developer.android.com/studio/run/emulator-acceleration#vm-linux
[ERR] General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
[ERR] Address these issues and try again. |
I suspect it's not needed (I suspect "Address these issues and try again" will catch all of the issues we care about), but I did add "requires hardware acceleration" to the list just to be safe since it's pretty specific and unlikely to have false positives. |
Describe the bug
In Dart-Code, if I try to launch the Android emulator, and virtualization support is disabled in the BIOS, or another emulator such as VirtualBox is already running, then QEMU will fail to launch, but no error is shown to the user. VS Code just keeps showing a spinner saying it is waiting for the emulator to start.
Expected behavior
It would be nice if the user were alerted to the fact that QEMU couldn't be started.
The text was updated successfully, but these errors were encountered: