#Realtime got disconnected. Reconnect will be attempted in 1 seconds
1 messages · Page 1 of 1 (latest)
how often does it happen?
Every time
I mean every refresh
I mean this error is shown
Otherwise realtime working
Thats why i asked should i woryy?
Even realtime is working, this error is shown onevery refresh, when website is loaded
weird...im not sure why this would be happening. maybe something with your app code
yep, i am using Nextjs, dunno if i find the solution i will write here
What's your code?
actually i tried different things
"use client";
import { createAppwriteClient } from "@/lib/utils/appwrite-client";
import { envi } from "@/lib/utils/env";
type TabsProps = {};
const client = createAppwriteClient();
export default function Tabs({}: TabsProps) {
useEffect(() => {
const unsubscribe = client.subscribe(
[
`databases.${envi.NEXT_PUBLIC_HOPPLA_DATABASE_ID}.collections.${envi.NEXT_PUBLIC_USERS_COLLECTION_ID}.documents`,
],
(response) => {
// const payload = response.payload;s
console.log({
response,
});
this is last one
Browser refresh or hot reload?
server is running
and
when i refresh browser
it happens
it is the first message in console
i was in development mode
maybe its internet problem for me dunno
when i will try to use realtime, i will write here as well
currently i am working on other parts of project
Maybe it's because of react development mode that use effect is called twice and so the subscription disconnects and reconnects?
yep, maybe Strict Mode does that