-
Notifications
You must be signed in to change notification settings - Fork 10
Detect unexpected emulator exit and stops waiting for it #381
Conversation
@@ -23,6 +24,7 @@ class AndroidEmulatorServices implements Mobile.IEmulatorPlatformServices { | |||
private static TIMEOUT_SECONDS = 120; | |||
private static UNABLE_TO_START_EMULATOR_MESSAGE = "Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual Device manager and increase the allocated RAM for the virtual device."; | |||
private static RUNNING_ANDROID_EMULATOR_REGEX = /^(emulator-\d+)\s+device$/; | |||
private static EMULATOR_EXITED_MESSAGE = "The native emulator has stopped unexpectedly. Verify its configuration and try again."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we consider Genymotion as native emulator? The message is used for both native and Genymotion emulators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modeled the message after UNABLE_TO_START_EMULATOR_MESSAGE - should we change it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to remove "native" word :)
The code is breaking the behavior of AppBuilder CLI where the terminal should be released when the emulator starts. Do we want this? |
Ignore my comment, there's another issue in AppBuilder CLI, which is causing emulator hold the console. I'll fix it in a separate PR. |
} | ||
emulatorProc.on("error", () => emulatorProcEnded = true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can log trace the error here
d8a08aa
to
e627160
Compare
❤️ |
e627160
to
35c7757
Compare
❤️ |
Fixes NativeScript/nativescript-cli#645