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
- HUGE OUTRAGE IN APPWRITE, I CANNOT ACCES...
I have 2k users trying to access, sending me messages. What am I supposed to do? Please solve this asap.
- All my apps are not opening now
All my apps are not opening now 200+ apps are not opening plz fast
- Failed to generate functions SSL
```appwrite-worker-certificates | Cannot renew domain (functions.domain.com) on attempt no. 9 certificate: Failed to verify domain DNS records. appwrite-worker...