.NET 6 Blazor wasm app error "Body has already been consumed"
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Tracking
()
People
(Reporter: dr.philipp.rollmann, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(9 files)
|
96.63 KB,
image/png
|
Details | |
|
2.34 KB,
text/javascript
|
Details | |
|
1.39 KB,
text/javascript
|
Details | |
|
999 bytes,
text/html
|
Details | |
|
963 bytes,
application/octet-stream
|
Details | |
|
264 bytes,
text/css
|
Details | |
|
265 bytes,
application/octet-stream
|
Details | |
|
8.90 MB,
application/x-zip-compressed
|
Details | |
|
8.90 MB,
application/x-zip-compressed
|
Details |
Steps to reproduce:
I created a new Blazor wasm pwa project in Visual Studio 2022 and added an update notification, like it is described here:
https://whuysentruit.medium.com/blazor-wasm-pwa-adding-a-new-update-available-notification-d9f65c4ad13
I exactly followed the instructions but did not modify service-worker.js but service-worker.published.js because I wanted to test it in production. I also added the "periodically check for updates" mentioned at the bottom of the post.
I tested Chrome, Edge, Safari and Firefox with desktop browsers.
I also tested Chrome, Edge and Firefox with android browsers.
There was a similar bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1749298) but it was fixed, while I still get the same errors.
I also posted a question at Stack Overflow but think it's a bug and therefore decided to also create this bug report.
Actual results:
Android browsers:
Everything works fine in all browsers.
Desktop browsers:
Everything works fine in Chrome, Edge and Safari but not in Firefox. Firefox gets stuck at the loading screen and displays the errors shown in attached image.
Expected results:
When I upload an update, after a while, the service worker checks for updates and all browsers show the notification button. Clicking the button in Chrome, Edge and Safari results in reloading the updated page.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript: WebAssembly' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•3 years ago
|
Comment 2•3 years ago
|
||
I wonder if https://github.com/dotnet/aspnetcore/issues/42055 addressed that.
| Reporter | ||
Comment 3•3 years ago
|
||
I do not think, it is a .NET issue, because everything is fine in Chrome, Edge and Safari.
Comment 4•3 years ago
|
||
The Chrome experienced the same issue:
blazor.webassembly.js:1 TypeError: Failed to execute 'arrayBuffer' on 'Response': body stream already read
The code in the new versions of "blazor.webassembly.js" is different now due to this bug: https://github.com/dotnet/aspnetcore/pull/42918/files#diff-a5167572a221c4bbe4fa36e4e110b39011b6e8f547ce0ab8bdd204f55201f1c0L664
So I conclude that everything can work fine in other browsers by an accident, or iirc "application/wasm"+instantiateStreaming was not handled per spec in some browsers.
Comment 5•3 years ago
•
|
||
The setup per https://whuysentruit.medium.com/blazor-wasm-pwa-adding-a-new-update-available-notification-d9f65c4ad13 instructions is very complicated and can deviate from yours. Can you condense all exact steps you did here? Is it possible to just zip the published artifacts?
| Reporter | ||
Comment 6•3 years ago
|
||
| Reporter | ||
Comment 7•3 years ago
|
||
| Reporter | ||
Comment 8•3 years ago
|
||
| Reporter | ||
Comment 9•3 years ago
|
||
| Reporter | ||
Comment 10•3 years ago
|
||
| Reporter | ||
Comment 11•3 years ago
|
||
| Reporter | ||
Comment 12•3 years ago
|
||
| Reporter | ||
Comment 13•3 years ago
|
||
| Reporter | ||
Comment 14•3 years ago
|
||
Hm, I uploaded 2 different folders wwwroot to enable you, to deploy a website wherever you want and also to enable you to update it.
Next, I created a detailed "Steps to reproduce in Visual Studio 2022" and to keep it as simple as possible, I uploaded the modified files, so you would not have to modify the code but simply replace the files.
My last step was to check everything and suddenly everything worked fine in all browsers including Firefox. (So, everything I uploaded was unnecessary.)
Why did this happen? I don't know. The only thing I changed is switching from "release" update channel (Firefox 104) to "beta" (Firefox 105.0b7).
Comment 15•3 years ago
|
||
My last step was to check everything and suddenly everything worked fine in all browsers including Firefox. (So, everything I uploaded was unnecessary.)
Why did this happen? I don't know. The only thing I changed is switching from "release" update channel (Firefox 104) to "beta" (Firefox 105.0b7).
There is the mozregression -- if you have time you can check when/why everything started working
Comment 16•3 years ago
|
||
The severity field is not set for this bug.
:rhunt, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 17•25 days ago
|
||
Cleaning up old inactive bugs. Please re-open if this is still an issue.
Description
•