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

Chrome for Android: Failed to find a valid digest in the 'integrity' attribute for resource. #26

Open
luisgabrielroldan opened this issue Dec 30, 2016 · 3 comments

Comments

@luisgabrielroldan
Copy link

The css file isn't loading and the console (Using remote device debugger) shows the next message:

Failed to find a valid digest in the 'integrity' attribute for resource 'http://www.flipthetomster.com/assets/flip-the-tomster-8bc5688c520eb191217150e20ef132b6.css' with computed SHA-256 integrity 'td/wn+TvUyHrtOt4R5NSqL8M8+AZFoLbwsX/CcsSeBY='. The resource has been blocked.

Browser: Chrome 55.0.2883.91
System: Android 6.0.1

@luisgabrielroldan
Copy link
Author

Investigating a bit more I found this issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=642928

That was the problem. After I disabled the Chrome Data Saver option, and cleared the cache the problem is gone.

So this only happens if the application is hosted over HTTP.

Ways to solve:

  • Don't use SRI attributes in the generated application.
  • Host the application using HTTPs.
  • Add "Cache-Control: no-transform" response header in the web server configuration.

@san650
Copy link
Member

san650 commented Jan 2, 2017

So, to understand the issue, because you were using Chrome Data Saver, it transformed the CSS files to compress it a bit more, making the integrity check to fail, is this correct?

I'll add the Cache-Control: no-transform header to avoid proxies to change the content.

@san650
Copy link
Member

san650 commented Jan 2, 2017

pagefront doesn't allow to configure the Cache-Control directive 😞 We need to disable the SRI attribute.

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

No branches or pull requests

2 participants