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
- Export, Import or Migration giving this ...
As you can see in yhe screenshot i am not able to export any data or export the data from tables. Also it is affecting the migration from appwrite to appwrite h...
- Project auto-blocked after load testing ...
Hi team 👋 My project has been automatically blocked with the message: "Project is currently blocked — Access to this project is restricted. Contact support if...
- App build crashing with "Internal error"
Hello Appwrite team! 👋 We are trying to deploy a Next.js application on Appwrite Cloud, but our builds are consistently failing. The deployment log successful...