Back

Realtime Websocket don't provide data.

  • 0
  • Flutter
  • Realtime
  • Cloud
andir
18 Jun, 2024, 13:34

I have a flutter web app which is connected to appwrite project "65633d388115278c6d23" in the cloud (free plan)

I use flutter "appwrite 12.0.4". I use a custom domain which is verified. The client and realtime point to my custom domain. GET and POST requiests works without issue.

Now, I like to listen to database changes in real-time which is (for me) randomly working or not working. I have multiple parallel listener for single documents or entire collections. Channels look like this:

  • databases.$dbId.collections.$colectionId.documents
  • databases.$dbId.collections.$colectionId.documents.$docId.

I tried:

  • providing the Realtime instance as singleton or not --> Same behavoir.
  • Override the Realtime endpoint to to: wss://cloud.appwrite.io/v1 --> Same behavoir.

Most of the time, there is just one websocket working (providing data over time). Some time the first initiated websocket works, sometimes the secound or third. It's also possible that no one works. The picture show the output of websocket which register itself successfully but never provide any value.

  1. Is there any posiblity to check if the appwrite cloud is working correctly on my project?
  2. What is the prefered way, one Realtime instance or multiple? The issue forcing multiple Realtime instances should be fixed with v12.0.4 (https://github.com/appwrite/sdk-for-flutter/pull/202/commits/9f62ab17a19be43b1db524b5fc7ac2a0b26da191)

Many thanks

TL;DR
- Developer has a Flutter web app connected to an Appwrite project in the cloud with real-time websocket issues. - Tried using single and multiple Realtime instances, but the behavior is inconsistent. - Questioning if Appwrite cloud is functioning correctly and inquiring about the preferred way to handle Realtime instances. - Proposed solution: Check Appwrite project functionality and consider using a single Realtime instance as per the SDK update in v12.0.4.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more