-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Emulator wrapper fixes #702
Conversation
fix: detox fails to start when another emulator is running
const cmd = _.compact([ | ||
'-verbose', | ||
'-gpu', | ||
'host', |
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.
Change to gpu auto
for better support. Current command breaks on some machines
@rotemmiz , done. |
7422075
to
8855370
Compare
@rotemmiz , the build is green. |
8f93eea
to
444477f
Compare
The behavior after this pull request is going to be the following:
|
const childProcessPromise = spawn(this.emulatorBin, emulatorArgs, { detached: true, stdio: ['ignore', stdout, stderr] }); | ||
childProcessPromise.childProcess.unref(); | ||
|
||
return childProcessPromise.catch((err) => { |
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.
can't this be separated into two declarations ?
childProcessPromise.catch((err) => {
}
....
return childProcessPromise;
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.
Regarding (2), there was an issue (likely on Linux, but not sure if it is the reason) with a race condition.
tail.on("line", function(data) {
was called too late, when the promise had already rejected.Since the function was returning
return promise;
without a catch (e.g.return promise.catch(function () {
), thepromise._cpResolve()
call was happening too late insidetail.on
, when the consumer ofboot
logic actually had gotten into a negative conditional branch.