react-native
react-native copied to clipboard
React Native: java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule
Hello everyone, I do not use WebSocketModule but gives this error, please help.


:warning: | Missing Environment Information |
---|---|
:information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console. |
3 09:42:20.822 unknown:ReactContextBaseJavaModule Unhandled SoftException
java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule
at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67)
at com.facebook.react.modules.websocket.WebSocketModule.sendEvent(WebSocketModule.java:62)
at com.facebook.react.modules.websocket.WebSocketModule.access$100(WebSocketModule.java:40)
at com.facebook.react.modules.websocket.WebSocketModule$1.onMessage(WebSocketModule.java:190)
at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:322)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:273)
at okhttp3.internal.ws.RealWebSocket$1.onResponse(RealWebSocket.java:209)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
I have same issue too. Any clue how to get rid this error ?
Here my development env.
System:
OS: macOS 10.15.5
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 206.95 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Intel x86 Atom_64
Android NDK: 17.1.4828580
IDEs:
Android Studio: Not Found
Xcode: 11.5/11E608c - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_131 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: * => 0.63.0
npmGlobalPackages:
*react-native*: Not Found
I have the same issue and pretty much the same development env. Anybody know of solutions?
I also get this issue, both on my android TV (8.0) and emulator. It occurs when it tries to fetch(). The error is identical as those above, and repeats multiple times in a row. The fetch promise is never rejected, and the error is only visible when watching logcat. It also appears that each time I restart the app, the number of times the error appears multiplies.
System:
OS: Windows 10 10.0.18363
CPU: (8) x64 AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx
Memory: 7.63 GB / 15.44 GB
Binaries:
Node: 14.6.0 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 26, 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 30.0.1
System Images: android-26 | Android TV Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-29 | Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763
Languages:
Java: 1.8.0_262 - C:\Program Files\AdoptOpenJDK\jdk-8.0.262.10-hotspot\bin\javac.EXE
Python: 3.8.5 - C:\Program Files (x86)\Python38-32\python.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
It seems that my issue was solved by fixing an instance of a chained ".then(SomeClass.callback)" from the fetch request, where the callback method was not a static member of SomeClass. No JS errors or warnings appeared for me telling me that callback didn't exist on the class (it did exist as a static member of the enclosing class, however). Once I tracked this mistake down, I no longer get the exception above. The runtime exception may have been triggered by the promise chain being invalid due to this mistake, but then I'm not sure why a more relevant error wasn't tripped in js linting or even at runtime, and ended up triggering a lower level exception instead.
I'm having the same problem when setting up a project on a new RN 0.63 base:
2020-07-27 14:58:12.930 7877-7929/? E/unknown:ReactContextBaseJavaModule: Unhandled SoftException
java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by NativeAnimatedModule
at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67)
at com.facebook.react.animated.NativeAnimatedModule.initialize(NativeAnimatedModule.java:128)
at com.facebook.react.bridge.ModuleHolder.doInitialize(ModuleHolder.java:236)
at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:201)
at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
at com.facebook.react.bridge.JavaModuleWrapper.getModule(JavaModuleWrapper.java:56)
at com.facebook.react.bridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:126)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
at android.os.Looper.loop(Looper.java:214)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
at java.lang.Thread.run(Thread.java:919)
2020-07-27 14:58:13.173 7877-7929/? E/ReactNativeJNI: logMarker RUN_JS_BUNDLE_END
2020-07-27 14:58:13.234 7877-7951/? E/unknown:ReactContextBaseJavaModule: Unhandled SoftException
java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule
at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67)
at com.facebook.react.modules.websocket.WebSocketModule.sendEvent(WebSocketModule.java:62)
at com.facebook.react.modules.websocket.WebSocketModule.access$100(WebSocketModule.java:40)
at com.facebook.react.modules.websocket.WebSocketModule$1.onOpen(WebSocketModule.java:156)
at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:210)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Note that I'm still using the default app code from npx react-native init project
I've just installed some modules so far...
My RN info:
$ npx react-native info
info Fetching system and libraries information...
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 990.65 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.1.0 - ~/.nvm/versions/node/v14.1.0/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v14.1.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.8.4 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 18, 23, 24, 25, 26, 27, 28, 29
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2, 28.0.3, 29.0.0, 29.0.2
System Images: a...google_apis | Google APIs Intel x86 Atom Sys..., a...google_apis | Google APIs Intel x86 Atom Sys..., a... | Intel x86 Atom_64, a...google_apis | Google APIs Intel x86 Atom Sys..., a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...-28 | Intel x86 Atom, a... | Intel x86 Atom_64, a...google_apis | Google APIs Intel x86 Atom Sys..., a...-29 | Intel x86 Atom, a... | Intel x86 Atom_64, a...google_apis | Google APIs Intel x86 Atom Sys...
Android NDK: 20.1.5948944
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_202-release - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
this is happening with me too on 0.63.2 , it started after installing react-native-community/webview
Same issue on RN 0.63.2
same issue on RN 0.62.2
same issue on RN 0.62.2
For me it still persists, I have Xiaomi Redmi Note 7, and my code was working perfectly 1 week ago, and suddenly started giving this error... this is driving me crazy. My project needs to access Firebase Realtime Database, which is when the error happens.
The gradle probably updated something in the build, because I forced myself to create a new project yesterday, with the command
npx react-native init AwesomeTSProject --template react-native-template-typescript
.
Installed clean copy of
"@react-native-firebase/app": "^8.3.1",
"@react-native-firebase/auth": "^8.3.3",
"@react-native-firebase/database": "^7.4.2",
Until then everything working, I executed the query of the firebase database (database ().ref('test'). once(...)
), I managed to get the information normally (YESTERDAY),
But today I went to test again, and this error appeared in the clean project, suddenly...
E/unknown:ReactContextBaseJavaModule: Unhandled SoftException
java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule
at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67)
at com.facebook.react.modules.websocket.WebSocketModule.sendEvent(WebSocketModule.java:62)
at com.facebook.react.modules.websocket.WebSocketModule.access$100(WebSocketModule.java:40)
at com.facebook.react.modules.websocket.WebSocketModule$1.onMessage(WebSocketModule.java:190)
at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323)
at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219)
at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105)
at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274)
at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
The application does not display any feedback (probably because of the Unhandled SoftException), no warning. and your promise is never resolved or rejected.
I tried to synchronize the time, disable automatic time, etc.,
My react version.
SDKs:
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-29 | Google APIs Intel x86 Atom
npmPackages:
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
I thinks this is related to the Metro Server when you hit "R" key to reload, they don't handle the connection lost for that second. (I may be talking shit.)
Anyone from this thread was able to solve the problem or have more info, please?
+1
+1
+1
Having this issue with react native 0.63.2
. Any help is appreciated.
Just happen on Android 5 API 21. Works perfect on Android 10.
Having this issue with react native 0.63.2. Any help is appreciated.
Same here
The problem has not been resolved yet.
Any update here?
Same here with 0.62.2
same issue with 0.63.3
same issue when upgrade to 0.63.3
The exception being discussed in this thread is displayed in the logcat and then the app crashes with the below c++ error.
App is crashing every time when we reload the JS code either using the "Reload" option from debug menu (or) by clicking cmd+R on the metro server terminal.
Can anyone suggest if the exception and crash are related?
--------- beginning of crash A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10233 (pool-18-thread-), pid 9986 E/libc++abi: terminating with uncaught exception of type std::runtime_error: logging not available for section entry E/libc++abi: terminating with uncaught exception of type std::runtime_error: logging not available for section entry
same issue with 0.63.3
same issue with 0.62.2
Same issue here with react-native 0.63.0 and Xiaomi in development environment. I tried with Huawei and still works
Same issue. App still running as normal but the errors show continuously.
RN 0.63.4 Some users crash right after open app, I don't know if this is the reason or not.
Any solved the issue .Iam getting same use while using react-native-google-fit. while calling getActivitySamples function .