C
C#2mo ago
Uaz

Error when migrating from Legacy Blazor WASM into Blazor 8 ServerInteractive

Hellol, As in title I migrated project (Copy pasted old project files into new Blazor template). Page renders visually, but I have no interactivity and at startup I get error
blazor.web.js:1 [2024-09-23T10:57:23.330Z] Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.
log @ blazor.web.js:1
_stopConnection @ blazor.web.js:1
features.reconnect.transport.onclose @ blazor.web.js:1
_close @ blazor.web.js:1
stop @ blazor.web.js:1
_stopInternal @ blazor.web.js:1
await in _stopInternal
stop @ blazor.web.js:1
_processIncomingData @ blazor.web.js:1
connection.onreceive @ blazor.web.js:1
i.onmessage @ blazor.web.js:1
blazor.web.js:1 Uncaught (in promise) Error: Server returned an error on close: Connection closed with an error.
at fn._processIncomingData (blazor.web.js:1:60779)
at connection.onreceive (blazor.web.js:1:54030)
at i.onmessage (blazor.web.js:1:82175)
blazor.web.js:1 [2024-09-23T10:57:23.330Z] Error: Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'.
log @ blazor.web.js:1
_stopConnection @ blazor.web.js:1
features.reconnect.transport.onclose @ blazor.web.js:1
_close @ blazor.web.js:1
stop @ blazor.web.js:1
_stopInternal @ blazor.web.js:1
await in _stopInternal
stop @ blazor.web.js:1
_processIncomingData @ blazor.web.js:1
connection.onreceive @ blazor.web.js:1
i.onmessage @ blazor.web.js:1
blazor.web.js:1 Uncaught (in promise) Error: Server returned an error on close: Connection closed with an error.
at fn._processIncomingData (blazor.web.js:1:60779)
at connection.onreceive (blazor.web.js:1:54030)
at i.onmessage (blazor.web.js:1:82175)
3 Replies
Asao M
Asao M2mo ago
Hello sir, have you thought about updating the configuration in your new project's Startup.cs or Program.cs file to match what it was in your old project? I think that's a great idea, especially when it comes to settings like SignalR and Blazor Server. make sure you're adding the same middleware and registering the same services. You don't want to miss any crucial configurations that could affect how your app behaves. Um, It's always a good idea to double-check your settings when moving from one project to another, so review your Startup.cs or Program.cs file and make sure everything matches up with your old project.
Uaz
Uaz2mo ago
Yes, I did that. Meanwhile I found that I am probably victim of this issue https://github.com/dotnet/aspnetcore/issues/56813
GitHub
Uncaught Error: No interop methods are registered for renderer 1 · ...
Is there an existing issue for this? I have searched the existing issues Describe the bug Recently we upgraded our Blazor Server App from .NET 7 to .NET 8, before that, we never encounter below iss...
Uaz
Uaz2mo ago
And there are plans to fix that in .NET 10 ☠️
Want results from more Discord servers?
Add your server