Blazor Server - Random error occuring "The list of component records is not valid."

See original GitHub issue

Hi,

We’re using Asp.Net.Core 3.1.0, got a Blazor Server website.

Occasionally we get an error in the browser console saying: blazor.server.js:15 [2020-01-06T11:22:02.989Z] Error: The list of component records is not valid.

But the trouble is I haven’t been able to work out why it appears, it seems like the signalr connection is being restarted as the console logs immediately before that line say:

[2020-01-06T11:22:02.785Z] Information: Normalizing '_blazor' to 'https://localhost:44303/_blazor'.
[2020-01-06T11:22:02.914Z] Information: WebSocket connected to wss://localhost:44303/_blazor?id=DpnlPPLrSkoFlbbF_TnHqg.
[2020-01-06T11:22:02.915Z] Information: Using HubProtocol 'blazorpack'.

I’ve got a feeling it’s when I’ve used the back button, but I haven’t been able to replicate the issue at all, it just randomly appears sometimes.

Can anybody give me a clue what could cause this issue? So i can try and manually replicate it?

The code that is throwing the error is in ComponentHub.StartCircuit, which looks to be called from the javascript function in CircuitManager.ts.startCircuit.

The javascript function is passing this parameter JSON.stringify(this.components.map(c => c.toRecord())) which is what is causing the error to be thrown, but i’m not sure where this list of components is coming from?

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gaffkinscommented, Feb 28, 2020

Hi, I have the same issue. I open blazor app, then I click back in browser to back google for example, on random time I click forward to back to blazor app. It’s very frustrating. Best!

1reaction
physix99commented, Feb 15, 2020

Hi,

Thanks for the response.

We are not using multiple servers, and i’m pretty sure the site did not restart between.

I have slightly narrowed it down, It seems to happen most when i’m using NavigationManager.NavigateTo(“currentUrl”, true) to refresh the page completely, then hitting the back button.

However it doesn’t happen every time and I have still not been able to fully replicate the issue.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blazor: The list of component records is not valid
It looks like error reporting in blazor is lacking - you should try to strip your component of functionality until you get rid...
Read more >
[Solved]-Blazor: The list of component records is not valid-blazor
This caused the list of component records error to be thrown sporadically by the blazor.server.js, causing the pages not to load and preventing...
Read more >
How to solve Blazor server throwing an error on page load
Ever since I've used Blazor I have found it will pop-up the error box ... Server Side Error: The list of component records...
Read more >
Handle errors in ASP.NET Core Blazor apps
This article describes how Blazor manages unhandled exceptions and how to develop apps that detect and handle errors.
Read more >
Getting Started with Blazor DataGrid Component
This section briefly explains about how to include Blazor DataGrid component in your Blazor Server App and Blazor WebAssembly App using Visual Studio....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found