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

fetched icons fail in chrome when same-origin policy is present #1065

Open
elandorr opened this issue Dec 3, 2022 · 3 comments
Open

fetched icons fail in chrome when same-origin policy is present #1065

elandorr opened this issue Dec 3, 2022 · 3 comments
Labels

Comments

@elandorr
Copy link

elandorr commented Dec 3, 2022

I read #535, but that is only about the manifest itself.

With a same-origin CORP chrome devtools complains 'icon n failed to load'.

Their logger says:

t=1199 [st= 1]       +HTTP_TRANSACTION_SEND_REQUEST  [dt=0]
t=1199 [st= 1]          HTTP_TRANSACTION_HTTP2_SEND_REQUEST_HEADERS
                        --> :method: GET
                            :authority: foo.bar
                            :scheme: https
                            :path: /icons/512x512.png
                            ...
                            sec-fetch-site: cross-site
                            sec-fetch-mode: no-cors
                            sec-fetch-dest: image

even though a crossorigin attribute on the link to the manifest is given.

It should say sec-fetch-site: same-origin. If I turn off same-origin altogether, it works as expected.

Is this a bug in chrome, or am I missing something from the spec?

Firefox does not have this issue, their devtools show the images just fine. On Android a Chrome based fork I tried with also allows 'adding to homescreen' and shows an image. It's unclear whether that's just an upscaled favicon, though.

Cheers

@marcoscaceres
Copy link
Member

I think the spec is correct here and I think Chrome might be working as expected. However, someone might need to check one the Chrome side.

@dmurph
Copy link
Collaborator

dmurph commented Jul 21, 2023

I don't think I fully understand what is going on here, sorry. Do you have a demo page that we could look at?

@elandorr
Copy link
Author

This has been a while ago, so no demo page that could be shared, but here's a screenshot in case it was unclear where:
screenshot_20230722-145705

In Firefox it works, in Chrome it doesn't. There's nothing special about this setup. I tracked it down to the same-origin last year, nothing changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants