dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.21k stars 9.95k forks source link

VS2022 v17.0.3: Blazor Web Assembly: ASP.NET Core Hosted: .Net 6: Publish: dotnet.timezones.blat: Failed to find a valid digest in the 'integrity' #39231

Closed vsfeedback closed 2 years ago

vsfeedback commented 2 years ago

This issue has been moved from a ticket on Developer Community.


[severity:I'm unable to use this version] [regression] [worked-in:17.0.2] Environment Details: Microsoft Visual Studio Professional 2022 (64-bit) | Version 17.0.3 | .NET 6 | Blazor Web Assembly PWA ASP.NET Core Hosted on IIS Server

  1. Publisg Blazor WASM PWA and hosting the same on IIS Server
  2. Access the Home page and on doing so Error in console will be displayed as follow:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://itms/TEST/_framework/dotnet.timezones.blat' with computed SHA-256 integrity 'MSlKZuLHfzsKLVF/3omAUcZ57QL0puRif12PGTAXwDY='. The resource has been blocked.

! [Screenshot 2021-12-15 125122.png] (https://aka.ms/dc/image?name=B2b66c03f625247c58eb8dc4fb9aa8e03637751588281422884_Screenshot_2021-12-15_125122.png&tid=2b66c03f625247c58eb8dc4fb9aa8e03637751588281422884)


Original Comments

Feedback Bot on 12/15/2021, 09:56 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Jatin Arya on 12/18/2021, 10:18 PM:

This issue is does exists in Visual Studio Version # 17.0.4 as well

Jatin Arya on 12/23/2021, 04:10 AM:

I followed the below work arounds in order to overcome this encountered issue:

  1. Updated .gitattributes file with following lines:
* binary
autocrlf=false
  1. From visual studio developer powershell, while at project root folder, execute the following git command
    git add --renormalize .

Workaround Source: https://github.com/dotnet/aspnetcore/issues/19796#issuecomment-643120015

  1. Deleted contents of OBJ and BIN folder from all sub-projects root folder:

Workaround Source: 1.https://stackoverflow.com/questions/61562422/wasm-dotnet-integrity-attribute-invalid-for-my-blazor-app-on-github-pages

  1. Clean & Republish the project

Said the above, hope MS does resolve the issue, so usage of the time consuming work-around is not required in-turn helps save time.

Thank you.


Original Solutions

(no solutions)

hoseinprg commented 2 years ago

Please read this documentation. Maby help you: https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-5.0#resolve-integrity-check-failures

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

ghost commented 2 years ago

Hi @vsfeedback. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

See our Issue Management Policies for more information.