diff --git a/patches/detox+20.13.5.patch b/patches/detox+20.13.5.patch new file mode 100644 index 00000000..bb1e0822 --- /dev/null +++ b/patches/detox+20.13.5.patch @@ -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; + } +