Issue:

Getting the following error when trying to deploy a Blazor Web App on a new development computer.

Failed to find a valid digest in the 'integrity' attribute for resource 'https://xxxxx.azurewebsites.net/_framework/Newtonsoft.Json.dll' with computed SHA-256 integrity 'xxxxx'. The resource has been blocked.

Unknown error occurred while trying to verify integrity.

Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

Resolution:

You can verify that this is the issue by finding the file containing the SHAs and compare the SHA for the dll in question with the SHA from the error message. This file is called blazor.boot.json and is generated deep inside the obj-folder of your project folder. (mine was here: obj\Release\net6.0\win-x86\PubTmp\Out\wwwroot\_framework)

If was the issue, please try this:

  1. Close VS.
  2. Delete the obj and bin folders from all your projects. (the web project might be enough, but hey – can’t hurt)
  3. Start VS
  4. Rebuild solution.
  5. Try Publish again.

Sources:

https://stackoverflow.com/questions/69926878/failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource-in-blazo

Last modified: December 21, 2022

Author

Comments

Write a Reply or Comment