-
-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js | ||
index 06ce77e..c1f77f9 100644 | ||
--- a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js | ||
+++ b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js | ||
@@ -285,6 +285,7 @@ class AppleSimUtils { | ||
silent: true | ||
}); | ||
} catch (err) { | ||
+ | ||
// Since we have no convenient way to check whether the app is currently running or not, we might execute this | ||
// command (terminate) even if the app is not currently running, or even installed. | ||
// We have encountered some case where the following error is thrown in a case where the app did not run: | ||
@@ -295,9 +296,13 @@ class AppleSimUtils { | ||
// ``` | ||
// This workaround is done to ignore the error above, as we do not care if the app was running before, we just | ||
// want to make sure it isn't now. | ||
+ const shouldBeIgnored = err.stderr.includes(`the app is not currently running`) || | ||
+ err.stderr.includes(`found nothing to terminate`); | ||
+ console.log({customErr: err}); | ||
+ console.log({customErrStderr: err.stderr}); | ||
+ console.log({shouldBeIgnored, code: err.code, type: typeof err.code}); | ||
if (err.code === 3 && | ||
- (err.stderr.includes(`the app is not currently running`) || | ||
- err.stderr.includes(`found nothing to terminate`))) { | ||
+ shouldBeIgnored) { | ||
return; | ||
} | ||
|