Back
Realtime connection error: WebSocketException: ... was not upgraded to websocket
- 0
- Flutter
- Cloud
fernandoxlr
My application has lots of chat rooms created daily, and a common error is that the realtime connection is not working, the console shows this error:
TypeScript
flutter: WebSocketException: Connection to 'https://cloud.appwrite.io:0/v1/realtime?project=prject_id&channels%5B%5D=databases.chat.collections.dn1m1gh2kzkdmoe.documents#' was not upgraded to websocket
#0 _WebSocketImpl.connect (dart:_http/websocket_impl.dart:1011:41)
#1 WebSocket.connect (dart:_http/websocket.dart:320:22)
#2 RealtimeIO._getWebSocket (package:appwrite/src/realtime_io.dart:37:27)
#3 RealtimeMixin._createSocket (package:appwrite/src/realtime_mixin.dart:33:17)```
Just after creating some documents in that collection the next attempt of doing a realtime connection works. This error occasionally occurs with some collections.
Using appwrite cloud v.1.4.13
Appwrite for flutter: v11.0.1
TL;DR
Issue: Developers are experiencing a WebSocketException error with their real-time connection in Flutter using Appwrite. The connection is not being upgraded to a websocket sometimes, affecting chat rooms. Error occurs occasionally with certain collections in the application.
Solution: This issue might be resolved by ensuring proper websocket connection establishment in the code. Consider reviewing and potentially updating the websocket implementation to address the error. Recommended threads
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Deploy function not working - 503
Hellon i get this error message, when i try to deploy a new version of a function <html><body><h1>503 Service Unavailable</h1>No server is available to handle...