question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test crash/hangs - Catalyst Instance has already disappeared

See original GitHub issue

What 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?

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:

https://user-images.githubusercontent.com/48229166/203095438-9838b318-b86d-438f-80bc-3d22f5d764ec.mp4

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Frexuzcommented, Nov 27, 2022

Also, congrats on the new image and alias 😄

private / work accounts 😃

0reactions
d4vidicommented, Nov 27, 2022

Thx for the time and research 😃 Interesting… will have to dig deeper The screen seems “simple” to me… not sure what would make the tap busy.

This could be the obvious but try mimicking this behavior without Detox. You might end up reproducing the same behavior manually…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found