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
- Current User is Not authorized
recreating same Thread
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...