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

Blazor WebAssembly: Hot reload does not do any UI changes on macOS 11.7 (Apple M1) - .NET 6.0 Preview 7 #35524

Closed
ChristianWeyer opened this issue Aug 19, 2021 · 7 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-hot-reload This issue is related to the Hot Reload feaature

Comments

@ChristianWeyer
Copy link

Platform:

  • macOS 11.4
  • Apple M1, Rosetta installed
  • arch in Terminal: i386
  • .NET SDK 6.0.100-preview.7.21379.14 (i386)

Sample:

  • dotnet new blazorwasm
  • dotnet watch --verbose
  • Update HTML markup in Index.razor

Expected result:

  • UI change should be hot reloaded into the browser

Actual result:

  • Nothing happens in the browser
  • Console output:
watch : Started
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:5001
watch : Launching browser.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/christianweyer/Projects/BlazorWasmApp1
watch : Hot reload capabilities: Baseline.
watch : File changed: /Users/christianweyer/Projects/BlazorWasmApp1/Pages/Index.razor.
watch : Received 1 from browser in [Count: 1, MessageType: Binary, EndOfMessage: True].
watch : Received successful apply from delta applier.
watch : Hot reload of changes succeeded.
watch : Hot reload change handled in 234304.9791ms.

I saw this: #31947 - but it says it should have been fixed.

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-hot-reload This issue is related to the Hot Reload feaature labels Aug 19, 2021
@ChristianWeyer
Copy link
Author

Further observations:
The WebSocket connection is established from the browser. I can see the change being transported to the browser through wss.

There is also a brief gray popup... cannot read what it says, though.

Then, on the second change in the same file, there is an error.

In the browser:

dotnet.6.0.0-preview.7.21377.19.js:1 * Assertion at /__w/1/s/src/mono/mono/component/hot_reload.c:627, condition `<disabled>' not met

555042 @ dotnet.6.0.0-preview.7.21377.19.js:1
_emscripten_asm_const_int @ dotnet.6.0.0-preview.7.21377.19.js:1
$func5762 @ 008b64c6:0x13da3f
$func8425 @ 008b64c6:0x1a1d7b
$func3834 @ 008b64c6:0xc41f0
$func601 @ 008b64c6:0x13eae
$func206 @ 008b64c6:0x7032
$func98 @ 008b64c6:0x4da2
$func8282 @ 008b64c6:0x1989a8
$func4107 @ 008b64c6:0xd5a63
$func6305 @ 008b64c6:0x1510e0
$func5782 @ 008b64c6:0x13dde1
$func2270 @ 008b64c6:0x671b0
$func6847 @ 008b64c6:0x168e10
$func6664 @ 008b64c6:0x160079
$func3456 @ 008b64c6:0xaca88
$func473 @ 008b64c6:0x10fbf
$func6299 @ 008b64c6:0x150109
$func2545 @ 008b64c6:0x7e6dd
$func2270 @ 008b64c6:0x66a5e
$func6847 @ 008b64c6:0x168e10
$func6664 @ 008b64c6:0x160079
$func3456 @ 008b64c6:0xaca88
$func666 @ 008b64c6:0x1595d
$gb @ 008b64c6:0x15cabf
Module._mono_wasm_invoke_method @ dotnet.6.0.0-preview.7.21377.19.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19
invokeDotNetFromJS @ blazor.webassembly.js:1
p @ blazor.webassembly.js:1
e.invokeMethod @ blazor.webassembly.js:1
ye._internal.applyHotReload @ blazor.webassembly.js:1
(anonymous) @ aspnetcore-browser-refresh.js:122
applyBlazorDeltas @ aspnetcore-browser-refresh.js:120
BlazorHotReloadDeltav1 @ aspnetcore-browser-refresh.js:38
connection.onmessage @ aspnetcore-browser-refresh.js:45
Show 5 more frames
dotnet.6.0.0-preview.7.21377.19.js:1 * Assertion at /__w/1/s/src/mono/mono/component/hot_reload.c:627, condition `<disabled>' not met

555042 @ dotnet.6.0.0-preview.7.21377.19.js:1
_emscripten_asm_const_int @ dotnet.6.0.0-preview.7.21377.19.js:1
$func5762 @ 008b64c6:0x13da3f
$func8425 @ 008b64c6:0x1a1d7b
$func3834 @ 008b64c6:0xc41f0
$func601 @ 008b64c6:0x13eae
$func206 @ 008b64c6:0x7032
$func98 @ 008b64c6:0x4da2
$func8282 @ 008b64c6:0x1989a8
$func4107 @ 008b64c6:0xd5a63
$func6305 @ 008b64c6:0x1510e0
$func5782 @ 008b64c6:0x13dde1
$func2270 @ 008b64c6:0x671b0
$func6847 @ 008b64c6:0x168e10
$func6664 @ 008b64c6:0x160079
$func3456 @ 008b64c6:0xaca88
$func473 @ 008b64c6:0x10fbf
$func6299 @ 008b64c6:0x150109
$func2545 @ 008b64c6:0x7e6dd
$func2270 @ 008b64c6:0x66a5e
$func6847 @ 008b64c6:0x168e10
$func6664 @ 008b64c6:0x160079
$func3456 @ 008b64c6:0xaca88
$func666 @ 008b64c6:0x1595d
$gb @ 008b64c6:0x15cabf
Module._mono_wasm_invoke_method @ dotnet.6.0.0-preview.7.21377.19.js:1
managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet @ managed__Microsoft_AspNetCore_Components_WebAssembly__Microsoft_AspNetCore_Components_WebAssembly_Services_DefaultWebAssemblyJSRuntime_InvokeDotNet:19
invokeDotNetFromJS @ blazor.webassembly.js:1
p @ blazor.webassembly.js:1
e.invokeMethod @ blazor.webassembly.js:1
ye._internal.applyHotReload @ blazor.webassembly.js:1
(anonymous) @ aspnetcore-browser-refresh.js:122
applyBlazorDeltas @ aspnetcore-browser-refresh.js:120
BlazorHotReloadDeltav1 @ aspnetcore-browser-refresh.js:38
connection.onmessage @ aspnetcore-browser-refresh.js:45
Show 5 more frames
aspnetcore-browser-refresh.js:124 ExitStatus {name: "ExitStatus", message: "Program terminated with exit(1)", status: 1}
(anonymous) @ aspnetcore-browser-refresh.js:124
applyBlazorDeltas @ aspnetcore-browser-refresh.js:120
BlazorHotReloadDeltav1 @ aspnetcore-browser-refresh.js:38
connection.onmessage @ aspnetcore-browser-refresh.js:45

In the server console:

watch : File changed: /Users/christianweyer/Projects/BlazorWasmApp1/Pages/Index.razor.
watch : Received 0 from browser in [Count: 1, MessageType: Binary, EndOfMessage: True].
watch : Received failed apply from delta applier.
watch : Unable to handle changes to /Users/christianweyer/Projects/BlazorWasmApp1/Pages/Index.razor.
watch : Do you want to restart your app - Yes (y) / No (n) / Always (a) / Never (v)?

@ChristianWeyer
Copy link
Author

BTW: the same counts for a hosted Blazor WASM project.

@adityamandaleeka
Copy link
Member

Maybe this is related? dotnet/runtime#57643

@lambdageek
Copy link
Member

This is probably #34446 and dotnet/runtime#51126 (comment)

It's not dotnet/runtime#57643 because the content of Index.razor is rendered when the app first loads, so the method has already been executed once.

@ChristianWeyer
Copy link
Author

ChristianWeyer commented Aug 20, 2021

Just wanted to add: the change I did to test things was adding something like 'aaa' to the <h1> in the sample Index.razor.

@ChristianWeyer
Copy link
Author

FYI:
Just installed the nightly SDK 6.0.100-rc.2.21420.7: my hot reload scenario from above works there.

@lambdageek
Copy link
Member

Thanks for confirming, @ChristianWeyer.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-hot-reload This issue is related to the Hot Reload feaature
Projects
None yet
Development

No branches or pull requests

4 participants