gitify: Broken avatar on GHE (again)

🔍 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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 35 (18 by maintainers)

Most upvoted comments

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

Specifically, difference in cookies in web vs gitify gitify image web version image 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

@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

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

@setchy gladly, I’ll open a feature branch and play around it, see what might be the best way to implement it

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

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.

image @setchy Still the same. I’m also struggling to open the inspect element for some reason

@setchy Yes I’ll get you those today

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?

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