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
- 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.
- Fine grained permissions for webRTC hand...
Hi, I am building a WebRTC P2P app for a university project and have hit a security limitation regarding permissions for anonymous users. The Architecture: We ...