TablesDB `updateRows` returns `database_not_found` on self-hosted Appwrite 1.9.0 with session client
- 0
- Self Hosted
- Databases
- Web
Hi Appwrite team! I’m seeing a strange issue with TablesDB bulk row updates on a self-hosted Appwrite instance.
Environment
- Appwrite self-hosted
1.9.0 - Next.js 14 / React 19
node-appwrite@22.0.0- Tried web SDK
appwrite@23.0.0and24.2.0
Table
- Database ID:
main - Table ID:
partner_links - DB/table exist; reads and other operations work
Problem
Calling tables.updateRows(...) from a server action with a session client fails:
txt Database with the requested ID 'main' could not be found. code: 404 type: database_not_found version: 1.9.0
Code
import { Client, TablesDB, Query } from "node-appwrite";
const client = new Client()
.setEndpoint("https://<self-hosted-domain>/v1")
.setProject("<project-id>")
.setSession("<user-session-secret>")
.setForwardedUserAgent(userAgent);
const tables = new TablesDB(client);
await tables.updateRows({
databaseId: "main",
tableId: "partner_links",
data: { isActive: false },
queries: [
Query.equal("$id", ["<row-id>"]),
Query.equal("tenantId", "<tenant-id>"),
Query.equal("isActive", true),
],
});
Observed The request fails with database_not_found for main.
Expected The matching rows should be updated, or if permissions are insufficient, I would expect something like user_unauthorized / 401 / 403, not database_not_found.
Additional context
The same session client can access other TablesDB data. I’m using row security. The row has user permissions like: read("user:<user-id>") update("user:<user-id>")
Question: is tables.updateRows expected to work on Appwrite 1.9.0 with a session client and row-level permissions? Or is this a known issue/limitation with bulk row endpoints in TablesDB?
Recommended threads
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...
- Some pages on the console are not workin...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). I identified that some pages are not working on the console. This is at least the case ...