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

Failed to find a valid digest #40

Closed
Lima-Roberto opened this issue Jan 8, 2021 · 6 comments
Closed

Failed to find a valid digest #40

Lima-Roberto opened this issue Jan 8, 2021 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@Lima-Roberto
Copy link

Hi guys,

I'm having a problem only when I publish my app (details below), I think that this is stopping me to "install" the app using PWA, the weird thing is that on my local machine all works fine.

Could you please have any clue that might help me solve the issue?

Failed to find a valid digest in the 'integrity' attribute for resource 'https://***/BlazorWMS/_content/Blazorized.AdminLte.Content/plugins/raphael/.eslintrc.js' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked.
Unknown error occurred while trying to verify integrity.
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch

Thanks.

@Lima-Roberto
Copy link
Author

I problably found the reason of the failure, it's beacuse my browser returns http code 404 oh this particule js, maybe this is beacause the name starts with "."

I tried to load several files and all loading fine, except this
http://localhost:81/_content/Blazorized.AdminLte.Content/plugins/raphael/.eslintrc.js

Can you please change the name of this js (.eslintrc.js) and push an update?

Bellow the microsoft docs excerpt show what I'm talking

Diagnosing integrity problems
When an app is built, the generated blazor.boot.json manifest describes the SHA-256 hashes of your boot resources (for example, .dll, .wasm, and other files) at the time that the build output is produced. The integrity check passes as long as the SHA-256 hashes in blazor.boot.json match the files delivered to the browser.

Common reasons why this fails are:

The web server's response is an error (for example, a 404 - Not Found or a 500 - Internal Server Error) instead of the file the browser requested. This is reported by the browser as an integrity check failure and not as a response failure.

URL of the microsoft doc
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0#resolve-integrity-check-failures

@sjefvanleeuwen
Copy link
Owner

sjefvanleeuwen commented Jan 15, 2021

Publishing seems to work fine here. Not sure what your method of publishing is. In this case I have used the web publishing tool built into dot net.

The resulting demo website: https://blazorize-adminlte.morstead.nl/ is running wasm. This is the output and does not show integrity issues. Maybe you are publishing too many files than that are actually referenced. .eslintrc.js is a configuration file during development and should not be published.

image

@sjefvanleeuwen sjefvanleeuwen added the question Further information is requested label Jan 15, 2021
@sjefvanleeuwen
Copy link
Owner

This is the blazor boot.json behing the hosted one for your verification:
https://github.com/sjefvanleeuwen/blazor-adminlte/blob/gh-pages/_framework/blazor.boot.json

@Lima-Roberto
Copy link
Author

Thanks for the answer, I'll try to start a new projetct and see if the error persists.
I am publishing on VS 19.

@sjefvanleeuwen
Copy link
Owner

sjefvanleeuwen commented Jan 16, 2021

Raphael has been cleaned up in commit 8ab248a

nuget availabe at: https://www.nuget.org/packages/Blazorized.AdminLte.Content/3.0.7

@sjefvanleeuwen
Copy link
Owner

Please reopen this issue, if the problem continues to exist.

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

No branches or pull requests

2 participants