File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ 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
2
+ index 06ce77e..c1f77f9 100644
3
+ --- a/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js
4
+ +++ b/node_modules/detox/src/devices/common/drivers/ios/tools/AppleSimUtils.js
5
+ @@ -285,6 +285,7 @@ class AppleSimUtils {
6
+ silent: true
7
+ });
8
+ } catch (err) {
9
+ +
10
+ // Since we have no convenient way to check whether the app is currently running or not, we might execute this
11
+ // command (terminate) even if the app is not currently running, or even installed.
12
+ // We have encountered some case where the following error is thrown in a case where the app did not run:
13
+ @@ -295,9 +296,13 @@ class AppleSimUtils {
14
+ // ```
15
+ // This workaround is done to ignore the error above, as we do not care if the app was running before, we just
16
+ // want to make sure it isn't now.
17
+ + const shouldBeIgnored = err.stderr.includes(`the app is not currently running`) ||
18
+ + err.stderr.includes(`found nothing to terminate`);
19
+ + console.log({customErr: err});
20
+ + console.log({customErrStderr: err.stderr});
21
+ + console.log({shouldBeIgnored, code: err.code, type: typeof err.code});
22
+ if (err.code === 3 &&
23
+ - (err.stderr.includes(`the app is not currently running`) ||
24
+ - err.stderr.includes(`found nothing to terminate`))) {
25
+ + shouldBeIgnored) {
26
+ return;
27
+ }
28
+
You can’t perform that action at this time.
0 commit comments