Back

Server Error 500 accessing collection unauthenticated

  • 0
  • Self Hosted
  • Databases
  • Web
Ibaraki Douji
10 Apr, 2024, 11:57

So i have an appwrite collection with the permissions Read on Any (no document security)

When trying to access it I have an Error 500 when accessing it without any session :

TypeScript
{
    "message": "Server Error",
    "code": 500,
    "type": "general_unknown",
    "version": "1.5.3"
}

When using a session (tested known user or anon) it works.

After checking a little on the appwrite logs i saw that :

TypeScript
2024-04-10T11:49:50.227098245Z [Error] Timestamp: 2024-04-10T11:49:50+00:00
2024-04-10T11:49:50.227232385Z [Error] Method: GET
2024-04-10T11:49:50.227276118Z [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
2024-04-10T11:49:50.227304240Z [Error] Type: Utopia\Database\Exception
2024-04-10T11:49:50.227313388Z [Error] Message: Collection not found
2024-04-10T11:49:50.227319934Z [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
2024-04-10T11:49:50.227326562Z [Error] Line: 2623

Is it the normal way that should work ? (not sure cuz the log error)

I want to make my News collection public readonly for people to see them.

TL;DR
Error 500 when accessing unauthenticated appwrite collection. No session leads to a server error. Check log for "Collection not found". Solution: Ensure correct database and collection ID. Log error indicates collection not found, not normal behavior. Make News collection public readonly.
ideclon
10 Apr, 2024, 12:00

And the database ID and collection ID are definitely correct?

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