-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Hi, I've got a colleague using our Blazor application who's often on a poor connection, hitting on errors during initial load of the app.
It's the latest .NET 10/Blazor Web template with most if not all of the client components set to 'InteractiveWebAssembly'. I don't know if it's relevant, but it uses 'ResourcePreloader' and '@assets to load all the scripts inc. blazor.web.js (as is standard in the current template).
The errors we're seeing crop up in the browser console are:
blazor.web.ax6tuj8tun.js:1 Error in mono_download_assets: CompileError: WebAssembly.compileStreaming(): section (code 10, "Code") extends past end of the module (length 97426166, remaining bytes 10092657) @+1367668
_r @ blazor.web.ax6tuj8tun.js:1
(anonymous) @ dotnet.yq4sd6a9j6.js:4
Unfortunately I'm not able to repro this myself so far. I'm guessing on a lossy connection that something is failing as it's doing whatever it's doing 'compileStreaming' here. Sometimes clearing the browser cache helps, other times not (maybe a red herring and simply down to the connection in the moment).
Is there anything that can be bolstered from a resilience/retry perspective for this type of problem? Is it possible that things can get stuck in this state until cache is cleared, or is this all down to connection?
Expected Behavior
It would be great if it could attempt to recover/retry for these kinds of issues.
Steps To Reproduce
I appreciate this is a challenging one, perhaps simulating low speed/high loss on a blazor web app with 'InteractiveWebAssembly' components?
Exceptions (if any)
blazor.web.ax6tuj8tun.js:1 Error in mono_download_assets: CompileError: WebAssembly.compileStreaming(): section (code 10, "Code") extends past end of the module (length 97426166, remaining bytes 10092657) @+1367668
_r @ blazor.web.ax6tuj8tun.js:1
(anonymous) @ dotnet.yq4sd6a9j6.js:4
.NET Version
10.0.103
Anything else?
This is on the deployed production application so IDE etc. not relevant.