-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebase websocket issue [Android] #8224
Comments
@AlaaAttya Looks like a possible race condition. Make sure your socket connection exists before calling any methods on it. i.e |
@christopherdro i've not opening sockets in my code. It's firebase's npm package that does so. ` }); i think it's a bug in this library |
@christopherdro the issue with RN is that the data is getting fetched from Firebase but the listview (the component which is rendering the data) is not being updated while it's working fine on iOS. So i think it RN native layer shouldn't be crushable for this type of exception. |
Having the same problem here. |
Please send a PR which prints a error log instead of crashing the app. |
I am not able to read/write any data to firebase after updating to
Basically it's printing one of these every 2 seconds. This was working on Please advise how to fix this problem. I am not sure where to make the changes. If you give me some pointers, I will be happy to try out and send a PR. Thanks! |
Please follow along on #8949. |
This appears to be the same issue as #8949 (as @paramaggarwal pointed out). Closing this one as a duplicate. |
@facebook-github-bot duplicate #8949 |
Hi guys,
I'm using Firebase's npm package (v2.4.2) for my RN app. It works fine on iOS but it throws this exception for android
06-19 10:25:16.654 2559-12442/com.aucapp E/unknown:React: Could not close WebSocket connection for id 0
java.net.SocketException: Socket is closed
at com.android.org.conscrypt.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:246)
at com.android.org.conscrypt.OpenSSLSocketImpl.access$000(OpenSSLSocketImpl.java:57)
at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:750)
at okio.Okio$1.write(Okio.java:80)
at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
at okio.RealBufferedSink.flush(RealBufferedSink.java:221)
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeControlFrame(WebSocketWriter.java:151)
at com.squareup.okhttp.internal.ws.WebSocketWriter.writeClose(WebSocketWriter.java:112)
at com.squareup.okhttp.internal.ws.RealWebSocket.close(RealWebSocket.java:135)
at com.facebook.react.modules.websocket.WebSocketModule.close(WebSocketModule.java:203)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:316)
at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:187)
at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:62)
at com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.call(CatalystInstanceImpl.java:432)
at com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:187)
at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: