I'm trying to set up my new Ember.js project with Android. And I came upon the same issue described here and it looks like there's some race condition going on.
I don't have a device connected, only a single emulator. With the following lines in lib/commands/start.js as they are now:
if (platforms.includes('android')) {
promises.push(listAndroidDevices());
promises.push(listAndroidEmulators());
}
it finds my emulator about 10% of the time when running corber start. The other 90% of the time, it outputs No emulators or devices found.
However, when I ask it to list the emulators before the devices:
if (platforms.includes('android')) {
promises.push(listAndroidEmulators());
promises.push(listAndroidDevices());
}
it finds the emulator 100% of the time!
So it seems that there's a race condition (or something similar) between the two commands
I'm new to Android development so I really don't know what's going on here. Just wanted to document this. Maybe it's an option to run the two commands in serial rather than in parallel? I know it's not ideal without understanding the root cause, but it might offer a solution for some people in the mean time without affecting functionality.
Hi,
I'm trying to set up my new Ember.js project with Android. And I came upon the same issue described here and it looks like there's some race condition going on.
I don't have a device connected, only a single emulator. With the following lines in lib/commands/start.js as they are now:
it finds my emulator about 10% of the time when running
corber start
. The other 90% of the time, it outputsNo emulators or devices found
.However, when I ask it to list the emulators before the devices:
it finds the emulator 100% of the time!
So it seems that there's a race condition (or something similar) between the two commands
I'm new to Android development so I really don't know what's going on here. Just wanted to document this. Maybe it's an option to run the two commands in serial rather than in parallel? I know it's not ideal without understanding the root cause, but it might offer a solution for some people in the mean time without affecting functionality.
I'm on Linux btw (Ubuntu 18.04).