-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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 in the 'integrity' attribute for resource Blazor Wasm #38668
Comments
Hi @brentminder. 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. |
I finally solved it! I had tried all of the things mentioned here and elsewhere, and none of it worked. What did work was using my ftp client (filezilla) and changing the transfer type from "auto" to "binary" (Transfer > Transfer Type > Binary). I don't see an option for doing this in VS2022, so I guess I'll use my manual ftp client solution for now. |
Thanks for contacting us. We're moving this issue to the |
Thanks @brentminder . This helps a lot. |
I'm having this exact same issue. My difference, deployment is performed using the |
Are you able to attempt a binary deployment like @brentminder to confirm if this is the same issue? I'm basing this off of the following in the docs:
|
@TanayParikh I can't find a way to do a binary deployment using the Publishing to a folder from Visual Studio on my workstation works fine. Is there a potential workaround to this for using the |
So publishing to prod from VS results in a working app, but publishing to prod from IIS Web App Deploy results in integrity check failures? To confirm, have you reviewed https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0#resolve-integrity-check-failures? |
Correct. Yes, I've viewed the page, but have not ran the script yet. I plan to do that tomorrow. |
Running the script produced the output below
This didn't make sense to me so I debugged it. I'm not very familiar with powershell scripting but you can see that line 34 assigned I updated line 34 to This looks like a legit bug: https://github.com/dotnet/AspNetCore.Docs/blob/9e522de12559795483a98730f21d5904e2ffcadd/aspnetcore/blazor/host-and-deploy/webassembly/_samples/integrity.ps1#L34 Here is some of the output after updating that line.
|
Thanks @alex-oswald. @guardrex have you had any issues with the script, is this something needing an update? Note:
@alex-oswald so the results show those files are in your IIS Deployed publish assets on the server, but not in the You had mentioned:
So does that mean you're getting a |
The script was provided to me for publication on ... I haven't used/tested it. I don't recall any error reports on it until now. @alex-oswald ... You can submit a PR against the script by editing ... ... or else I'll open an issue and take care of it on Friday. UPDATE (12/10): I've opened a doc issue at dotnet/AspNetCore.Docs#24260 and will fix the script today, Friday. UPDATE (12/10): PR is up for review. UPDATE (12/15): The PR was approved and merged. |
Yes, I've tried clearing out the folder before deploying. It did not make a difference. |
I mitigated this issue by adding a pipeline task to delete the previously deployed files before deployment. While this is not ideal, I wasn't sure what else to do. |
Hi All, I am experiencing the same problem since switching to .Net 6. I have an asp.net core 6 web app which prerenders WASM components. I deploy the application via VS2022 web deploy to an Azure App service. I get the same error since updating to the below version of VS2022 I have manually cleared the files on the FTP site using filezilla, I have checked that the file is returned with a status 200 from the server, and I have referenced the article you posted earlier. I am stuck, please help. |
Try uploading the files with filezilla in binary mode as I stated earlier.
…On Thu, Dec 16, 2021, 05:19 EquiAvia ***@***.***> wrote:
Hi All,
I am experiencing the same problem since switching to .Net 6. I have an
asp.net core 6 web app which prerenders WASM components.
I deploy the application via VS2022 web deploy to an Azure App service.
[image: image]
<https://user-images.githubusercontent.com/3167321/146352606-d07b2950-827d-4b37-a12e-3d57c2a1026c.png>
I get the same error since updating to the version of VS2022
[image: image]
<https://user-images.githubusercontent.com/3167321/146352648-aaa62c70-b5fb-4d6a-97ec-021c026eef84.png>
I have manually cleared the files on the FTP site using filezilla, I have
checked that the file is returned with a status 200 from the server, and I
have referenced the article you posted earlier. I am stuck, please help.
[image: image]
<https://user-images.githubusercontent.com/3167321/146353231-988fe889-d8ea-4f94-9f18-1d23d0f4d8c7.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38668 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6VZTTYBMWHZWA3A2HCDTDURG4MNANCNFSM5I4PT7OQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks Brentminder, that is okay for a one off, but we have a large number of deployments to do and we rely on the functionality. |
Can someone please confirm if the issue is specific to FTP & IIS Deploy scenarios from VS? Is publishing to a folder from VS generating the correct artifacts? If this is the case, can someone please share a binary log/ verbose msbuild log where the deployment fails to help with the investigation? Please remember to remove any sensitive content from the logs before uploading. Thanks! |
Hi @brentminder. 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. |
I just upgraded VS2022 (2022-04-12) with latest bits, created a new blazor wasm project, and published via the FTP server option within VS, and it works. I don't know about publishing thru the IIS path in VS. |
Hi @brentminder. 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. |
@TanayParikh What further feedback do you need from me? You didn't ask me anything. |
@brentminder @EquiAvia @alex-oswald would you be able to answer @vijayrkn's question above? |
Just to clarify, after you still facing this issue @brentminder? |
As I stated, I can verify the FTP path which I originally posted about, but I cannot state anything about the IIS path since I'm not using it, and someone else posted about it. You can close the issue as far as I'm concerned. Thanks. |
Thanks @brentminder . If any one else is running into this issue with IIS please share a binlog and I will be happy to take a look. We will go ahead and close this issue since you were the original poster and the issue is addressed for you. Thanks for the confirmation. |
Can anyone publish a new blazor wasm app and publish it to a domain successfully? I'm publishing within VS 2022 via FTP directly to my domain (not using CLI).
Fails:
.Net 6 blazor wasm app (vs2022) throws errors:
https://bugmonitor.com/blazor/
http://bugmonitor.com/blazor/
I'm getting:
Uncaught TypeError: Cannot read properties of undefined (reading 'register') at index.html:26
index.html:1 Failed to find a valid digest in the 'integrity' attribute for resource 'http://bugmonitor.com/blazor/wwwroot/_framework/dotnet.6.0.0.7vke5xwy70.js' with computed SHA-256 integrity '6+0cHoWrocTZHsJlI4Vt1HRaRoOkZ5m6QDd36EAAHxc='. The resource has been blocked.
Line 26 is the service-worker.js file which gets read, then blocked using https, but loads via http (looking at network files in F12/dev browser tools).
For reference, here's the page:
Works:
.Net 5 blazor wasm app (vs2019) on same domain works with https or http:
https://bugmonitor.com/mysleep
http://bugmonitor.com/mysleep
The text was updated successfully, but these errors were encountered: