Aspnetcore: Razor Components stops responding

Created on 2 Feb 2019  路  7Comments  路  Source: dotnet/aspnetcore

I have built a CRUD app with Blazor that I ported to Blazor Serverside and now Razor Components (with ASP.NET Core 3.0 preview2).

Since going serverside, I find intermittently that the app freezes and stops responding to user input. I have not yet had a chance to look into what is going on, but wonder if anybody else has experienced this and if it is a bug. My observations and thoughts are:

  • This never happened (across 8 months) with Blazor running in WASM
  • It started once I migrated to Blazor Server Side
  • The problem reasserted itself yesterday after I further migrated to newly released Razor Components
  • All RC controls on the page are totally unresponsive
  • I have a couple of JS driven controls that still seem to operate
  • I have not yet had an opportunity to attempt to locate the issue, and it is probably way beyond my technical skillset
  • I wonder however whether the RC SignalR connection to the RC components JS script in my browser breaks down
  • During some use sessions, multiple users experience this every 3 to 5 minutes, requiring each to restart the RC app (by refreshing the URL)
  • This is intermittent, and sometimes the app works smoothly
  • Stopping and starting my Azure App Service doesn't seem to do the trick

I will attempt to diagnose this next time it happens, but I am very curious to know whether this has been experienced by anybody else. I can grant access to the app to a team member if asked, although there is a commercial sensitivity to this.

Many thanks, Simon

area-mvc bug

Most helpful comment

The work that @javiercn and @pranavkm are doing at the moment change the unhandled exception behavior, so it should log the errors and as far as I know will no longer drop the whole circuit (connection). Longer term we have a whole set of work planned to deal with automatic reconnection for the case where the SignalR connection drops due to network issues.

Closing this because this work is already tracked elsewhere. Hope that sounds reasonable.

All 7 comments

I managed to capture information from the console (using Edge) when I got a crash. Sorry for having redacted the website's URL.

rc crash

Here is another mode of failure that I find from time to time, but mostly after the "Log In" button is pressed on my login splash screen at startup.

image

Looking into this I find the following:

  • My code has some bugs that have surfaced on the migration from Blazor (WASM) via Blazor Server Side to Razor Components: these are for me to fix
  • These bugs were that I attempted to access a non existent item in a collection via LINQ - this code is in the App project
  • Blazor (running in WASM) was resilient to this
  • Razor Components however loses its SignalR connection when one of these bugs gets hit, which is why I wondered if the bug was actually in Razor Components

My takeaway is that Razor Components might need to be more resilient so that it avoids losing its connection arising from App bugs. I'll leave it to the ASP.NET team to decide when to close this issue.

Razor Components is still great stuff though. Simon

Thanks for contacting us, @simonziegler.

  • Razor Components however loses its SignalR connection when one of these bugs gets hit, which is why I wondered if the bug was actually in Razor Components

@SteveSandersonMS, @javiercn what do we plan to do about this?

/cc @danroth27

The work that @javiercn and @pranavkm are doing at the moment change the unhandled exception behavior, so it should log the errors and as far as I know will no longer drop the whole circuit (connection). Longer term we have a whole set of work planned to deal with automatic reconnection for the case where the SignalR connection drops due to network issues.

Closing this because this work is already tracked elsewhere. Hope that sounds reasonable.

Thanks All. I'm happy to know that you are aware of this and have a plan. That's all I need.

Was this page helpful?
0 / 5 - 0 ratings