Mobile
womp..i don't think the dev tools logs web sockets very well...
Are you maybe subscribing before the user has a valid session?
but it does work when i sign out of appwrite and sign in again
It could be something with the order of things being executed on app start up.
i am getting this in debug console - I/flutter (30045): subscription: null
Last url is null for some reason: https://github.com/appwrite/sdk-for-flutter/blob/54f30faa4a4fab2af0fe57c172550b288c9cbb4b/lib/src/realtime_mixin.dart#L43
how can i correct that
i just hot reloaded and it started working but then reloaded again and stopped working :_
there's some race condition going on with your app such that the connection is being closed while another one is trying to start (you're unsubscribing and subscribing in multiple places of your app. Try to use multiple realtime instances
wdym 'unsubscribing' ?
sorry, i mean when you call close() on the subscription
but i am not calling close() anywhere
Realtime subscription null
the web socket is closing for some reason 🤷🏼♂️
this is happening on app start ?
if this so then, check user id should not be null on startup or while calling subscription .this will remove the error. hope this will work
it worked, Thanks a lot dude!! @conqueror
[SOLVED] Realtime subscription null
i have the exact same problem and the exact same architecture but i am still to start a subscription at one place but not at other
Your realtime not working in user profile?
Or not even in user posts?
realtime is working properly when trying to load new posts but when i go to a userProfile the error shows up
Ah I’m also kinda stuck there but I haven’t looked into it that much , I will let you know when it’s done
ok thanks
Try using a different/new realtime instance.
Btw, it's best to create a new post in <#1072905050399191082>
Recommended threads
- login With OAuth Failed
login With OAuth Failed: when i cliick to login with any of the following (facebook, gmail or apple) am being redirected out of the app to enter my detail, afte...
- RealtimeResponseEvent Typescript Bug
Hello, could you please fix RealtimeResposneEvent, the one in realtime.ts have timestamp: string, but the one in client.ts have timestamp: number, and it causes...
- Realtime Docs are outdated
The Realtime docs are outdated.