I have a searches database and I listen to specific documents (the search the user created) by id to display the search results in realtime in my nextjs frontend. This part was working and I'm pretty sure I haven't changed any code there the last few months, but now I noticed that no events get sent on the websocket anymore.
Here's my code:
useEffect(() => {
console.log(initialSearch.$id);
const unsubscribe = client.subscribe(`databases.${db}.collections.${searchesCollection}.documents.${initialSearch.$id}`, (e) => {
console.log("update");
});
return () => {
unsubscribe();
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
This is the only event I receive in the browser console:
{
"type": "connected",
"data": {
"channels": [
"databases.project.collections.searches.documents.67d56cb800173a00b735"
],
"user": null
}
}
The permissions on my collection should also be fine
Recommended threads
- Cant get realtime working
Hey I nned some help with realtime a gain. I was using client.subscribe(...), and i found out that its depricated then i believe realtime.subscribe(...) is the ...
- Firebase app import
I'm **very** new to appwrite and I just set up appwrite with docker and I'm trying to import a Firebase app I have set up but it's erroring and I don't really k...
- Console infinite loading behind NginxPro...
Hi All, I am trying to get AppWrite to work behind NPM. I've followed the Medium guide to set proper headers, I've added my proxy configuration to NPM, and I ...