Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HotReload fail 'ApplyHotReloadDelta' is supplied with exactly '4' parameters #45785

Open
markjackmilian opened this issue Jan 8, 2025 · 1 comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member

Comments

@markjackmilian
Copy link

Describe the bug

The Hot Reload feature in .NET 9 not works in Blazor WebAssembly project with browser error: Ensure that the call to `ApplyHotReloadDelta' is supplied with exactly '4' parameters.

To Reproduce

Can't reproduce on startup project, it happens on a project in production on every change on a blazor page.

Exceptions (if any)

In browser:
VM1977 aspnetcore-browser-refresh.js:152 ManagedError: Unexpected JSON token StartArray. Ensure that the call to `ApplyHotReloadDelta' is supplied with exactly '4' parameters.
at sn (marshal-to-js.ts:420:18)
at gn (managed-exports.ts:316:15)
at Object. (invoke-cs.ts:321:17)
at Object.invokeDotNetFromJS (blazor.webassembly.js:1:43918)
at v.invokeDotNetMethod (blazor.webassembly.js:1:3507)
at v.invokeDotNetStaticMethod (blazor.webassembly.js:1:3263)
at Qe._internal.applyHotReload (blazor.webassembly.js:1:52914)
at VM1977 aspnetcore-browser-refresh.js:150:35
at Array.forEach ()
at applyBlazorDeltas (VM1977 aspnetcore-browser-refresh.js:148:14)
overrideMethod @ hook.js:608
(anonymous) @ VM1977 aspnetcore-browser-refresh.js:152
applyBlazorDeltas @ VM1977 aspnetcore-browser-refresh.js:148
BlazorHotReloadDeltav2 @ VM1977 aspnetcore-browser-refresh.js:48
connection.onmessage @ VM1977 aspnetcore-browser-refresh.js:56

Further technical details

  • Include the output of dotnet --info

dotnet --info
.NET SDK:
Version: 9.0.101
Commit: eedb237
Workload version: 9.0.100-manifests.1e472b70
MSBuild version: 17.12.12+1cce77968

Runtime Environment:
OS Name: Mac OS X
OS Version: 15.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/9.0.101/

.NET workloads installed:
[maui-tizen]
Installation Source: SDK 9.0.100
Manifest Version: 9.0.0/9.0.100
Manifest Path: /usr/local/share/dotnet/sdk-manifests/9.0.100/microsoft.net.sdk.maui/9.0.0/WorkloadManifest.json
Install Type: FileBased

[maui-ios]
Installation Source: SDK 9.0.100
Manifest Version: 9.0.0/9.0.100
Manifest Path: /usr/local/share/dotnet/sdk-manifests/9.0.100/microsoft.net.sdk.maui/9.0.0/WorkloadManifest.json
Install Type: FileBased

[maui-android]
Installation Source: SDK 9.0.100
Manifest Version: 9.0.0/9.0.100
Manifest Path: /usr/local/share/dotnet/sdk-manifests/9.0.100/microsoft.net.sdk.maui/9.0.0/WorkloadManifest.json
Install Type: FileBased

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.0
Architecture: arm64
Commit: 9d5a6a9aa4

.NET SDKs installed:
7.0.312 [/usr/local/share/dotnet/sdk]
7.0.313 [/usr/local/share/dotnet/sdk]
7.0.316 [/usr/local/share/dotnet/sdk]
7.0.317 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
8.0.101 [/usr/local/share/dotnet/sdk]
8.0.401 [/usr/local/share/dotnet/sdk]
9.0.101 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.16 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.22 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.15 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.16 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
x64 [/usr/local/share/dotnet/x64]
registered at [/etc/dotnet/install_location_x64]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member labels Jan 8, 2025
@markjackmilian
Copy link
Author

I can confirm that reverting to version 8 works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

1 participant