Back

Getting Database not found error

  • 0
  • Flutter
  • Web
  • Databases
  • Self Hosted
  • Users
D5
3 Dec, 2023, 08:18
TL;DR
User is getting a "database not found" error. They have checked and confirmed that the project ID, collection ID, and database ID are correct. They have also activated the necessary permissions for the role and collection. Solution: Restart the Appwrite Docker container hosted in the Digital Ocean droplet for the changes to take effect.
tahakhawaja
4 Dec, 2023, 08:10

@D5 I just double checked this and as I mentioned above, the permissions for "create, read, update, and delete) have been activated for role "any". My collection is called "Users" and I have also create a role for all users in "Users" and set it to the same CRUD permissions. Should this address the issue, and will I need to restart the appwrite docker container hosted in my digital ocean droplet for these changes to take place?

tahakhawaja
4 Dec, 2023, 08:24

This is the current setting, yet I still get a database not found error @D5

D5
4 Dec, 2023, 08:31

Are you 100% sure the ID is correct?

D5
4 Dec, 2023, 08:33

In the code I don't see you have set endpoint, etc

tahakhawaja
4 Dec, 2023, 08:33

I had not included it in the text, but my endpoint is set at the top of the file

tahakhawaja
4 Dec, 2023, 08:34

The id is also correct, just double checked

tahakhawaja
4 Dec, 2023, 08:34

are you referring to setting the endpoint when creating the client?

D5
4 Dec, 2023, 08:35

And others ID are correct? (Project ID, collection ID...)

D5
4 Dec, 2023, 08:35

Yes

tahakhawaja
4 Dec, 2023, 08:35

yes the project id, collectionid, and database id are all correct

tahakhawaja
4 Dec, 2023, 08:36

I am not sure if this matters, but this is my setEndpoint:

Client client = Client() .setEndpoint('https://appwrite.demo.edventures.ai/v1')

tahakhawaja
4 Dec, 2023, 08:37

I am using v1

D5
4 Dec, 2023, 08:38

You have there . set project, true?

tahakhawaja
4 Dec, 2023, 08:38

.setProject('64cc49f9606136aab887') .setSelfSigned(status: true)

D5
4 Dec, 2023, 08:38

What do you get in logs, after running this? docker compose logs appwrite

tahakhawaja
4 Dec, 2023, 08:40
D5
4 Dec, 2023, 10:17

Remove self-signed

D5
4 Dec, 2023, 10:17

It's not needed in your case because you have a valid certificate

D5
4 Dec, 2023, 22:49

Sorry for the late response, this was not loading on my phone πŸ€¦β€β™‚οΈ

D5
4 Dec, 2023, 22:49

Are you using relationships?

tahakhawaja
5 Dec, 2023, 01:21

no worries at all! I really appreciate your help!

If by relationships you mean associating the user role with something like a userId then yes. For every user, they have a role associated with them stored in the database collection as "entrepreneur" or "coach" and it is also tied to their UserId.

D5
7 Dec, 2023, 09:05

Nope, I mean associating an attribute to another attribute element in a different collection

tahakhawaja
12 Dec, 2023, 13:28

We ended up fixing the issue, thanks @D5!

D5
12 Dec, 2023, 14:54

What was the solution?

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