Failing to run document operations on sdk, succeeding in REST API with same apikey.
- 1
- Databases
- Flutter
- Self Hosted
- Web

Could someone point me in the right direction I'm going in cirlces. I have a problem with sdks and my self-hosted server in production (for ~3 years) I have been having issues with sdks where they start throwing a 404, from the python, node/Web or Dart/Flutter client or server sdks. This has carried over to the latest version of both server and sdks.
const appwrite = new Client()
.setEndpoint(APPWRITE_ENDPOINT) // Your API Endpoint
.setProject(APPWRITE_PROJECT) // Your project ID
.setKey(APPWRITE_API_KEY); // Your secret API key
const databases = new Databases(appwrite);
databases.listDocuments('content_db', 'post_col').then(console.log).catch(console.error);
databases.list().then(console.log).catch(console.error);
What's weird is that I can run other DB operations, like in the test code above above listing DBs work but subsequently listing documents fails with a document not found:
Listening on http://0.0.0.0:8000/
AppwriteException: Database not found
at _Client.call (file:///Users/tawandabrandon/Library/Caches/deno/npm/registry.npmjs.org/node-appwrite/17.0.0/dist/client.mjs:293:13)
at eventLoopTick (ext:core/01_core.js:177:7) {
name: "AppwriteException",
code: 404,
type: "database_not_found",
response: '{"message":"Database not found","code":404,"type":"database_not_found","version":"1.7.4"}'
}
{
total: 5,
databases: [
{
"$id": "content_db",
name: "content",
"$createdAt": "2023-03-15T06:48:23.060+00:00",
"$updatedAt": "2023-09-18T20:18:41.047+00:00",
enabled: true
},
{
"$id": "channel_db",
name: "channels",
"$createdAt": "2023-03-15T07:04:32.835+00:00",
"$updatedAt": "2023-09-18T20:18:41.051+00:00",
enabled: true
},
...
]
Recommended threads
- Vercel Deployment issue
I am trying to deploy my web project using vercel, but in the deployed link, it is fetching some of the attributes and for the rest it is giving "not found" err...
- REQUEST
Good evening, anyone has an idea on how to pass body to appwrite function using POSTMAN? this is how I've passed it : { "providerName": "adamu" } and I ke...
- Subject: Persistent 403 Forbidden Error ...
Problem Description: I am developing a web application where users can upload and then view images. While file uploads are working correctly (after resolving in...
