Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAL-252] Avatar icon not loading properly #5213

Closed
Udit-takkar opened this issue Oct 25, 2022 · 24 comments · Fixed by #5299
Closed

[CAL-252] Avatar icon not loading properly #5213

Udit-takkar opened this issue Oct 25, 2022 · 24 comments · Fixed by #5299
Assignees
Labels
🐛 bug Something isn't working

Comments

@Udit-takkar
Copy link
Contributor

image.png

From Linear-GitHub Sync

@harshsinghatz
Copy link
Contributor

@Udit-takkar Also the avatar is not getting updated from the profile section, I tried it with two accounts. Can you check it on your end?

@Udit-takkar
Copy link
Contributor Author

Yeah there seem to be some problems with the Avatar updating also. I'll be looking into this. Why is this happening.

@Udit-takkar
Copy link
Contributor Author

Yeah there seem to be some problems with the Avatar updating also. I'll be looking into it

@harshsinghatz
Copy link
Contributor

@Udit-takkar would you be picking that as well?

@Udit-takkar
Copy link
Contributor Author

@harshsinghatz yes. the avatar seem to block updating profile.

@harshsinghatz
Copy link
Contributor

Is it fixed? because rn it works fine on prod

@Udit-takkar
Copy link
Contributor Author

@harshsinghatz no try creating new account and the avatar won't load or try updating the image in /settings.

@harshsinghatz
Copy link
Contributor

Ok let me check

@harshsinghatz
Copy link
Contributor

@Udit-takkar Yeah, i did see and it's working unexpectedly

  1. For a new user, avatar doesn't show
    image
    but changing imgSrc from "https://app.cal.com/hello-world/avatar.png" to "https://cal.com/hello-world/avatar.png" works for some reason

  2. I don't know if this just from my end but in main branch when i am trying to change the avatar the request doesn't hit trpc server if the image is md5 encrypted. Whereas if it is a default avatar then it does

Can you check the diff between the current main branch and the prod, because this seems like a new issue

@Udit-takkar
Copy link
Contributor Author

  1. yeah the trpc request is not returning any result in the main branch. i don't understand why is it happening. maybe due to trpc v10

@harshsinghatz
Copy link
Contributor

Can you compare the main branch with the production?

@hariombalhara
Copy link
Member

@harshsinghatz Wrt your point-1. This seems like a cloudflare caching issue with cal.com only. With app.cal.com it works fine.
See this loom that clearly shows the issue. @baileypumfleet maybe Cloudflare needs some tweaking?

Wrt Point-2, the issue seems to be happening due to middleware. Deleting the middleware.ts file solves the issue and trpc mutation endpoint responds immediately.

@harshsinghatz
Copy link
Contributor

harshsinghatz commented Oct 29, 2022

@hariombalhara It seems both the domains have caching issues because earlier I saw problems with both the domains

Can you point out exactly what issue is middleware causing, is it like an infinite loop of redirects?
And also if we are sending the default image trpc endpoint responds, so is there any particular problem with the format of data(avatar)?

@hariombalhara
Copy link
Member

Middleware is simply not forwarding the request to next.js endpoint. It seems to be doing some processing of own and it's stuck there.

@hariombalhara
Copy link
Member

Okay, so it's a known Next.js bug. People are reporting it.
vercel/next.js#39593
vercel/next.js#39262

@harshsinghatz
Copy link
Contributor

That makes sense because after encryption the avatar data is around 225KB.
Should we prompt for some less bulky hashing technique?

But this issue wasn't present before, so an RCA would be needed for this (as this issue is only on main)

@Udit-takkar
Copy link
Contributor Author

@hariombalhara i am not sure if size is the issue here because i tried uploading avatar on prod and it worked fine and it returned a success response but when i tried uploading the same image on dev , the request did not return any response.

@Udit-takkar
Copy link
Contributor Author

discussion on similar topic here #5164

@Udit-takkar
Copy link
Contributor Author

now i think the avatar picture loading problem is fixed somehow. just tried creating new account and it seem to work fine.

Screenshot 2022-10-30 at 12 40 00 AM

@milospuac
Copy link
Contributor

Customers keep reporting this one today @udit

@Udit-takkar
Copy link
Contributor Author

yeah no idea what's the issue here.

@PeerRich
Copy link
Member

@leog @alannnc @hariombalhara can you look and help?

@hariombalhara
Copy link
Member

Opened a PR to fix it. Found the root cause for the issue.
https://github.com/calcom/cal.com/pull/5299/files

@PeerRich
Copy link
Member

PeerRich commented Nov 1, 2022

@milospuac can you ask them to try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants