Detox: Signal 11 was raised
Description
I am getting the following Signal 11 crash intermittently when running tests on iOS Simulator
DetoxRuntimeError: The pending request #321 ("invoke") has been rejected due to the following error:
The app has crashed, see the details below:
Signal 11 was raised
(
0 Detox 0x0000000104ad3335 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
1 Detox 0x0000000104ad6540 __DTXHandleCrash + 464
2 Detox 0x0000000104ad6c85 __DTXHandleSignal + 59
3 libsystem_platform.dylib 0x00007fff5e733d7d _sigtramp + 29
4 ??? 0x0000000000000001 0x0 + 1
5 DetoxSync 0x00000001063d274f -[_DTXTimerTrampoline fire:] + 188
6 DetoxSync 0x00000001063bab10 _DTXCFTimerTrampoline + 74
7 CoreFoundation 0x00007fff2038cc47 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
8 CoreFoundation 0x00007fff2038c71a __CFRunLoopDoTimer + 926
9 CoreFoundation 0x00007fff2038bccd __CFRunLoopDoTimers + 265
10 CoreFoundation 0x00007fff2038634e __CFRunLoopRun + 1949
11 CoreFoundation 0x00007fff203856c6 CFRunLoopRunSpecific + 567
12 MinoApp 0x0000000103a4ee9a +[RCTCxxBridge runRunLoop] + 274
13 DetoxSync 0x00000001063c300e swz_runRunLoopThread + 291
14 Foundation 0x00007fff20852e68 __NSThread__start__ + 1042
15 libsystem_pthread.dylib 0x00007fff5e741954 _pthread_start + 224
16 libsystem_pthread.dylib 0x00007fff5e73d4a7 thread_start + 15
)
- I have tested this issue on the latest Detox release and it still reproduces
Environment (please complete the following information):
- Detox: 18.14.1
- React Native: 0.63.4
- Node: 14
- Device: iOS Simulator 11
- Xcode: 12.4
- iOS: 14.4
- macOS: Big sur
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 17
- Comments: 52 (16 by maintainers)
Commits related to this issue
- iOS(AppleSimUtils): enable NSZombies on app launch. This workaround solves the issue described here: https://github.com/firebase/firebase-ios-sdk/issues/9083 And some of the crashes that was mention... — committed to asafkorem/Detox by asafkorem 3 years ago
- iOS(AppleSimUtils): enable NSZombies on app launch. This workaround solves the issue described here: https://github.com/firebase/firebase-ios-sdk/issues/9083 And some of the crashes that was mention... — committed to wix/Detox by asafkorem 3 years ago
Still relevant
Got the same issue
Detox: 18.14.1 React Native: 0.63.4 Node: 14 Device: iOS Simulator 11 Xcode: 12.4 iOS: 14.4 macOS: Big Sur 11.3.1
My message won’t bring much info, but still. On detox 17 we do not have this crash ever.
Upgrading to Detox 18 leads to occasional(not 100% reproducible) such crashes - probably on iOS only.
On M1 Mac mini these crashes are much more frequent(>50%), on x86 MacBook they are rarer (~10-20%).
This crash appears for us on CircleCI macOS containers running Intel Xeon 10 core machines with 8 vCPU and 16GB ram.
On my local machine I tried to replicate low compute resourcing. I ran (all at the same time): GeekBench 5, Cinebench, “CPU Stress test” with 64 threads of compute set to 100% compute, multiple instances of node.js, the Detox/React Native bundler and I watched the Simulator without headless mode enabled. Even with all of my threads maxed and being hit by multiple processes I still could not reproduce these crashes, and I also cannot reproduce the kind of low framerate and lag that Detox gets on CI. My only conclusion can be that it’s not resource limitations causing this. I think that Detox on iOS has some sort of issue when running it on a VM there is some sort of methods it uses on that conflicts with the queueing and scheduling of a hypervisor. This problem does not appear on bare metal but as soon as you introduce a VM you start to see degraded performance and eventually crashes. I don’t think it’s crashing because of the lack of performance of the VM (the VM might be powerful enough) but because it seems to lack stability and compatibility with VMs as a technology. So, for the Detox team to easily reproduce this issue, I would suggest running Detox in a macOS VM, however you can do that.
Thanks guys. We will onboard with trying to address these random crashes by the year’s end. In the meantime, it is highly recommended that you’d inspect your device logs - look up these crashes there, and then try to find a Javascript stacktrace. Sometimes, it can lead you to the place in the JS code that crashes.
I got one
with
"detox": "^19.5.3",
https://github.com/wix/Detox/pull/3135 was merged, it should solve the issue of DetoxSync crashes when Firebase/Performance is integrated, it was tested on the example apps that reproduced this issue.
We will release a version with this change soon.
Once you have updated a version (to the latest/next version), if any of you are still having Signal 11 crashes on DetoxSync, please open a new bug report with the required details.
Android debug: ✅ Android release: ✅ iOS debug ✅ iOS release: ❌
Detox can install the app without any issues but launching ends up with the below crash. Running the installed app manually works perfectly fine (however tests are failing as detox is not connected)
edit:
Got the same error. The app opens and displays the push notification modal but it closes (crashes) after 3 seconds of that initial display of successful run.
Command Runned: detox test --configuration ios
detox: 19.1.0 react-native: 0.66.1 node: v14.17.4 Device: simluator iPhone 12 Xcode: 12.5 iOS: 14.5 macOS: Big Sur 11.2.3 MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) Processor: 2.3 GHz Dual-Core Intel Core i5 Memory: 8 GB 2133 MHz LPDDR3
` DetoxRuntimeError: The pending request #-1000 (“isReady”) has been rejected due to the following error:
● Example › should show hello screen after tap
● Example › should show world screen after tap
detox[18415] ERROR: [cli.js] Command failed: jest --config e2e/config.json --testNamePattern ‘^((?!:android:).)*$’ e2e `
After trying many times…
For me was to allow push notification right after the modal appeared
similar issue here every now and then.
detox: 18.20.3 React Native: 0.64.1 react-native-firebase 11.4.1 Node: 12.14.1 Device: simluator iPhone 11 Xcode: 12.5 iOS: 14.5 macOS: 11.4 Mac chip: intel i7
I have the same issue, on my own env and in github action env.
Detox: 18.12.2 React Native: 0.64.1 Node: 14.1 Device: iOS Simulator 11 Xcode: 12.5 macOS: Big Sur (github macos-11)
How can I fix it in github actions?
Finally I realized that I had to manually open the IOS simulator on macos to see what’s happening. (btw it is a weird behavior to get the IOS simulator headless by default since on Android the emulator is opened by default). So the issue happens because I didn’t build the app with the js and the app was expecting the react-native dev server to be running.
Could Detox possibly bubble up the track trace of the original crash? It’s tough to debug without the original error message / stack trace.
@meshaabi The trace you linked is a crash but not necessarily related to detox itself. See what @d4vidi commented after the trace. I will say it again - every time your app crash while detox is running you will see something like this:
0x0000000107b8b940 __DTXHandleCrash + 464
Doesn’t mean the crash is from detox though… In this ticket5 DetoxSync 0x00000001063d274f -[_DTXTimerTrampoline fire:] + 188
is the thing which pointed to DetoxSync.I hope fixing the issue with firebase will help you, but I’m not sure that’s the issue in your case