realtime simply turns off when the application is not in use. It may turn off in 5 minutes or maybe in an hour. This lasts for months. no changes. there are no errors. it just turns off. Windows and Mac OS platforms. starts working only after restarting the application
both in dev mode and in release
cloud
another error with realtime. I do not understand anything
flutter: subscription: wss://cloud.appwrite.io/v1/realtime?project=bongotakso&channels%5B%5D=databases.bongoDb.collections.work_session.documents [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: AppwriteException: , Missing or unknown project ID (1008) #0 RealtimeMixin.handleError (package:appwrite/src/realtime_mixin.dart:157:7) #1 RealtimeMixin._createSocket.<anonymous closure> (package:appwrite/src/realtime_mixin.dart:50:13) #2 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10) #3 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11) #4 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) #5 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11) #6 _HandleErrorStream._handleData (dart:async/stream_pipe.dart:253:10) #7 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13) #8 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10) #9 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11) #10 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7) <β¦>
hey appwrite team! what about realtime? it works very poorly
Are you sure that's not related to connection?
yes, I am sure. 500Mbit optical channel
There is no way to check the connection in SDK. for example - realtime.ping() or some
I also use socket io. could there be conflicts?
socket.io connection not disconnect.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: WebSocketException: Connection to 'https://cloud.appwrite.io:0/v1/realtime?project=bongotakso&channels%5B%5D=databases.bongoDb.collections.work_session.documents.1711619920776#' 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) <asynchronous suspension> #3 RealtimeMixin._createSocket (package:appwrite/src/realtime_mixin.dart:33:17) <asynchronous suspension>
No idea π€
What's the SDK version you're using?
appwrite: ^11.0.1
I immediately subscribe to three channels. Maybe this is not possible?
ChangeNotifierProvider<DriverProvider>(
lazy: false,
create: (context) => DriverProvider()
..getDrivers()
..getDriversRealtime(),
),
ChangeNotifierProvider<OrderProvider>(
lazy: false,
create: (context) => OrderProvider()
..getOrdersList()
..getOrdersListRealtime(),
),
ChangeNotifierProvider<RideProvider>(
lazy: false,
create: (context) => RideProvider()
..getActiveDrivers()
..getActiveDriversRealtime(context),
),
I have the same issue and to check if realtime is up, I regularly update a dummy document and check if I receive the update event. If not, then I reset the subscription. It's a bit cumbersome but it's the only solution I have found until now.
I need to create a new realtime instance for each listener?
if i have getDriversRealtime(), getOrdersListRealtime(), getActiveDriversRealtime(context) i need 3 different realtime = Realtime(client) ?
I thought about it. but that's very bad
nop. it did not help
how often does this happen? Does it stop happening for a period of time and then comes back randomly?
It's working fine now, right?
hello. I have now turned off realtime, so I donβt know. But in general, yes, this always happened, after varying amounts of time, both in debug mode and in release. All other api worked fine
I also have the problem that realtime on flutter is working sporadically. I have a basic realtime subscription to a document and it is not reliable. Sometimes is does fetch the data if the document changed and sometimes it does not.
It happes when you have several websocket connections at the same time. I connected with postman dirctly to the websocket and made a connecton to realtime with the flutter app. This coused the problem that some times the connection with the app worked and sometimes not. The appwrite is hosted on a server and the postmen (on mac) and flutter app on (android phone).
Recommended threads
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...