Firebase + React Native = Broken

792 views
Skip to first unread message

Braden Napier

unread,
Oct 24, 2015, 8:10:54 PM10/24/15
to Firebase Google Group
Could use some help on this one.  Firebase appears to have randomly broke.  I haven't updated anything... but the second I connect to firebase my app receives non-stop messages which I can only assume comes from Firebase and is from some sort of conflict.  If I take the connection to Firebase out of my code (which has been working for a month or more) then no spam of this message.  If I just do new firebase I get about 21 of the messages and once i connect to the firebase websocket i get 20,000+ 

RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert

^ this will only occur when I am running on a device and I elect to "Debug in Chrome" - otherwise it works fine.  Problem being this is how you troubleshoot things with RN - so Firebase + RN is essentially broken at this point - it must be server-side that this is happening because again, I updated nothing and this started occurring.  

[tid:com.facebook.React.RCTWebSocketManagerQueue][RCTSRWebSocket.m:520] SocketRocket: In debug mode.  Allowing connection to any root cert

2015-10-22 21:48:26.850 [info]

Michael Lehenbauer

unread,
Oct 25, 2015, 7:18:20 PM10/25/15
to Firebase Google Group
Hi Braden,

This sounds very similar to an issue another user reported with Firebase / react-native recently.  Essentially what was happening was that in certain cases (I couldn't reproduce it and he could only reproduce it sometimes), the underlying websocket implementation (SocketRocket) was closing the connection without delivering all of the packets that it had received.  This had a nasty effect of causing Firebase to repeatedly try to connect to the wrong server, and each attempt triggered that message about debug mode.

He pushed a fix into react-native but I don't think it's been released yet.

If you want to confirm this is the same issue, you can add "Firebase.enableLogging(true);" to the beginning of the app and send me the log output.

Thanks,
-Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/69c6e8af-b03d-44a9-b2c2-1f976e167970%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Braden Napier

unread,
Oct 26, 2015, 4:40:15 PM10/26/15
to Firebase Google Group
Here

p:0: Admin auth credential detected.  Reducing max reconnect time.  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:0: Connection created  
firebase-web.js:35 c:0:0:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:0: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:0: Closing realtime connection.  
firebase-web.js:35 c:0:0: Shutting down all connections  
firebase-web.js:35 c:0:0:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 92.51167550683022ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:1: Connection created  
firebase-web.js:35 c:0:1:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:1: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:1: Closing realtime connection.  
firebase-web.js:35 c:0:1: Shutting down all connections  
firebase-web.js:35 c:0:1:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 813.0734300510958ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:2: Connection created  
firebase-web.js:35 c:0:2:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:2: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:2: Closing realtime connection.  
firebase-web.js:35 c:0:2: Shutting down all connections  
firebase-web.js:35 c:0:2:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 390.92849384550937ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:3: Connection created  
firebase-web.js:35 c:0:3:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:3: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:3: Closing realtime connection.  
firebase-web.js:35 c:0:3: Shutting down all connections  
firebase-web.js:35 c:0:3:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 581.2936389967799ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:4: Connection created  
firebase-web.js:35 c:0:4:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:4: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:4: Closing realtime connection.  
firebase-web.js:35 c:0:4: Shutting down all connections  
firebase-web.js:35 c:0:4:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 2258.5811181851195ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:5: Connection created  
firebase-web.js:35 c:0:5:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 c:0:5: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:5: Closing realtime connection.  
firebase-web.js:35 c:0:5: Shutting down all connections  
firebase-web.js:35 c:0:5:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 1106.098864508739ms  
firebase-web.js:35 0: onDisconnectEvents  
firebase-web.js:35 c:0:1:0 Websocket connected.  
firebase-web.js:35 c:0:0:0 Websocket connected.  
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:6: Connection created  
firebase-web.js:35 c:0:6:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
firebase-web.js:35 c:0:6: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:6: Closing realtime connection.  
firebase-web.js:35 c:0:6: Shutting down all connections  
firebase-web.js:35 c:0:6:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 4114.265008932196ms  
firebase-web.js:35 0: onDisconnectEvents  
RCTLog.js:36 SocketRocket: In debug mode.  Allowing connection to any root cert
firebase-web.js:35 p:0: Making a connection attempt  
firebase-web.js:35 c:0:7: Connection created  
firebase-web.js:35 c:0:7:0 Websocket connecting to wss://s-dal5-nss-48.firebaseio.com/.ws?v=5&ns=urcdash  
firebase-web.js:35 c:0:7: Closing unhealthy connection after timeout.  
firebase-web.js:35 c:0:7: Closing realtime connection.  
firebase-web.js:35 c:0:7: Shutting down all connections  
firebase-web.js:35 c:0:7:0 WebSocket is being closed  
firebase-web.js:35 p:0: data client disconnected  
firebase-web.js:35 p:0: Trying to reconnect in 851.6481208744547ms  
firebase-web.js:35 0: onDisconnectEvents  

Michael Lehenbauer

unread,
Oct 27, 2015, 1:41:59 PM10/27/15
to Firebase Google Group
Hey Braden,

Unfortunately this looks like a potentially different issue.  Your WebSocket just isn't getting connected at all, and I don't know why.  :-(

-Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Braden Napier

unread,
Oct 27, 2015, 1:43:38 PM10/27/15
to Firebase Google Group
As I said it's a specific process but i can re-create it every time

1. Run the App on the device
2. Shake the Device to open the Dev Menu and select "Debug in Google Chrome"
3. Connect to Firebase
4. DEATH!!!!!

:-P

Guillermo Christen

unread,
Nov 25, 2015, 10:33:01 AM11/25/15
to Firebase Google Group
Hi Braden, 

   Did you every figure out what was happening? 

   I am getting the exact same behaviour with very similar logs (only the Firebase endpoint is different). I have been racking my brain trying to figure out what is wrong when attempting to establish a connection whilst in debug mode.

Best,

Michael Lehenbauer

unread,
Nov 25, 2015, 12:36:18 PM11/25/15
to Firebase Google Group
Can you try the very latest version of React Native?  There were some issues in its WebSocket implementation recently.

Thanks,
-Michael

Guillermo Christen

unread,
Nov 25, 2015, 3:18:06 PM11/25/15
to fireba...@googlegroups.com
Hi Michael, 

  I am running version 0.15.0 of react. Is that the latest?

Best,

--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/eF7y7Enqb3M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Guillermo Christen
Co Founder | Logameal | London | T: +44 7415419273

Reply all
Reply to author
Forward
0 new messages