Back

[SOLVED] Unable to Get Realtime event updates after subscribing.

  • 0
  • Databases
  • Flutter
NOTMVP
17 Apr, 2023, 22:52

Hi Guys. I just got started with Appwrite ( coming from firebase). I was trying to create a todo app to perfect Crud operations. After going through the documentation i noticed that to get realtime updates, i need to create a realtime instance and subscribe to it and listen to the stream. It Gives me a bunch of events. As per my understanding, whenever i am adding a document to my collection, an create event should trigger and i should handle logic accordingly. But in my case when testing, it's not streaming any event. I'm currently running appwrite in docker on my local host and below is the code snippet. Am i missing anything ?

TL;DR
User was having trouble getting realtime event updates after subscribing. They were using the incorrect collection name. The issue was resolved by using the correct collection name.
Drake
17 Apr, 2023, 23:03

hmm...can you double check your channel is correct:

TypeScript
databases.643315731d080c64122f.todos.todos.documents
NOTMVP
17 Apr, 2023, 23:13

Yep. Database id is correct. In database i’ve created a collection called todos with the collection id "todos".

NOTMVP
17 Apr, 2023, 23:17

I’ve even tried listening to databases..todos..documents but no luck

Drake
17 Apr, 2023, 23:18

Have you tried this?

TypeScript
databases.643315731d080c64122f.collections.todos.documents
NOTMVP
17 Apr, 2023, 23:20

Not really. I’ll try and report back. Thank you

NOTMVP
18 Apr, 2023, 01:00

Works like a charm. I used collection name instead of using "collections". Thank you for the quick resolution.

NOTMVP
18 Apr, 2023, 01:01

[SOLVED] Unable to Get Realtime event updates after subscribing.

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