You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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)
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 🤔
The avatar image was corrupted when a problem occurred connecting to the GHE Server.
Even if the connection is restored, it image will not be restored immediately. However, it will be displayed normally at some point.
Open/Close window, reload manually does not help. Open settings and return to the notifications list will recover the avatar image.
I hadn't really thought about it before, so there may be other cases where it is restored.
Sorry for my long absence, but I found generally that loading avatars with GHE is generally a big pain microsoft/vscode-pull-request-github#416
I found other countless threads that showcase the same issue. Do you maybe want to introduce fallback icons in case there is a 302?
Thanks @mislavperi - that's really interesting research you found.
I like the idea of adding some fallback logic to use a default icon. We have some similar logic for when a user profile doesn't have an avatar at all, so perhaps we can extend that for this unique use-case
@setchy I believe I found the issue. I investigate the request made for the avatar and came to the conclusion the authorization header is missing
I copied the request, added the authorization header and I got a 200 status code, I'll look into injecting the authorization header into the request for content
@setchy another update, turns out it's not the authorization but rather the cookie header that has to be set. I'm not sure that we can get that injected but I will further explore what can be done
Specifically, difference in cookies in web vs gitify
gitify
web version
my guess, is that PAT specifically doesn't get those since technically we are not logged, only using PAT. I'm not 100% sure how to work around this, I'll do a bit more research
Activity
setchy commentedon Jun 12, 2024
thanks for reporting @LunaticMuch
so to confirm, the avatar url returns a valid image, but renders as broken 🤔
LunaticMuch commentedon Jun 12, 2024
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 commentedon 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? 🤞
bmulholland commentedon Jun 12, 2024
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 commentedon Jun 12, 2024
@setchy and @bmulholland I can definitely help... give me a bit, feels more a debug I need to squeeze after work 😄
setchy commentedon Jun 12, 2024
absolutely! thank you again @LunaticMuch 🙇
LunaticMuch commentedon Jun 12, 2024
First debug session, following your guidance @setchy
setchy commentedon Jun 12, 2024
Looks like you have
Detailed Notificationsenabled. In that case, you'll find the logic withinsrc/utils/subject.tsthat enriches notifications with the most recentSubjectUser(logic varies by notification type ie: Issues vs PullRequests vs Discussions, etc)LunaticMuch commentedon Jun 13, 2024
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 🤔
setchy commentedon Jun 13, 2024
The default icons used for workflows (and as a default when no avatar available) are from the primer/octicons package
setchy commentedon 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 commentedon Jul 26, 2024
@LunaticMuch - just wanted to confirm if you're still experiencing this issue?
15 remaining items
pddg commentedon Nov 5, 2024
The avatar image was corrupted when a problem occurred connecting to the GHE Server.
Even if the connection is restored, it image will not be restored immediately. However, it will be displayed normally at some point.
Open/Close window, reload manually does not help. Open settings and return to the notifications list will recover the avatar image.
I hadn't really thought about it before, so there may be other cases where it is restored.
setchy commentedon Nov 5, 2024
Ah ha, that's helpful insight @pddg.
mislavperi commentedon Nov 5, 2024
@setchy In my case, it refuses to connect after initial configuration was defined, I'll spin up the instance locally and see why it might be happening
mislavperi commentedon Nov 27, 2024
Sorry for my long absence, but I found generally that loading avatars with GHE is generally a big pain
microsoft/vscode-pull-request-github#416
I found other countless threads that showcase the same issue. Do you maybe want to introduce fallback icons in case there is a 302?
setchy commentedon Nov 27, 2024
Thanks @mislavperi - that's really interesting research you found.
I like the idea of adding some fallback logic to use a default icon. We have some similar logic for when a user profile doesn't have an avatar at all, so perhaps we can extend that for this unique use-case
setchy commentedon Nov 27, 2024
@mislavperi - is this something you'd be interested in contributing back?
mislavperi commentedon Nov 27, 2024
@setchy gladly, I'll open a feature branch and play around it, see what might be the best way to implement it
mislavperi commentedon Dec 3, 2024
@setchy I believe I found the issue. I investigate the request made for the avatar and came to the conclusion the authorization header is missing

I copied the request, added the authorization header and I got a 200 status code, I'll look into injecting the authorization header into the request for content
mislavperi commentedon Dec 3, 2024
@setchy another update, turns out it's not the authorization but rather the cookie header that has to be set. I'm not sure that we can get that injected but I will further explore what can be done
mislavperi commentedon Dec 3, 2024
Specifically, difference in cookies in web vs gitify


gitify
web version
my guess, is that PAT specifically doesn't get those since technically we are not logged, only using PAT. I'm not 100% sure how to work around this, I'll do a bit more research
mislavperi commentedon Dec 3, 2024
@setchy do you think the app would benefit from logging into enterprise github instances directly?