Skip to content
Sites Hackathon is live / Aug 29 - Sep 12
Back

Appwrite Cloud: general_unknown server error when getting documents

  • 0
  • Web
  • Cloud
Matteo G
27 May, 2023, 11:22

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

TypeScript
AppwriteException: Server Error
at Client.<anonymous> (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=031a04b0:844:17)
at Generator.next (<anonymous>)
at fulfilled (http://localhost:5173/node_modules/.vite/deps/appwrite.js?v=031a04b0:488:24)
TL;DR
The user is experiencing a general_unknown server error when trying to get documents in Appwrite Cloud. They receive a 500 error and are unsure of why. The user suggests creating a full text index and searching on it to resolve the issue. There are suggestions to check the project, database, and collection IDs, as well as the attribute name and query value. It is also recommended to try the request using Postman. The user also mentions a possible version error and suggests checking the network tab in developer tools for more information. There is no solution provided in the thread, but the issue seems related to index creation and search.
Bouahaza
27 May, 2023, 11:23

Via dev tools > network tab

Matteo G
27 May, 2023, 11:29

{"message":"Server Error","code":500,"type":"general_unknown","version":"0.10.21"} don't have more than this

Bouahaza
27 May, 2023, 11:31

Somethings like that ?

Matteo G
27 May, 2023, 11:31

that's what I sent

Bouahaza
27 May, 2023, 11:31

Perhaps it's a version error. Appwrite cloud use v 1.1x

Bouahaza
27 May, 2023, 11:32

Try with only one search ?

Bouahaza
27 May, 2023, 11:33

Control value of query ?

Matteo G
27 May, 2023, 11:33

oh! got a different error: Index not found: name

Bouahaza
27 May, 2023, 11:33

Try same request but from postman (so via rest / graphql api)

Bouahaza
27 May, 2023, 11:34

Oh yes, you create a compute index

Matteo G
27 May, 2023, 11:34

but if I input the name of the index, then I get: Query not valid: Attribute not found in schema: searchable

Bouahaza
27 May, 2023, 11:35

Check projectid & databaseid & collectionid ?

Matteo G
27 May, 2023, 11:36

project, database and collection is ok

Bouahaza
27 May, 2023, 12:01

searchable is the index key, you need to pass attribute name

Bouahaza
27 May, 2023, 12:01

For now I don't know why you've 500 error

Bouahaza
27 May, 2023, 12:02

FYI

TypeScript
[
    Query.search("name", query),
    Query.search("description", query)
]

=> AND condition

Bouahaza
27 May, 2023, 12:04

Perhaps solution should be to create a function wich concat description and name on new attribute, create fulltext index on this new attribute, and search on it ?

Matteo G
27 May, 2023, 12:10

if I use "name", then I get "Index not found". So I should have two separate indexes if I don't want to have that kind of attribute + function ? Both cases seem a bit unpractical, but ok...

Drake
27 May, 2023, 15:57

Is your problem resolved or do you have further questions?

Matteo G
27 May, 2023, 15:58

still have to try to implement the solution, but I believe it should work; no further questions

Bouahaza
27 May, 2023, 15:59

@Steven I try search on compute index (2 string fields) without success. Is this supposed to work, or do we need a single field for fulltext search?

Drake
27 May, 2023, 16:04

Ya...you might need a full text index with only the search attribute

Bouahaza
27 May, 2023, 16:14

attribute with or without 's' ?

Drake
27 May, 2023, 16:21

Without. If you get a 500, on self hosted, if you look at the appwrite logs, you'll see the error and it might say full text index is missing

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