runtime: After upgrade to 8.0.0, setting AOT compilation to true breaks published Blazor app on Windows 10 if using LazyLoaded references
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
This is a corollary to this same issue that now has a workaround: https://github.com/dotnet/runtime/issues/95322. I’m breaking out a specific lingering problem with Windows 10 here.
In the mentioned issue 95322, AOT compilation breaks Blazor if it utilizes LazyLoaded references. This came about because in 8.0.0, now the WasmDedup setting in the csproj is set to true by default (historically was false). By inserting
<WasmDedup>false</WasmDedup>
into the csproj, the Blazor app loads and works as expected; but only on my Windows 11 VM on my development laptop.
I then tested the Blazor app on my Windows 10 sanity VM on my server, and it continues to exhibit breaking problems, which is quite strange given the following:
- The same IIS server is employed so the same code is delivered to both win 10 and 11’s browsers.
- Full browser cache clearance made no difference (chrome://settings/clearBrowserData, advanced, all time, all checks)
- Same versions (latest) of Chrome being used on both OS’s - Version 120.0.6099.71 (Official Build) (64-bit)
- Works perfectly in win 10 if Blazor app is published with AOT: false.
I hope this sufficiently isolates the issue to AOT:true and Windows 10. The specs for the Win 10 machine:
(Edition Windows 10 Pro
Version 22H2
Installed on 6/13/2022
OS build 19045.3693
Experience Windows Feature Experience Pack 1000.19053.1000.0)
Expected Behavior
Expect Blazor to work ubiquitously or nowhere, given the same published code and Chrome version. To have OS or possibly hardware distinctions that break the app, seems difficult to mitigate or predict.
Steps To Reproduce
Unfortunately I do not have the time resources necessary to carve out this issue
Exceptions (if any)
dotnet.runtime.8.0.0.14kkjimq5k.js:3 [MONO] DllImport error loading library '__Internal': ''.
dotnet.runtime.8.0.0.14kkjimq5k.js:3 [MONO] DllImport error loading library '__Internal': ''.
dotnet.runtime.8.0.0.14kkjimq5k.js:3 Uncaught (in promise) at Microsoft.AspNetCore.Components.WebAssembly.Services.DefaultWebAssemblyJSRuntime.__Wrapper_EndInvokeJS_15588484(JSMarshalerArgument* __arguments_buffer)
Error: EndOfStringNotFound LineNumber: 0 | BytePositionInLine: 38.
at Jn (https://mytesturl/_framework/dotnet.runtime.8.0.0.14kkjimq5k.js:3:31614)
at kr (https://mytesturl/_framework/dotnet.runtime.8.0.0.14kkjimq5k.js:3:35529)
at Object.<anonymous> (https://mytesturl/_framework/dotnet.runtime.8.0.0.14kkjimq5k.js:3:179811)
at Object.endInvokeJSFromDotNet (https://mytesturl/_framework/blazor.webassembly.js:1:44925)
at https://mytesturl/_framework/blazor.webassembly.js:1:2967
Jn @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
kr @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
(anonymous) @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
bn @ blazor.webassembly.js:1
(anonymous) @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
Ul @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
$func64254 @ dotnet.native.wasm:0xc9f023
$func69911 @ dotnet.native.wasm:0xdb0ea5
$func9630 @ dotnet.native.wasm:0x28a0c6
$func17491 @ dotnet.native.wasm:0x50028c
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b366
$func699 @ dotnet.native.wasm:0x802bf
$func55423 @ dotnet.native.wasm:0xb5b287
$func83132 @ dotnet.native.wasm:0x10783cd
$func84004 @ dotnet.native.wasm:0x10a8c1a
$func35064 @ dotnet.native.wasm:0x903931
$func60671 @ dotnet.native.wasm:0xc23212
$func3760 @ dotnet.native.wasm:0x10f429
$func20140 @ dotnet.native.wasm:0x594437
$func84003 @ dotnet.native.wasm:0x10a85b6
$func84002 @ dotnet.native.wasm:0x10a842a
$func84006 @ dotnet.native.wasm:0x10a8ea1
$func83081 @ dotnet.native.wasm:0x1072eb5
$func60670 @ dotnet.native.wasm:0xc22f1a
$func3759 @ dotnet.native.wasm:0x10f3e6
$func20148 @ dotnet.native.wasm:0x594757
$func83084 @ dotnet.native.wasm:0x10753b0
$func37773 @ dotnet.native.wasm:0x9901f7
$func60671 @ dotnet.native.wasm:0xc23212
$func37776 @ dotnet.native.wasm:0x9909ed
$func90237 @ dotnet.native.wasm:0x11fabb1
$func14207 @ dotnet.native.wasm:0x3e23f0
$func9580 @ dotnet.native.wasm:0x28765f
$func37624 @ dotnet.native.wasm:0x981b58
$func60671 @ dotnet.native.wasm:0xc23212
$func90089 @ dotnet.native.wasm:0x11f395f
$func37115 @ dotnet.native.wasm:0x9658f2
$func37120 @ dotnet.native.wasm:0x966219
$func60671 @ dotnet.native.wasm:0xc23212
$func88768 @ dotnet.native.wasm:0x11b051e
$func87855 @ dotnet.native.wasm:0x117fe8b
$func37143 @ dotnet.native.wasm:0x96a7c3
$func37122 @ dotnet.native.wasm:0x967477
$func22495 @ dotnet.native.wasm:0x64b257
$func60636 @ dotnet.native.wasm:0xc227a2
$func22232 @ dotnet.native.wasm:0x618aba
$func57147 @ dotnet.native.wasm:0xba9313
$func2660 @ dotnet.native.wasm:0xd192c
$func60634 @ dotnet.native.wasm:0xc226a9
$func22494 @ dotnet.native.wasm:0x64b1cd
$func60635 @ dotnet.native.wasm:0xc22788
$func272 @ dotnet.native.wasm:0x72692
$func17491 @ dotnet.native.wasm:0x500279
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b290
$func699 @ dotnet.native.wasm:0x802bf
$func55407 @ dotnet.native.wasm:0xb5ac45
$func4698 @ dotnet.native.wasm:0x141026
$func22288 @ dotnet.native.wasm:0x61bcb1
$func8159 @ dotnet.native.wasm:0x23502c
$func19344 @ dotnet.native.wasm:0x574d63
$func5132 @ dotnet.native.wasm:0x172389
$func3237 @ dotnet.native.wasm:0xf2167
$func6379 @ dotnet.native.wasm:0x1b6e5c
$func22476 @ dotnet.native.wasm:0x649e1c
$func3688 @ dotnet.native.wasm:0x10ac8d
$func37138 @ dotnet.native.wasm:0x969c96
$func22495 @ dotnet.native.wasm:0x64b257
$func60636 @ dotnet.native.wasm:0xc227a2
$func22232 @ dotnet.native.wasm:0x618aba
$func57147 @ dotnet.native.wasm:0xba9313
$func2660 @ dotnet.native.wasm:0xd192c
$func60634 @ dotnet.native.wasm:0xc226a9
$func22494 @ dotnet.native.wasm:0x64b1cd
$func60635 @ dotnet.native.wasm:0xc22788
$func272 @ dotnet.native.wasm:0x72692
$func17491 @ dotnet.native.wasm:0x500279
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b290
$func699 @ dotnet.native.wasm:0x802bf
$func55407 @ dotnet.native.wasm:0xb5ac45
$func4698 @ dotnet.native.wasm:0x141026
$func22288 @ dotnet.native.wasm:0x61bcb1
$func8159 @ dotnet.native.wasm:0x23502c
$func19344 @ dotnet.native.wasm:0x574d63
$func5132 @ dotnet.native.wasm:0x172389
$func4395 @ dotnet.native.wasm:0x130c1f
$func19404 @ dotnet.native.wasm:0x578756
$func58823 @ dotnet.native.wasm:0xbd26f5
$func69895 @ dotnet.native.wasm:0xdb03fd
$func69439 @ dotnet.native.wasm:0xd976a7
$func69858 @ dotnet.native.wasm:0xdae599
$func1186 @ dotnet.native.wasm:0x90815
$func17491 @ dotnet.native.wasm:0x500279
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b366
$func55333 @ dotnet.native.wasm:0xb58f70
$func55054 @ dotnet.native.wasm:0xb51406
$func11210 @ dotnet.native.wasm:0x305c74
$func2617 @ dotnet.native.wasm:0xcf49e
$func10629 @ dotnet.native.wasm:0x2dee35
$Yb @ dotnet.native.wasm:0xb4cfb1
Module._mono_wasm_invoke_method_bound @ dotnet.native.8.0.0.yeegl3ehmw.js:8
kr @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
l.javaScriptExports.complete_task @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
(anonymous) @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
Promise.then (async)
mo @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
(anonymous) @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
(anonymous) @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
Ul @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
$func64254 @ dotnet.native.wasm:0xc9f023
$func37139 @ dotnet.native.wasm:0x96a0c8
$func37138 @ dotnet.native.wasm:0x969b82
$func60671 @ dotnet.native.wasm:0xc23212
$func88785 @ dotnet.native.wasm:0x11b1021
$func37122 @ dotnet.native.wasm:0x96690f
$func60671 @ dotnet.native.wasm:0xc23212
$func37125 @ dotnet.native.wasm:0x9681a4
$func88770 @ dotnet.native.wasm:0x11b05a4
$func83093 @ dotnet.native.wasm:0x1076550
$func60670 @ dotnet.native.wasm:0xc22f1a
$func3759 @ dotnet.native.wasm:0x10f3e6
$func20148 @ dotnet.native.wasm:0x594757
$func34739 @ dotnet.native.wasm:0x8f65bf
$func1125 @ dotnet.native.wasm:0x8e4e8
$func17491 @ dotnet.native.wasm:0x50028c
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b366
$func55333 @ dotnet.native.wasm:0xb58f70
$func55054 @ dotnet.native.wasm:0xb51406
$func11210 @ dotnet.native.wasm:0x305c74
$func1337 @ dotnet.native.wasm:0x96b6d
$func16539 @ dotnet.native.wasm:0x4c9232
$func9194 @ dotnet.native.wasm:0x26df91
$func60890 @ dotnet.native.wasm:0xc2b424
$func57154 @ dotnet.native.wasm:0xba988e
$func11691 @ dotnet.native.wasm:0x322dd3
$func11688 @ dotnet.native.wasm:0x322158
$func60804 @ dotnet.native.wasm:0xc28995
$func60885 @ dotnet.native.wasm:0xc2afe4
$func69859 @ dotnet.native.wasm:0xdaebb6
$func1186 @ dotnet.native.wasm:0x90815
$func17491 @ dotnet.native.wasm:0x500279
$do_jit_call_indirect @ c7cbb3c6:0x56
$func11212 @ dotnet.native.wasm:0x3061d6
$func4970 @ dotnet.native.wasm:0x15b366
$func55333 @ dotnet.native.wasm:0xb58f70
$func55054 @ dotnet.native.wasm:0xb51406
$func11210 @ dotnet.native.wasm:0x305c74
$func2617 @ dotnet.native.wasm:0xcf49e
$func10629 @ dotnet.native.wasm:0x2dee35
$Yb @ dotnet.native.wasm:0xb4cfb1
Module._mono_wasm_invoke_method_bound @ dotnet.native.8.0.0.yeegl3ehmw.js:8
kr @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
l.javaScriptExports.call_entry_point @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
Nc @ dotnet.runtime.8.0.0.14kkjimq5k.js:3
callEntryPoint @ blazor.webassembly.js:1
hn @ blazor.webassembly.js:1
await in hn (async)
mn @ blazor.webassembly.js:1
Cn @ blazor.webassembly.js:1
_0x45e1b4.<computed> @ index.js:1
.NET Version
8.0.100
Anything else?
Version details
Chrome version on both Win 10 and 11 Version 120.0.6099.71 (Official Build) (64-bit)ASP.NET 8.0.0 Microsoft Visual Studio Professional 2022 Version 17.8.3 VisualStudio.17.Release/17.8.3+34330.188 Microsoft .NET Framework Version 4.8.09037
Installed Version: Professional
Visual C++ 2022 00483-00100-23601-AA172 Microsoft Visual C++ 2022
ASP.NET and Web Tools 17.8.358.6298 ASP.NET and Web Tools
C# Tools 4.8.0-7.23572.1+7b75981cf3bd520b86ec4ed00ec156c8bc48e4eb C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Mono Debugging for Visual Studio 17.8.17 (957fbed) Support for debugging Mono processes with Visual Studio.
NuGet Package Manager 6.8.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Razor (ASP.NET Core) 17.8.3.2358002+8c7fb27bf8e8d4f9ff8080b624b35bca5e812e97 Provides languages services for ASP.NET Core Razor.
.NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.8d38d0cc
Runtime Environment: OS Name: Windows OS Version: 10.0.22000 OS Platform: Windows RID: win-x64 Base Path: C:\Program Files\dotnet\sdk\8.0.100\
.NET workloads installed: Workload version: 8.0.100-manifests.8d38d0cc [wasm-tools-net7] Installation Source: VS 17.8.34330.188 Manifest Version: 8.0.0/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net7\8.0.0\WorkloadManifest.json Install Type: Msi
[maccatalyst] Installation Source: VS 17.8.34330.188 Manifest Version: 17.0.8478/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.0.8478\WorkloadManifest.json Install Type: Msi
[ios] Installation Source: VS 17.8.34330.188 Manifest Version: 17.0.8478/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.0.8478\WorkloadManifest.json Install Type: Msi
[android] Installation Source: VS 17.8.34330.188 Manifest Version: 34.0.43/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.43\WorkloadManifest.json Install Type: Msi
[maui-windows] Installation Source: VS 17.8.34330.188 Manifest Version: 8.0.3/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.3\WorkloadManifest.json Install Type: Msi
[wasm-tools] Installation Source: VS 17.8.34330.188 Manifest Version: 8.0.0/8.0.100 Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.current\8.0.0\WorkloadManifest.json Install Type: Msi
Host: Version: 8.0.0 Architecture: x64 Commit: 5535e31a71
.NET SDKs installed: 1.1.0 [C:\Program Files\dotnet\sdk] 2.0.2 [C:\Program Files\dotnet\sdk] 2.1.4 [C:\Program Files\dotnet\sdk] 2.1.101 [C:\Program Files\dotnet\sdk] 2.1.102 [C:\Program Files\dotnet\sdk] 2.1.104 [C:\Program Files\dotnet\sdk] 2.1.200 [C:\Program Files\dotnet\sdk] 2.1.201 [C:\Program Files\dotnet\sdk] 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.526 [C:\Program Files\dotnet\sdk] 2.2.109 [C:\Program Files\dotnet\sdk] 6.0.320 [C:\Program Files\dotnet\sdk] 8.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 29 (9 by maintainers)
As a sidenote, it would be a useful feature to allow both simd and non-simd code to be compiled together (at the cost of size), and blazor would just fail-over to non-simd code when appropriate.
I was actually hoping to include Win8 as a target demographic, not just for development purposes, but after reading your link about the performance increases on basic functionality, it’s a no-brainer to retain SIMD functionality and possibly pursue your dual-build recommendation.
To help those that hit this issue in the future, your link could be updated to also mention lack of compatibility with older OS’s such as win8 (server 2012 R2) and older, as bare metal or VM, and especially important to mention how ‘any’ type of OS VM under these older OS hosts will fail, which is really difficult to troubleshoot. And if possible more informative system errors to the console.
Thanks for all your patience and help through this challenging issue. Much appreciated.
Hi Maraf, thanks for following up. I’m working on this exact thing. The problem is it’s such a big interconnected app, that it’s difficult to dissect and still have a working product. Please allow me some time to try to isolate the issue