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
- Dart runtime functions are timing out an...
My appwrite function is not executing at all and showing the error in error logs: I tried redeploying. Still no luck. I have set the function to ise maximum re...
- 403 The current user has been blocked.
Hello, I have a free plan; I've tried to access my project and I get the message "403 The current user has been blocked." I have database, sites, and auth in us...
- Am getting "The current user has been bl...
Was working on my app FLUTTER WEB APP, and suddenly, I have been blocked.... What can I do ? When I try to sign in to the console, I get "The current user has ...