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
- functions domain error
I cannot set up the domain for function I’m trying to add the domain api.example.com I can only use Cloudflare as the DNS provider because my domain provider do...
- Introducing new string column types made...
Adding new string types is hugely bennificial! Unfortunately it made the current column types not editable to change their types to the new longer field types.
- there is critical problem in this part
when user update the integer and double both get error not update or upload