[SOLVED] SDK is creating data in the Database collection but returning the error, general_unknown
- 1
- Databases
- Android
- Cloud
Hey, i Am facing an error in the database where authorised users are unable to perform any action, it just simply returns the error, the user is not authorised but on the console I can clearly see that the user is authorised. My application has a public profile where when a user signs up, a public profile is created, in the collection it is created but on the app it is returning an error that says server error, To be precise server error, code 500 version 0.11.46
And I have one collection which is open for all to read but still on that screen it is showing user unauthorised
Have you tried clearing the apps data and deleting any existing session on cloud console and trying it again. Also are the permissions document-level or collection-level?
Collection level read any and user create, and document level restricted to user itself with user's id
Tried everything
Same thing is happening with me, till 3-4 days earlier my code for saving new users was working but doesn't work now gives
type: 'general_unknown',
response: {
message: 'Server Error',
code: 500,
type: 'general_unknown',
version: '0.11.46'
}
Even when a collection is read to any it still showing error unauthorised
Other devs (web) have encounted the same issue and solved it by clearing the browser cache. It seemed to have been a session cache bug
nvm I got what I did wrong, it was the cache thing but to see if its something else I rewrote and messed up my queries, Thanks for repsonses 🙏
But I am facing it on Android, i deleted the complete app and reinstalled it still facing the issue
Did you also delete the session via the account's session tab in appwrite console
I'll try that
Showing this message
I assigned everyone to read but only user specific to update delete
So is it throwing the error on update or during read?
Also could you try creating a dummy collection and try to read from it?
During read
I have a collection which is open for all still it is showing user unauthorised
This is a head scratcher for sure 🤔
what's your project ID?
Also, do you have relationships on this collection?
Yes I do have few relationships with collection
Okay thanks @Steven, I got what I did wrong, Thanks for the response 🌟
Would you please share so others can learn as well?
Okay sure, So when a user signs up, On the app, the application creates a public profile and writes the data in the collection, but the public profile has relationships with other collections, and there weren't any roles assigned to it.So if anyone is using relationships, make sure related collections can be read by that particular user or all authenticated users(based on your requirement)
[SOLVED] SDK is creating data in the Database collection but returning the error, general_unknown
Recommended threads
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.
- Deploy function not working - 503
Hellon i get this error message, when i try to deploy a new version of a function <html><body><h1>503 Service Unavailable</h1>No server is available to handle...
- Error When load the website
Hi, I am getting this error whenever I reload my website please help me, I am using react Error: ** GET https://cloud.appwrite.io/v1/account 401 (Unauthoriz...