Skip to content

Commit

Permalink
chore: log more in ci (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak authored Nov 24, 2023
1 parent 4cf3c87 commit 55e2d04
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions patches/detox+20.13.5.patch
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;
}

0 comments on commit 55e2d04

Please sign in to comment.