Back

[SOLVED] 500, getting Server Error while trying to create new document

  • 0
  • Databases
Vedsaga
16 May, 2023, 09:21

seems same error even after restarting

TL;DR
The user was getting a 500 server error while trying to create a new document. They were also facing a permission error even though they had granted access to read, create, and update for all users. Eventually, they found that deleting the old document and creating a new one seemed to solve the issue temporarily. However, the problem started happening again after a few document creations. They also noticed an error message related to a missing table in the logs. The user sought further help and provided additional information about warnings they were receiving after restarting. The solution was not provided in the thread.
Vedsaga
16 May, 2023, 09:21

got to check logs now I guess

safwan
16 May, 2023, 09:21

let me know!

Vedsaga
16 May, 2023, 09:22

btw what is this Warning about after every restart, it only happening since I guess 1.3.0 update, I might be wrong I didn't noticed this earlier

TypeScript
WARN[0000] The "ew" variable is not set. Defaulting to a blank string.
WARN[0000] The "m" variable is not set. Defaulting to a blank string.
WARN[0000] The "ew" variable is not set. Defaulting to a blank string.
WARN[0000] The "m" variable is not set. Defaulting to a blank string.
WARN[0000] The "ew" variable is not set. Defaulting to a blank string.
WARN[0000] The "m" variable is not set. Defaulting to a blank string.
Vedsaga
16 May, 2023, 09:24
TypeScript
[Error] Timestamp: 2023-05-16T09:20:55+00:00
[Error] Method: POST
[Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents
[Error] Type: PDOException
[Error] Message: Table 'appwrite._3_' doesn't exist
[Error] File: @swoole-src/library/core/Database/PDOStatementProxy.php
[Error] Line: 64
Vedsaga
16 May, 2023, 09:24

saw these

safwan
16 May, 2023, 09:25

Not sure about this. Maybe one of the devs will be able to help

Vedsaga
16 May, 2023, 09:27

mm, I guess I try to dig deeper to see what is the cause

Vedsaga
16 May, 2023, 12:09

seems after couple of document creation it's started happening again... I just created the project from scratch and seems to still happen again

Vedsaga
16 May, 2023, 12:47

seems one pattern, so If I dont pass the child document then document is getting created but if child doc is passed then it will show error

Drake
16 May, 2023, 17:19

Did you delete anything when you recreated the project? How exactly did you recreate it?

I've seen this happen when things were deleted/modified such that the related collection IDs were incorrect or the related collections no longer exist

Vedsaga
17 May, 2023, 05:04

created new project from scratch... And, actually there should not be any issue with missing id I guess because it's 2 way link between, A <-> Z so, when try to link A -> Z is not working getting500 server error when try to link Z -> A side it's seems working..

Drake
17 May, 2023, 15:53

what do the docker logs for the appwrite container say for the 500 error?

Vedsaga
17 May, 2023, 15:54

I have checked it after yestarday, I will check it post back here

Vedsaga
17 May, 2023, 18:53

btw it seems to work now for some reason after I deleted old document and tried creating new to check logs

Vedsaga
17 May, 2023, 18:54

however now, wiredly getting permission error, even when i have granted the access to all user to read, create & update πŸ‘€

Vedsaga
17 May, 2023, 18:55
TypeScript
appwrite  | [Error] URL: /v1/databases/:databaseId/collections/:collectionId/documents/:documentId
appwrite  | [Error] Type: Appwrite\Extend\Exception
appwrite  | [Error] Message: The current user is not authorized to perform the requested action.
appwrite  | [Error] File: /usr/src/code/app/controllers/api/databases.php
appwrite  | [Error] Line: 3295
Drake
17 May, 2023, 18:55

it could be related collection

Vedsaga
17 May, 2023, 18:56

like collection relationship collection ? btw even for that have granted all 3 permissions

Vedsaga
17 May, 2023, 18:58

is it like mandatory to pass all the attributes while updating? or just passing only changed attributed works?

Drake
17 May, 2023, 19:10

only changed is fine

Drake
17 May, 2023, 19:10

even for all related collections? like pincode?

Vedsaga
22 May, 2023, 11:42

this solved...

Vedsaga
22 May, 2023, 11:42

[SOLVED] 500, getting Server Error while trying to create new document

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