I have a database & collection pair set up with the database ID "Data" and the collection ID "Collection". They are set up with All users granted all access rights to the collection.
Database and collection are created & configured by a backend application (via the .net API). This application is able to create new documents in the collection just fine. However when the Angular-based client attempts to do so, it is met with the exception "AppwriteException: Database not found". This same client can see the documents created by the backend just fine, via a realtime subscription.
The frontend is registered on the (cloud.appwrite.io) dashboard as a web client with hostname set to "localhost" as I am just testing & developing locally for now.
The typescript attempting to create the document in the client is as follows:
async sendMessage (message: string)
{
this.error = null;
try
{
await databases.createDocument (
'Data',
'Collection',
ID.unique (),
{
sender: this.username,
contents: message
}
);
}
catch (error)
{
this.error = error;
}
}
Any idea what could be causing the error? Common pitfalls I should look out for?
Recommended threads
- Appwrite Sites: ERR_TOO_MANY_REDIRECTS o...
So, my domain was working perfectly fine with Vercel. I was using cloudflare CDN (still am) but CNAME was DNS-only. I switched over to appwrite, CNAME is still ...
- Charged after Downgrade
I downgraded from the pro plan last month, but it’s still trying to charge my card this month and my account has been restricted
- Sydney Cloud Sites: App Git deployment a...
Project ID: rentwize-db The app Site fails after the build completes with a missing build archive error. Site id: app Framework: TanStack Start SSR Output dir...