
i am building a chat app but i notice if i leave chat app without using for a hour + realtime get disconnected and also if the user changes the IP then also realtime get disconnect whats the best method to check if realtime is working and reconnect it if not working.

When you listen to the stream, there's an onDone callback you can use to reconnect or whatever you want

ok let me check that

will on done get triggered if i call subscription.close() ?

I think so

if i switch ip ondone is not triggering when i switch back to same ip the message get delivered in realtime.

when i change internet ip and come back to same ip and try to post a data i am also hit with this error: AppwriteException (AppwriteException: general_argument_invalid, Invalid permissions
param: You can only provide up to 100 permissions. (400)) . what is this error ?

i am only give permission to 3 users to a document

maybe print the permissions before making the API call

what exactly is the real world use case for ip changing?

In chat if a customer is using broadband fiber connection if they loose a connection they get new ip when they reconnect

Wouldn't they disconnect from the internet so the web socket connection would close?

Not necessarily - some ISPs rotate customer IPs as often as twice a day.

for testing i switch between mobile network and broadband. when i switch realtime stop working. ondone or onerror no getting called. when i switch back realtime sometimes work and get all messages.

What version of the Appwrite SDK?

Appwrite 11.0.0 , when kept idle for a 4 hours realtime still works i think idle issue is fixed. But switching ip is the issue.

Soo is this not triggering on IP change?

Can you check if the onDone is being triggered?
Recommended threads
- "Memberships privacy" setting in 1.7.4
Hi everyone, I'm experiencing an issue with a clean self-hosted installation of Appwrite version 1.7.4. I previously used version 1.6.1, and if I remember corre...
- Function 404 error - Deployment with the...
I have a function in my Appwrite Cloud (free plan) project that cannot be accessed or deleted (404 in both UI and CLI). I'm stuck at the 5 functions limit and c...
- 1.6 to 1.7 does not work
Appwrite (self-hosted) stopped working after updating from 1.6.2 that was stable. Getting the general_server_error. Mentioning I fallowed all steps for upgrad...
