
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
- Need help setting up this error is showi...
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy. If you're the app developer, register the redirect URI in the Google Cl...
- Appwrite stopped working, I can't authen...
I'm having an issue with Appwrite. It was working fine just a while ago, but suddenly it stopped working for me and can't authenticate accounts. I even went bac...
- Fail to receive the verification email a...
I added my email address to prevent it from showing "appwrite," but now I'm not receiving emails for verification or password resets. The function appears to be...
