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

Broken avatar on GHE (again) #1224

Open
1 task done
LunaticMuch opened this issue Jun 12, 2024 · 11 comments
Open
1 task done

Broken avatar on GHE (again) #1224

LunaticMuch opened this issue Jun 12, 2024 · 11 comments
Assignees
Labels
bug Something isn't working host:github-server Related to GitHub Enterprise Server

Comments

@LunaticMuch
Copy link

🔍 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

  1. Use in a GHE context
  2. GHE is 3.11

Gitify Version

5.7.0

Operating System

macOS

GitHub Account

GitHub Enterprise

📸 Screenshots

Screenshot 2024-06-12 at 10 39 10

@LunaticMuch LunaticMuch added the bug Something isn't working label Jun 12, 2024
@setchy
Copy link
Member

setchy commented Jun 12, 2024

thanks for reporting @LunaticMuch

so to confirm, the avatar url returns a valid image, but renders as broken 🤔

@LunaticMuch
Copy link
Author

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"

@setchy
Copy link
Member

setchy commented Jun 12, 2024

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

@bmulholland
Copy link
Collaborator

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

@LunaticMuch
Copy link
Author

@setchy and @bmulholland I can definitely help... give me a bit, feels more a debug I need to squeeze after work 😄

@setchy
Copy link
Member

setchy commented Jun 12, 2024

@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 🙇

@LunaticMuch
Copy link
Author

First debug session, following your guidance @setchy

  1. Console is empty. There's no reported error or warning. Actually nothing at all.
  2. 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

@setchy
Copy link
Member

setchy commented Jun 12, 2024

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)

@LunaticMuch
Copy link
Author

I need to dig into that, but from my initial testing, it's all fine.
Actually, the repo icon suffers of the same problem, but the default icon for the runners does not 🤔

Screenshot 2024-06-13 at 12 44 03

@setchy
Copy link
Member

setchy commented Jun 13, 2024

The default icons used for workflows (and as a default when no avatar available) are from the primer/octicons package

@setchy
Copy link
Member

setchy commented Jun 19, 2024

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?

@setchy setchy added the host:github-server Related to GitHub Enterprise Server label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working host:github-server Related to GitHub Enterprise Server
Projects
None yet
Development

No branches or pull requests

3 participants