I called avatars.getInitials() after client.get() still getting a pure pink avatar
I could just use the name provided with client.get but I'm wondering if this is a bug or something
What version of Appwrite and what version of the SDK?
If you log in with someone else what do you see?
Wdym someone else? Appwrite v1.4.3 SDK v13 I think
I meant a different user account
Although actually I think this might be a 3rd party cookie problem...is your Appwrite endpoint a subdomain of your app? (e.g. appwrite.myapp.com for myapp.com)?
I'm using localhost
But how can it be a cookie problem when I can fetch user account and session?
I have tried logging out and in before
And is your Appwrite domain localhost too?
No
Development environment
But if it cookie problems, how does appwrite cloud handle it?
If you're using the same domain for your Appwrite instance and website, you will not face problems since it's the same domain, so it will be first party cookies. If not, it will be third party cookies and due to that it could fail
Then it's localhost
I use the same database both in dev and production lol
But I could just get the user account and use the name it provided
People set up custom domains in Appwrite cloud
Ah okay thanks. I'll try with all protection disabled later, and also check localStorage
I found the problem, and I think it should probably be documented. I have checked the network request and realised the request was being sent from /_next/image?url=xxx
. That means the cookies are not persisted because Nextjs use it's own image optimisation and sent a request from the server not the client. When I switch from next/image
's <Image />
to <img />
it worked fine.
Interesting..nextjs is such a pain 😜
haha, it's just image optimization, so I think it should be pretty common
[SOLVED] getInitials return empty avatar even when the user is logged in
Recommended threads
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...