Back

Persistent Duplicate Document Error in Appwrite Function Creation

  • 0
  • Self Hosted
  • Functions
hamed
1 Apr, 2024, 03:53

I encountered a server error while creating a function in appwrite. Although the repository was successfully created, attempts to connect the function directly to the repository resulted in another server error. Consequently, I deleted everything, including the repository, and tried creating a new function. However, the same server error persisted.

The appwrite logs indicated a duplicate document error, even though I had deleted everything. This confused me, as there shouldn't be any documents with the previous IDs. Interestingly, using a different ID for the function creation was successful. This raises the question: why was there a duplicate document error when no documents matched the previous IDs?

TL;DR
Developers are experiencing persistent duplicate document errors in Appwrite function creation, despite deleting everything. The error message indicates a duplicate entry for a key. Solution: Use a different ID for function creation to avoid the error.
hamed
1 Apr, 2024, 03:54
TypeScript
appwrite  | [Error] Line: 833
appwrite  | [Error] Timestamp: 2024-04-01T03:15:55+00:00
appwrite  | [Error] Method: POST
appwrite  | [Error] URL: /v1/functions
appwrite  | [Error] Type: Utopia\Database\Exception\Duplicate
appwrite  | [Error] Message: Duplicated document: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '65c8e921c47f043fad0f' for key '_uid'
appwrite  | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Adapter/MariaDB.php
appwrite  | [Error] Line: 833
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