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
- Framework categorization for Sites
Hello, I want to deploy my web app via Appwrite SItes. My web app is vite+reactjs. In the Appwrite docs, it creates a vite+react app, and chooses React from the...
- Attribute not found in schema on REST AP...
I'm querying a appwrite collection via the REST API on appwrite cloud 1.9.5 (no SDK) via a cloudflare worker and keep getting: ``` {"message":"Invalid query: A...
- Not allowed permission to upsert a prese...
```js const presenceID = ID.unique(); setPID(presenceID); const presence = await presences.upsert({ presenceId: presenceID, status: "online"...