Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: Error Creating Document #7297

Closed
2 tasks done
Onunkwor opened this issue Dec 17, 2023 · 7 comments
Closed
2 tasks done

🐛 Bug Report: Error Creating Document #7297

Onunkwor opened this issue Dec 17, 2023 · 7 comments
Assignees
Labels
bug Something isn't working feature / relationships Fixes and upgrades for database relationships product / databases Fixes and upgrades for the Appwrite Database.

Comments

@Onunkwor
Copy link

👟 Reproduction steps

When i try to create a document witnin my following collection I get the error shown below
Screenshot 2023-12-17 234250
The Function responsible for creating this document is
Screenshot 2023-12-17 234635
I ids are logged In the console so I'm sure they are getting to the function with

👍 Expected behavior

It should add a document to my collection

👎 Actual Behavior

nothing happens and I get the 500 (Internal Server Error)

🎲 Appwrite version

Appwrite Cloud

💻 Operating system

Windows

🧱 Your Environment

app write version is 13.0.0,

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@Onunkwor Onunkwor added the bug Something isn't working label Dec 17, 2023
@Onunkwor
Copy link
Author

@stnguyen90

@stnguyen90 stnguyen90 added the product / databases Fixes and upgrades for the Appwrite Database. label Dec 19, 2023
@stnguyen90
Copy link
Contributor

stnguyen90 commented Dec 19, 2023

@Onunkwor, thanks for creating this issue! 🙏🏼

  1. Would you please provide your project ID?
  2. Are you using relationships?

@stnguyen90 stnguyen90 self-assigned this Dec 19, 2023
@kurtreicel03
Copy link

@Onunkwor, thanks for creating this issue! 🙏🏼

  1. Would you please provide your project ID?
  2. Are you using relationships?

I have exactly same issue with him
here's my project ID '657d9312c6cefd038f14'
i'm using relationship with two collection

Screenshot 2023-12-19 at 11 35 48 AM
Screenshot 2023-12-19 at 11 35 29 AM

@stnguyen90
Copy link
Contributor

@Onunkwor, would you please share the details about your collection? It seems like username is not a valid attribute.

@Onunkwor
Copy link
Author

Onunkwor commented Dec 19, 2023

@stnguyen90 I have a users collection and a following collection the following collection has a relationship with the users collection and I pass the id of the user into the collection. i fixed the user name attribute by the way thank you. my project id is 655222a9f32b9149584f.
Screenshot 2023-12-19 190115
Screenshot 2023-12-19 190227
(Screenshot 2023-12-19 192320)
Screenshot 2023-12-19 192529

@Onunkwor
Copy link
Author

@stnguyen90 At first, I thought the error was from Appwrite. So, whenever I made any changes to the relationship or my code, I would delete the entire collection and start over. I've done that 10 times or more (I make a lot of mistakes 😂).

Additionally, when creating the function to add a document to the collection, I initially passed userId and accountId instead of just user. This was because, at that time, I had only one attribute in my 'Following' collection, which is a relationship with my 'User' collection with the attribute key set to 'user'.
Screenshot 2023-12-19 203237

@stnguyen90
Copy link
Contributor

@Onunkwor, I'm seeing multiple errors about incorrect attribute keys being passed to Appwrite. Please make sure you're passing the correct attribute key.

Since there isn't anything wrong with Appwrite, I'm going to close this issue.

If you need additional help, please join us on Discord and create a support post there.

@stnguyen90 stnguyen90 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
@stnguyen90 stnguyen90 added the feature / relationships Fixes and upgrades for database relationships label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature / relationships Fixes and upgrades for database relationships product / databases Fixes and upgrades for the Appwrite Database.
Projects
None yet
Development

No branches or pull requests

3 participants