Skip to content

Fail pending server JS interop calls when circuits disconnect - #68714

Open
imsouvik wants to merge 3 commits into
dotnet:mainfrom
imsouvik:investigate-blazor-jsinterop-disconnect-67479
Open

Fail pending server JS interop calls when circuits disconnect#68714
imsouvik wants to merge 3 commits into
dotnet:mainfrom
imsouvik:investigate-blazor-jsinterop-disconnect-67479

Conversation

@imsouvik

Copy link
Copy Markdown

Fail pending server JS interop calls when circuits disconnect

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)
Fail pending server JS interop calls when circuits disconnect

Description

Server-side JS interop calls are tracked in JSRuntime until EndInvokeJS receives the client result. If SignalR closes the connection before the result reaches EndInvokeJSFromDotNet, such as when the incoming JS interop result exceeds the receive message size limit, the pending call is never completed and only observes caller cancellation or timeout.

This adds a protected JSRuntime helper for derived runtimes to fail all pending async JS calls, and has RemoteJSRuntime use it when the circuit disconnects or transfers to another connection. It also rejects new JS interop calls while the circuit client is disconnected and attempting to reconnect.

Fixes #67479.

Testing

  • git diff --check: passed.
  • Not run: narrow local restore/build/test. The repo tooling hit Windows Schannel TLS failures while restoring packages from configured feeds in this environment. CI should be treated as the authoritative validation for the full test matrix.

@imsouvik
imsouvik requested a review from a team as a code owner August 22, 2026 18:29
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 22, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @imsouvik. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@imsouvik

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

@pavelsavara pavelsavara added area-blazor Includes: Blazor, Razor Components untriaged labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components community-contribution Indicates that the PR has been added by a community member untriaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sending more than 32K to localstorage Then Reading It Causes Circuit Deadlock

2 participants