Duy Lan Le
Duy Lan Le

Reputation: 288

Publish Blazor WASM error after update Visual Studio 2022 to 17.0.4

I'm having a weird issue with publishing my Blazor WASM project to Azure App Service after i updated my Visual Studio 2022 to version 17.0.4

I used the BrotliDecode to keep my Blazor WASM minimun size when downloading to user browser as Microsoft document mentioned in here

I did a clean and rebuild as normal then deploy it to my Azure App Service and I got the error

TypeError: Failed to execute 'arrayBuffer' on 'Response': body stream already read

and

blazor.webassembly.js:1 Uncaught (in promise) TypeError: Failed to execute 'arrayBuffer' on 'Response': body stream already read
at blazor.webassembly.js:1
at async blazor.webassembly.js:1
at async blazor.webassembly.js:1

The weird thing is this error only appear on the non www url, if I tried to use the www. in the url, the application work normaly. When I tried to go to the login on the Server which usually be "/Identity/Account/Login", It will redirect me back to the homepage. I'm a littble bit confuse here.

Edited: This error only happen in Google Chrome and only with url without www., my application run perfectly on Firefox, Edge, and Opera with or without www. Therefore, I'm not sure this is a Chrome issue or something wrong with my configuration.

Upvotes: 1

Views: 721

Answers (1)

Duy Lan Le
Duy Lan Le

Reputation: 288

For anyone looking for answers. I contacted Azure App Service team and this is a known issue and .NET team already working on this.

I resolve this by using this trick.

1/ Remove my Custom Domain without www. from Custom Domain in Azure App Service.

2/ Remove A record and TXT asuid on Godaddy from the Records section.

3/ Add forward domain to www.yourdomain.com

4/ Wait an hour for that forward to be completed.

5/ Remove that Forward from Godaddy.

6/ Remove A record created automatically by Godaddy for forwarding to www.yourdomain.com.

7/ Add a new Custom Domain on Azure App Service using a domain without www..

8/ Delete old Private Key Certificate of the domain without www. if you forgot to delete.

9/ Create a new Private Key Certificate for for the domain without www you just created in the last step.

10/ Add that new Private Key Certificate to the domain without www.

11/ Wait a few seconds/minutes to get it effective.

if you still got this issue, re-install Chrome will fix this isssue.

This is just a way to Trick Google Chrome to regconize your url. Forwarding and remove forward is how I resolve this.

Upvotes: 1

Related Questions