im getting an error of "document with the request ID could not be found" the thing is that it actually exists and im making sure im calling it correctly, all the env variables defined are correct so i dont know what could be happening
I don't know if this has to do with the recent problems with the appwrite cloud going offline or my code..
heres a little explanation of my code:
when a user fills the form on my app to create an account (im using expo react native) it makes the following things:
- create the user on auth
- grab the $id of the response auth and then creates a document inside a collection called "users" which has some info about that user
- after the document in collection "users" is created, it then creates the plan document inside "plans" collection.
- and finally it sets the response of the auth to a useState called "user"
then after the useState of the "user" is set, it runs another useEffect to get the user document inside "users" collection, and thats when the error is happening, it says that it doesnt exists, but i console log the id and everything looks like it does exists, so maybe is an appwrite cloud problem or my code? any idea?
ohh or maybe I have to log in the user immediately after registering it?
im going to try that and see if thats the problem
I think I exceeded the number of attempts when testing, how can I increase the rate limiting for a bit on appwrite cloud?
You cannot increase the rate limit
Btw, I would create these other documents server side with an appwrite function
When you get a chance to test again, please check the network tab and share the details of the network request that failed
that's for security reasons?
I understand, how long does it take for the rate limiting to be reset?
It should say in the docs
I was able to try again, this time after creating all the documents, I log in the user to make sure it is not a permissions problem, but the same problem keeps showing up
i will share the network tabs
now I also have another thing that could be causing the problem...
in the collection "users" which is the one that is giving me the error of document with id not found, i have set permissions of create to anyone and users
and also have document security enabled, the thing is that when i go to the document that is recently created, it doesnt have permissions for that user automatically created... I remember that in previous appwrite cloud version if I activated document security, all the documents that were created automatically had read, update and delete permissions for that user. Could that be the reason why its giving me the error?
This is probably happening because you haven't logged in
What's the updated code?
i think the user does log in, because the first useEffect that has the account.get() retrives the user successfuly
heres the updated code:
- the last step calls to another function called loginAccount and passes the email and password
- and then the loginAccount function creates the email session and pushes the responde to the user state which triggers the useEffects that i have to retrive all the other documents
just for testing i put read to the any and the users to the collection "users" and it works and doesnt give the error of the document id not found, but obviously I wouldn't want to leave it in read for any or users, I prefer to have document security for that document with the permissions for that user but they are not being creating automatically
Why are you logging in after creating the documents?
your question made me wonder if after creating the account I had to log in the account and then create the documents and it worked
thank you very much steven, you are the goat<:appwritefire:823999000330895380>
hey steven, another question outside of this post, is it possible to increase the storage limit for my project, since I see that the free plan is 2 GB and the pro plan is not yet available, or how can I increase my storage limit for now until the plans come out?
yes, creating an account does not log you in. you must create a session.
there is no limit right now while we're in beta
Recommended threads
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- What Query's are valid for GetDocument?
Documentation shows that Queries are valid here, but doesn't explain which queries are valid. At first I presumed this to be a bug, but before creating a githu...