Skip to content
Back

Realtime doesn't seem to work with TablesDB

  • 0
  • Web
  • Cloud
Zsombi
28 Mar, 2026, 07:35

Hi, I am trying to connect my tables rows with realtime on my react website, it connects, but I dont get the rows when a row is being created. I tried with Channels etc, but nothing seems to work.

TL;DR
Realtime functionality not working with TablesDB, despite correct code setup. Developers suggest checking and using correct channels for TablesDB specifically. Realtime connection keeps reconnecting but does not receive any messages. After extensive troubleshooting, it's discovered that the issue was related to permissions.
eldad
28 Mar, 2026, 07:41

2 common issues:

  • make sure you're using matching terminology to the one you use in your API (documents vs rows)
  • make sure your listening user have permissions to see the rows/documents that fire the events
Trevor Arapu
30 Mar, 2026, 11:08

I also have a android app in production with realtime active and it was working before but now it doesnt for the past 2 days when checked it out.

Trevor Arapu
30 Mar, 2026, 11:09

Even my webapp in production is failing as well

Arnab Chatterjee
30 Mar, 2026, 11:14

Can you share any error messages if coming?

Arnab Chatterjee
30 Mar, 2026, 11:39

I tested with my projects, I am able to connect and receive messages as well

Arnab Chatterjee
30 Mar, 2026, 11:40

I guess you are getting some error messages as well can you share them along with your projectid

Trevor Arapu
30 Mar, 2026, 13:59

okay cool

Trevor Arapu
30 Mar, 2026, 14:06

It shows the error and just loops contantly,

Trevor Arapu
30 Mar, 2026, 14:08

It keeps reconnecting constantly, but I never recieve anything when a database change is made

Trevor Arapu
30 Mar, 2026, 14:08

headers

Arnab Chatterjee
30 Mar, 2026, 14:19

check here whats in the messages tab

Trevor Arapu
30 Mar, 2026, 15:45

it seems to be empty

Arnab Chatterjee
30 Mar, 2026, 16:58

Feeling like it's not even hitting the realtime service 🤔

Can you check whether locally things working or not ?

Arnab Chatterjee
30 Mar, 2026, 16:58

Whether you are able to hit the realtime service or not

Trevor Arapu
30 Mar, 2026, 17:27

I was before and everything was working fine

Trevor Arapu
30 Mar, 2026, 17:28

with realtime perfect

Trevor Arapu
30 Mar, 2026, 17:28

can I share a code sample

Trevor Arapu
30 Mar, 2026, 18:12

But Calling the Api and getting initial data before firing up the realtime everything is working but the only issue comes from the realtime.

Trevor Arapu
30 Mar, 2026, 18:15

This is the setup 'import { defineStore } from 'pinia'

export const useRealtime = defineStore('realtime', { state: () => ({ subscription: null, started: false }),

TypeScript
actions: {
    async startWatch() {
        if (this.started) return

        const { realTime, Query } = useAppwrite()
        const forNotifications = useNotifications()
        // more stores here...

        const forUserCreds = useUserCreds()
        const forUserCredsId = computed(() => forUserCreds.mdV4UserId)
        const config = useRuntimeConfig().public

        const channels = [
            `databases.${config.APPWRITE_DB_ID}.tables.${config.APPWRITE_USERNOTIFICATIONS_COLL}.rows`,
            // more channels here...
        ]

        this.subscription = await realTime.subscribe(channels, (res) => {
            const row = res.payload
            if (!row) return

            const id = row.$id
            const eventsVals = Object.values(res.events)

            // NOTIFICATIONS
            if (forNotifications.handles(row)) {
                forNotifications.applyRealtime(id, row, eventsVals)
            }

            // more handlers here...

        }, [
            Query.or([
                Query.equal('userId', forUserCredsId.value),
                Query.equal('$id', forUserCredsId.value)
            ])
        ])

        this.started = true
    },

    endWatch() {
        if (this.subscription) this.subscription.close()
        this.subscription = null
        this.started = false
    }
}

})'

Ibaraki Douji
31 Mar, 2026, 08:32

i think your using wrong channels : https://appwrite.io/docs/apis/realtime/channels your showing databases but it's tablesdb

Ibaraki Douji
31 Mar, 2026, 08:33

it's possible that appwrite realtime force disconnect you if no channels match or if your using non-existing ones

Trevor Arapu
31 Mar, 2026, 09:54

Could be but the thing is, all this was working perfectly until a few days ago but let me check the docs. Thank you

Trevor Arapu
31 Mar, 2026, 09:59

i switched from databases to tablesdb but still

Trevor Arapu
31 Mar, 2026, 10:00

is this what you meant tablesdb.${config.APPWRITE_DB_ID}.tables.${config.APPWRITE_USERNOTIFICATIONS_COLL}.rows

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more