Skip to content

Ugly exception after closing the browser(firefox,chrome) with serverside-blazor, kestrel #14727

Closed
@mshobohm

Description

@mshobohm

The following exception was found in Console after closing the browser (running blazor serverside default application and kestrel):

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 POST http://localhost:5000/_blazor/disconnect multipart/form-data; boundary=----WebKitFormBoundaryPApGJ5QsMg4BlrRk 359
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint 'Blazor disconnect'
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint '/_blazor'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 25034.602300000002ms 101
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
      Executed endpoint 'Blazor disconnect'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished in 196.585ms 0
warn: Microsoft.AspNetCore.Server.Kestrel[0]
      Connection processing ended abnormally.
System.InvalidOperationException: Reading is already in progress.
   at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_AlreadyReading()
   at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
   at System.IO.Pipelines.Pipe.ReadAsync(CancellationToken token)
   at System.IO.Pipelines.Pipe.DefaultPipeReader.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1Connection.BeginRead(ValueTask`1& awaitable)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequestsAsync[TContext](IHttpApplication`1 application) 

It seems to happen with Chrome and Firefox but not with edge.

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-kestreltriage-focusAdd this label to flag the issue for focus at triage

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions