Problem Summary I'm building a React Native app with Expo and trying to create profile documents in Appwrite when users sign up. I keep getting this error: Error: [AppwriteException: Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID.] What I'm doing: Using ID.unique() to generate document IDs for profiles Creating accounts successfully (that part works) Trying to create profile documents in a collection called "profiles" (using the collection name, not a UUID) The error happens even with ID.unique() generated IDs Key detail: I'm using the collection name "profiles" as the endpoint rather than a UUID collection ID, because I think that's what the newer Appwrite version wants. Code: const profile = await databases.createDocument( config.databaseId, config.profilesCollectionId, // This is "profiles" ID.unique(), // 20-char unique ID { authID: user.$id, username, displayName: displayName || "", email: user.email, } );
Recommended threads
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this
- AppwriteException: Invalid query: Query ...
```js console.log(typeof interaction.user.id) console.log(interaction.user.id) const user_check = await TablesDB.listRows({ databaseId: "db", ...