Rank 2: Process
I have a document that is the user profile. I try to subscribe to any changes by doing:
var s = realtime.subscribe(['databases.app.collections.profile.documents.${_social.awAccount!.$id}']); s.stream.listen((event) { Log.w(event.toString()); }, onError: (a) { Log.e(a.toString()); }, onDone: () { Log.e('profile connection closed'); });I have another use case: subscribing to a chat collection, where a document is a chat message:
realtime.subscribe(['databases.chat.collections.${widget.group}.documents']);After cloud upgrade I've been getting the streams to call onDone and connection is lost. I've just noticed this issue recently, because the users are complaining about chat connection issue.
The users have permission to that document and collection. The users can do database.listDocuments for chat collection, so they really have permission.
I am using the current flutter sdk 11.0.0 and appwrite cloud. I read the docs again, and I couldn't figure out if anything was changed from previous sdk version. The problem is occurring in both Android and iOS devices, in different networks (wifi, 5g)
The logs for the chat code:
subscription: wss://cloud.appwrite.io/v1/realtime?project=REALPROJECTID&channels%5B%5D=databases.chat.collections.k82rekh0jl9zrep.documents
[chat] Connection closed
Also tried ending with documents.* but no success.