Broken avatar on GHE (again)
Closed this issue ยท 13 comments
๐ Is there already an issue for your problem?
- I have checked older issues, open and closed
๐ Description
In a GHE situation, avatars for users are broken.
This seems similar to #564 but in fact is not.
Looking at the inspector tab, the src
for the image is correctly populated and points a valid image if I open it from my browser.
Incidentally, I have an amount of warnings as
reading cookie in cross-site context will be blocked in future Chrome versions
Whether that's the real problem or not...I am yet to understand. I cannot find any other error.
๐ช Steps To Reproduce
- Use in a GHE context
- GHE is 3.11
Gitify Version
5.7.0
Operating System
macOS
GitHub Account
GitHub Enterprise
๐ธ Screenshots
thanks for reporting @LunaticMuch
so to confirm, the avatar url returns a valid image, but renders as broken ๐ค
so to confirm, the avatar url returns a valid image, but renders as broken ๐ค
Yes. I checked the code, the console, but I can get my head around it. I only suspected the cookie, but also I cannot see the "relationship"
Puzzling indeed... together I'm sure we'll get to the bottom of it ๐ค
Any chance you are able to run gitify from the source code to see if that has the same issue? ๐ค
git clone
pnpm i
pnpm watch
pnpm start
I also wonder whether there's a network request for the image at all? Maybe there's a security policy that prevents the loading, for instance. Would need @LunaticMuch to check that, I don't have GHE to try to repro
@setchy and @bmulholland I can definitely help... give me a bit, feels more a debug I need to squeeze after work ๐
@setchy and @bmulholland I can definitely help... give me a bit, feels more a debug I need to squeeze after work ๐
absolutely! thank you again @LunaticMuch ๐
First debug session, following your guidance @setchy
- Console is empty. There's no reported error or warning. Actually nothing at all.
- I do not see any call for the image tracing the network... this quite interesting, but it feels weird the security policy. If the connection is not started, this should not be related to a policy. The policy might block the response, not opening a socket for the call
Looks like you have Detailed Notifications
enabled. In that case, you'll find the logic within src/utils/subject.ts
that enriches notifications with the most recent SubjectUser
(logic varies by notification type ie: Issues vs PullRequests vs Discussions, etc)
The default icons used for workflows (and as a default when no avatar available) are from the primer/octicons package
Perhaps a fix lies in setting the crossorigin attribute on the img tags...
https://www.geeksforgeeks.org/how-to-allow-cross-origin-use-of-images-and-canvas/
@LunaticMuch - when you said these urls load in a new tab, was that in an incognito/private or a regular instance?
@LunaticMuch - just wanted to confirm if you're still experiencing this issue?
Closing as stale. Happy to reopen if others report more details to help triage