#realtime failing

1 messages · Page 1 of 1 (latest)

subtle plover
#

Hi everyone! I'm running into a weird issue with Appwrite realtime in my chat app and was hoping someone might have some insights.

I have a chat view, and when it appears, I subscribe to my messages collection. For a while, it works great – I can send and receive messages in realtime. But then, things get flaky. Sometimes, messages just don't show up, even though I can see the documents being created in the database. It'll just skip some and then catch the next one. Other times, the realtime just seems to stop completely, and no new messages come through at all, even when there's activity.

I've double-checked my permissions (even set them wide open as a test!), and I've tried subscribing in different ways – once at the app level, and also subscribing/unsubscribing when the chat view opens and closes. Both approaches seem to lead to the same intermittent failures.

Has anyone else experienced anything like this with realtime being unreliable? I'm scratching my head about what I might be missing. Any thoughts or suggestions would be hugely appreciated! 🙏

subtle plover
#

appwrite for swift, version 8.0, using appwrite cloud

woven cosmos
subtle plover
#

I’ve upgraded it, I do believe it improved.
but there are still some messages that fail to be received through realtime.
I’ll check the connections and the websockets
thanks.

#

does the user not being verified influence realtime?

subtle plover
#

Still trying to make the chat 100% reliable with realtime and some fetches to get the missing messages (when realtime fails) but now I am getting this log:
head(HTTPResponseHead { version: HTTP/1.1, status: 400 Bad Request, headers: Connection: close; Content-Length: 32; content-type: text/plain; charset=utf-8; x-served-by: cache-lis1490059 })
The operation couldn’t be completed. (Appwrite.WebSocketClientError error 400.)
request cannot have request body

woven cosmos
subtle plover
#

not really, still trying to see where I can check that. I am using appwrite cloud
however, I've managed to get the realtime back again. the client setEndpoint. I had changed it to "https://fra.cloud.appwrite.io/v1" and since then I got that error. when I put it back to https://cloud.appwrite.io/v1 it function normally.
although still with a few messages failing

little jackal
#

I have the same problem, since... ever I think. I use AppWrite cloud, and currently the flutter sdk 15.0.2 (latest).

_chatSubscription = _messagesRealtimeSubscription!.stream.listen((event) {
  log(event);
});

The stream is not always getting updated when documents are created in the collection. And it's random, days working, then stop working. And with all users. iPhone and iOS. I have this issue since I use flutter sdk 11.0.0 (and older cloud version).

#

I've checked the code, permissions, everything is right. Suddenly my chat stop working and I have nothing to do to get it to work.

#

It's happening right now... several collections (chat rooms) are not receving updates in listen

little jackal
#

I have tested now with a minimum code in javascript, and it's happening the same thing, I can create several docs, but just some is being delivered to the stream