0

I have just created a hosted blazor webassembly pwa project, which generates client, server and shared projects, all fine. I start the solution and everything runs fine.

But after I start to add small changes to the projects it stops working with a message like this:

"Failed to find a valid digest in the 'integrity' attribute for resource '' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked."

I search the net and stack overflow and find others having almost the same problem. Some can do clean and rebuild to solve this, but that's not working for me.

So, what is this? Why is this happening, totally useless?

Is it the PWA feature? Should I create a new solution without the pwa enabled?

Hasse Jansson
  • 41
  • 2
  • 3

1 Answers1

1

It started happening to me recently. Only on a published released solution. Not on local debug.

Clean+rebuild didn't work for me. I had to delete bin and obj folders from both Client and Server (note: tried client only and, it did not work but, did not try server only) then republish.

cf. Failed to find a valid digest in the 'integrity' attribute for resource in Blazor app

It now occurs each time I upgrade or downgrade a package.

I've done several tests and can confirm :

DLL are the right ones (SHA256 hash validated) on the server. the string in the blazor.publish.boot.json is the right ones. I was even able to get rid of the problem by reverting to the previous package version prior to the bug (which changes back the related entry in blazor.publish.boot.json). Which for me confirms a reference is not updated somewhere.

The only significant changes I've made recently are switching to VS2022 and .NET6. The bug appeared after I did my first successful publish on Azure through VS2022: 1st package upgrade after that triggered the bug.

D S
  • 258
  • 9
  • 25
  • Hi Did you find out? – VAAA Feb 10 '22 at 18:49
  • 1
    @VAAA : no still nothing. Actually, it seems to have got worst : now, even when I don't upgrade packages I have to delete obj+bin folders before publishing otherwise I have the same kind (similar signature) of issue. – MauOnStckOvf Feb 13 '22 at 03:42
  • Thanks,deleting bin/obj folder from Client and Server project worked for me. – SPDeveloper Jun 21 '22 at 09:38