
So I am building a project management web app with react and next js and using appwrite as my backend. I am getting an error in uploading comment to this database. I have put all the auth functionalities into a context hook so that I can extract them whenever I want to use them. Here is the auth context function, I use a custom hook for later usage.

I use a state variable to track the session and the current logged in users credentials. Later I extract it in other components so that I can get the user ID. I can get the user ID in the console but for some reason when I extract it in the code and pass it on as a schema to the DB it gives an error that the user ID is missing. Here are the images of the error and user ID in my code.

Now here is some more code. I also use a context hook based approach to pass on the functionalities of a database to child components whenever they need to. Then I extract the funcitionality and then try to pass it to the database like the code img given below.

Now here are some screenshots of the networks tab and the pattern of the collections in the DB.

I know this is a very long question but I have been dealing with this for the last two months, I even changed my tech stack because of this dumb error and it still does not go away
Recommended threads
- Persistent TypeError: object dict can't ...
Subject: Persistent TypeError: object dict can't be used in 'await' expression with Appwrite Python SDK 11.0.0 (Databases Service) Hello everyone, I'm develop...
- FRANKFURT SERVER ERROR 500
Server is down.. Cant contact support (even got error on submitting)
- Realtime Disconnects and Error: INVALID_...
Hi Support, we are still experiencing the issue and we are a subscriber on your platform under the account of charlesbcalague@gmail.com I just want to ask here...
