So i am trying to use realtime in my appwrite nextjs client, i have the following code: ```ts useEffect(() => { const channel = 'databases..collections.'; console.log(channel, "About to subscribe") const unsubscribe = client.subscribe([channel], (res) => { console.log(res) if (res) { run("rooms", "GET"); // Re-fetch rooms when data changes } });
return () => {
unsubscribe(); // Cleanup function to prevent memory leaks
};
}, [Rooms]);``` and i don't see any log in the console of res when i update the data. I use nextjs server side for the appwrite sdk, and create API endpoints that i use to fetch and get data. so on the client side i try to use the realtime and yes i am importing from "appwrite" not "node-appwrite" here, i believe i set up everything correctly, cause after about an hour or 30 minutes i see this error in the image, so if it says realtime got disconnected it means it was connected, but the connection doesn't seem to work
That doesn't look like a valid channel. Look at the realtime docs for valid channels. Also, you can't use wildcards for realtime channels
Recommended threads
- executeFunction intermittently throws Fo...
Environment: Flutter app using the Appwrite Flutter SDK, calling executeFunction for [describe endpoint, e.g. live-stream-related function]. *Description*: Int...
- Appwrite DNS nameservers return SERVFAIL...
My custom domain demomanasa.online (and all its subdomains) stopped resolving with ERR_NAME_NOT_RESOLVED for all visitors. I have traced the failure to Appwrite...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...