Blazor: Updating from 8.0.4 to 8.0.5 silently crashed our webapp due to caching of dotnet.js
vladimir-angelov-1337 opened this issue · 14 comments
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
We have a Blazor application that we are building with the docker image of the SDK targetting 8.0
This caused the docker image to silently change from 8.0.4 to 8.0.5 and our application stopped working unexpectedly, with console errors.
Upon further inspection we found out about the change.
dotnet.native.8.0.4.uy5lxmc247.js
dotnet.runtime.8.0.4.riehddozk1.js
Were changed to:
dotnet.native.8.0.5.noy87qpmp4.js
dotnet.runtime.8.0.5.s4tpo9pkiw.js
Which is fine. However the dotnet.js file was also changed, but due to lacking versioning and a hash, the browser still loaded the previously cached version and it would break the web application until we clear cache and allow for the new dotnet.js to load.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
MONO_WASM: TypeError: Cannot read properties of undefined (reading 'out')
at $l (https://staging.sbxcars.com/_framework/dotnet.runtime.8.0.5.s4tpo9pkiw.js:3:198913)
at ze (https://staging.sbxcars.com/_framework/dotnet.js:3:30895)
at https://staging.sbxcars.com/_framework/dotnet.js:3:30131
at async Object.create (https://staging.sbxcars.com/_framework/dotnet.js:3:34510)
at async https://staging.sbxcars.com/_framework/blazor.webassembly.js:1:43178
at async https://staging.sbxcars.com/_framework/blazor.webassembly.js:1:57722
at async hn (https://staging.sbxcars.com/_framework/blazor.webassembly.js:1:57325)
u @ dotnet.js:3
dotnet.js:3 Error in mono_download_assets: TypeError: Cannot read properties of undefined (reading 'out')
Q @ dotnet.js:3
10dotnet.runtime.8.0.5.s4tpo9pkiw.js:3 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'out')
at $l (dotnet.runtime.8.0.5.s4tpo9pkiw.js:3:198913)
at ze (dotnet.js:3:30895)
at dotnet.js:3:30131
at async Object.create (dotnet.js:3:34510)
at async blazor.webassembly.js:1:43178
at async blazor.webassembly.js:1:57722
at async hn (blazor.webassembly.js:1:57325)
blazor.webassembly.js:1 Uncaught (in promise) Error: Failed to start platform. Reason: TypeError: Cannot read properties of undefined (reading 'out')
at hn (blazor.webassembly.js:1:57366)
.NET Version
8.0.5
Anything else?
No response
We see no way to pin 8.0.5 in our build pipeline, so we are working around this by disabling cache for dotnet.js, but that seems unwise.