Skip to content
Back

TablesDB `updateRows` returns `database_not_found` on self-hosted Appwrite 1.9.0 with session client

  • 0
  • Self Hosted
  • Databases
  • Web
Egor Tabula
25 May, 2026, 12:06

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.0 and 24.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

TypeScript
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?

TL;DR
Developers using self-hosted Appwrite 1.9.0 encounter a `database_not_found` error when trying to update rows using `tables.updateRows`. This unexpected issue persists despite correct environment setup and existing tables. The expected row updates are not being executed as anticipated. Additionally, the error message suggests a database-related problem rather than a permission issue. The same session client successfully accesses other TablesDB data. The developers question if `tables.updateRows` is intended to work with row-level permissions in Appwrite 1.9.0 or if this issue is a known limitation.
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