Test crash/hangs - Catalyst Instance has already disappeared
See original GitHub issueWhat happened?
The same error happens sporadically. So far around 4-5 out of 25-ish runs. (Always the same spec)
Small piece of the logs:
11-21 04:30:45.164 2439 2756 I ReactNative: [GESTURE HANDLER] Tearing down gesture handler registered for root view com.facebook.react.ReactRootView{fdb8e31 V.E...... ......ID 0,0-1080,2028}
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: Unhandled SoftException
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by DeviceInfo
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:66)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.modules.deviceinfo.DeviceInfoModule.invalidate(DeviceInfoModule.java:114)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:110)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:108)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:368)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at android.os.Handler.handleCallback(Handler.java:883)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at android.os.Handler.dispatchMessage(Handler.java:100)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:14)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at androidx.test.espresso.base.LooperIdlingResourceInterrogationHandler$2.run(LooperIdlingResourceInterrogationHandler.java:3)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at android.os.Handler.handleCallback(Handler.java:883)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at android.os.Handler.dispatchMessage(Handler.java:100)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at android.os.Looper.loop(Looper.java:214)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
11-21 04:30:45.164 2439 2756 E unknown:ReactContextBaseJavaModule: at java.lang.Thread.run(Thread.java:919)
11-21 04:30:45.165 2439 2756 E unknown:ReactContextBaseJavaModule: Unhandled SoftException
11-21 04:30:45.165 2439 2756 E unknown:ReactContextBaseJavaModule: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by NativeAnimatedModule
11-21 04:30:45.165 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:66)
11-21 04:30:45.165 2439 2756 E unknown:ReactContextBaseJavaModule: at com.facebook.react.animated.NativeAnimatedModule.invalidate(NativeAnimatedModule.java:1012)
What was the expected behaviour?
To pass.
We do not ever experience this crash when developing on the emulator, nor on real test devices. ONLY in e2e + detox. Google results didn’t help so much… Some older RN issues only.
Was it tested on latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- ~I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much~ not a timeout.
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: 20.0.1 React Native version: 0.70.4 Node version: Device model: Pixel 3 Emulator Android version: 29
Detox logs
https://gist.github.com/kg-currenxie/3af61f109303a2e7acedb9e8b8c941ee
Device logs
https://gist.github.com/kg-currenxie/925fd5694232fdebfb0341fc10611110
More data, please!
Just hangs after 21s:
Issue Analytics
- State:
- Created 10 months ago
- Comments:6
Top Results From Across the Web
catalyst instance has already disappeared - You.com | The AI ...
I am integrating react-native with cross-platform support, android (error found), ios (not tested), web (works correctly). When creating the project with rect- ...
Read more >Catalyst Instance has already disappeared: requested by ...
Description. I am integrating react-native with cross-platform support, android (error found), ios (not tested), web (works correctly).
Read more >rnmapbox/Lobby - Gitter
RuntimeException : Catalyst Instance has already disappeared: requested by WebSocketModule at com.facebook.react.bridge.ReactContextBaseJavaModule.
Read more >Blank Remote Stream - Help - React Native WebRTC
I've been playing around and got stuck. ... I found some logs, they say java.lang.RuntimeException: Catalyst Instance has already disappeared: …
Read more >Wix Detox Statistics & Issues - Codesti
Wix Detox: Gray box end-to-end testing and automation framework for mobile apps Check out ... Test crash/hangs - Catalyst Instance has already disappeared...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
private / work accounts 😃
This could be the obvious but try mimicking this behavior without Detox. You might end up reproducing the same behavior manually…