So, I have the same problem as described here. The authentication setup follows this Appwrite tutorial.
Unlike the person from the topic above, I have a self-hosted Appwrite instance.
Here are the versions I’m using:
• Appwrite 1.6
• Nuxt 3.12
• Node 20.16
• Latest Appwrite SDKs
Authentication works fine on its own, but when I try to access a file that has read(users) permissions, I get an error.
I have an a_session cookie for the domain (I’ve tried different setups, e.g., localhost for both the frontend and self-hosted Appwrite, as well as Appwrite on stage-api.domain.com and the frontend on domain.com using the hosts file).
The cookies (a_session and a_session_console) are attached to the GET request, but the result is always the same: a 404 error, stating “you don’t have permissions”. Third-party cookies are enabled as well.
What else should I check? Sorry for duplicating the topic, but I still haven’t found a solution.
Look at the network logs in the browser for the request. See if the cookie is included in the headers or the cookies tab
they are included, as i was mentioned. in every request
yup )
I replaced parts of cookies with multidots just to make message shorter
"headers": {
"accept": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8",
"accept-language": "en,zh-CN;q=0.9,zh;q=0.8,ru;q=0.7,ko;q=0.6,en-GB;q=0.5,en-US;q=0.4,uk;q=0.3,pt;q=0.2",
"cache-control": "no-cache",
"pragma": "no-cache",
"priority": "u=2, i",
"sec-ch-ua": "\"Microsoft Edge\";v=\"129\", \"Not=A?Brand\";v=\"8\", \"Chromium\";v=\"129\"",
"sec-ch-ua-mobile": "?0",
"sec-ch-ua-platform": "\"macOS\"",
"sec-fetch-dest": "image",
"sec-fetch-mode": "no-cors",
"sec-fetch-site": "same-site",
"cookie": "a_session_666b23d5000a5c016b0f_legacy=eyJpZCI6IjY2NzA2NWE1.........iOTUxYWVlYTlhMTkzMDc2MGI0MjZhYzliM2QwYWVlNzJkNDBmYTNlODU3YmJlYTYzODMyZWI3MGJlYiJ9; a_session_666b23d5000a5c016b0f=eyJpZCI6Ij.........VlYTlhMTkzMDc2MGI0MjZhYzliM2QwYWVlNzJkNDBmYTNlODU3YmJlYTYzODMyZWI3MGJlYiJ9; a_session_console_legacy=eyJpZCI6IjY0OTMx..........QxZTJlNTc2MTQ5YmJmYTAyNGVjZmMxNDFkM2UxYjFjYTM5NGM2OThlMDY1YyJ9; a_session_console=eyJpZCI6IjY0OTMxZTllM2E3YmI1Z..........JlNTc2MTQ5YmJmYTAyNGVjZmMxNDFkM2UxYjFjYTM5NGM2OThlMDY1YyJ9; a_session_65255b5e286c4a640594_legacy=eyJpZCI6IjY1OGQ1.........YzJhZDZlNWZiYTcyNjJmOTQ4YzAzZWM1Mzg2MjA4ODkxNTFlMzNlNGE2Mjc1MDZjNmQ5MDVmYSJ9; a_session_65255b5e286c4a640594=eyJpZCI6IjY1OGQ.........2Mjc1MDZjNmQ5MDVmYSJ9",
"Referer": "https://travel.bitstarzhub.com:3000/",
"Referrer-Policy": "strict-origin-when-cross-origin"
},
"body": null,
"method": "GET"
});```
i also tried different options in platform settings e.g *, *domain.com. subdomian.domain.com etc
Deleting sensitive cookies
Do you have anything in front of your Appwrite instance?
they were not sensitive, but thanks.
no, nothing. no cloudflare or smth similar. pure nuxt js on local side and aws vps on appwrite
So you got this by looking at the browser developer tools and copying the request as fetch?
You're saying this request returned 404
yes, devtools, copy as fetch. yes, 404 also if i'm trying to visit direct link i have
"message": "The requested file could not be found.",
"code": 404,
"type": "storage_file_not_found",
"version": "1.6.0"
}```
and i'm sure that file is exist, coz it works with &mode=admin
and permissions is correct also
Recommended threads
- education plan not activated
Hi I have an edu id 13103046@iubat.edu but when I am trying to claim my plan and trying to logging with github where education student plan active. the appwrite...
- I'm getting an error on the console "j?....
On my self hosted instance version 1.8.1 the console is giving me this error when trying to view the rows for a table I recently created. My application is read...
- 500 simultaneous OAuth logins from the s...
Hi, I'd like to ask about rate limiting around Google OAuth login on Appwrite Cloud. **OVERVIEW** Service type: A PWA (web app) for members of a university clu...