Repository navigation
Description
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=1325148
Build error leg or test failing: Tests: Helix x64 Subset 2 / Microsoft.AspNetCore.SignalR.Client.Tests--net11.0
Pull request: #65694
Error Message
{
"ErrorMessage": "Error when dispatching 'OnDisconnectedAsync' on hub",
"BuildRetry": true,
"ExcludeConsoleLog": false
}Description
TestServerTests.LongPollingWorks fails intermittently when the test host shuts down and OnDisconnectedAsync races with IServiceProvider disposal. The HttpConnectionDispatcher.ProcessDeleteAsync fire-and-forgets server-side connection disposal, so when the host tears down, DefaultHubDispatcher.OnDisconnectedAsync can attempt to call CreateAsyncScope() on an already-disposed ServiceProvider, throwing ObjectDisposedException.
Stack trace:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'IServiceProvider'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ThrowHelper.ThrowObjectDisposedException()
at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateScope()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.CreateScope()
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.CreateAsyncScope(IServiceScopeFactory serviceScopeFactory)
at Microsoft.AspNetCore.SignalR.Internal.DefaultHubDispatcher`1.OnDisconnectedAsync(HubConnectionContext connection, Exception exception)
at Microsoft.AspNetCore.SignalR.HubConnectionHandler`1.RunHubAsync(HubConnectionContext connection)
Fix in progress: #65457 catches ObjectDisposedException at the DI boundary in DefaultHubDispatcher.OnDisconnectedAsync.
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=1325148
Error message validated: [Error when dispatching 'OnDisconnectedAsync' on hub]
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 3/7/2026 10:12:12 PM UTC
Report
💡 View the full list in 🌐 Build Insights
| Build | Repository | Branch | Step Name | Log | Pull Request |
|---|---|---|---|---|---|
| 3145251 | dotnet-aspnetcore | internal/release/8.0 | Run E2E tests | 📄 | #69253 |
| 3143975 | dotnet-aspnetcore | internal/release/8.0 | Run E2E tests | 📄 | #69148 |
| 3140227 | dotnet-aspnetcore | Run E2E tests | 📄 | #68999 | |
| 3140143 | dotnet-aspnetcore | Run E2E tests | 📄 | #68992 | |
| 3138894 | dotnet-aspnetcore | Run E2E tests | 📄 | #68902 | |
| 3133482 | dotnet-aspnetcore | Run E2E tests | 📄 | #68600 | |
| 1672049 | dotnet/aspnetcore | release/8.0 | Run E2E tests | 📄 | #70413 |
| 1668643 | dotnet/aspnetcore | release/8.0 | Run E2E tests | 📄 |
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 32 |
Activity
MihuBot commentedon Mar 7, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):
Error when dispatching '"OnDisconnectedAsync"' on hubandFailed disposing connection#6149github-actions commentedon Mar 18, 2026
This test is being quarantined via PR due to continued intermittent failures. The test fails with
System.ObjectDisposedException: Cannot access a disposed object. Object name: 'IServiceProvider'occurring inOnDisconnectedAsyncafter the host shuts down.The root cause appears to be a race condition during host shutdown where the
IServiceProvideris disposed before the long-polling connection's disconnect handler completes. Quarantine PR is being opened to unblock CI.Quarantine TestServerTests.LongPollingWorks
Quarantine TestServerTests.LongPollingWorks (#65859)
Unquarantine TestServerTests.LongPollingWorks
Unquarantine TestServerTests.LongPollingWorks (#66367)
Fix test-quarantine unquarantine matching and re-quarantine detection (…