Firebase RealTime Database Socket connection error
See original GitHub issueI am using fireabse real time database for my application. At times it it unable to form socket connection. But requests made to API hosted on firebase cloud-fucntion works properly. I have used following dependencies :-
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
implementation 'com.google.firebase:firebase-storage:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.4'
When I turned on the debug level it gives following :-
2018-11-11 14:13:17.932 14446-14513/com.example.com D/ConnectionRetryHelper: Scheduling retry in 933ms
2018-11-11 14:13:18.867 14446-14513/com.example.com D/PersistentConnection: pc_0 - Trying to fetch auth token
2018-11-11 14:13:18.873 14446-14513/com.example.com D/PersistentConnection: pc_0 - Successfully fetched token, opening connection
2018-11-11 14:13:18.878 14446-14513/com.example.com D/Connection: conn_1 - Opening a connection
2018-11-11 14:13:48.881 14446-14513/com.example.com D/WebSocket: ws_1 - timed out on connect
2018-11-11 14:13:48.882 14446-14513/com.example.com D/WebSocket: ws_1 - closed
2018-11-11 14:13:48.882 14446-14513/com.example.com D/WebSocket: ws_1 - closing itself
2018-11-11 14:13:48.882 14446-14513/com.example.com D/Connection: conn_1 - Realtime connection failed
2018-11-11 14:13:48.882 14446-14513/com.example.com D/Connection: conn_1 - closing realtime connection
This keeps happening on certain device like Mi5 note pro, lenov
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Unity+Firebase-Database[Error] WebSocket: ws_0 - could not ...
The message "No route to host" seems to indicate that the client can't reach the Firebase servers. This may indicate a problem in...
Read more >Google Groups
You refresh the page before Firebase's WebSocket connection has been established. The error will show up as the first message in the log,...
Read more >Firebase Realtime Database
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client.
Read more >Troubleshooting Teams: CyberEscape Online Database ...
If you are on a virtual machine or desktop and are receiving a Google Firestore: Default websockets failure, that might be the cause....
Read more >Firebase vs Socket.IO - Ably Realtime
This Firebase vs Socket.IO comparison was created ... Build a realtime database with Socket. ... Which popular programming languages do Firebase and Socket....
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
Getting the same error on Firebase Realtime database 16.1.0, it doesn’t work on mobile network, but works perfectly fine on WiFi networks, also is much likely to happen on a device running Android 9.
Logs:
The same snippet of message occurs in a loop.
I am facing the exact same issue. I am using Firebase Real-time database 16.1.0. As far as I have observed this occurs on some devices when they are on mobile data. This issue is creating a lot of issues in the app.