[PR #1210] [MERGED] Fix Tooltips Dispose/Close JSRuntime Invocations #2601

Open
opened 2026-01-29 18:19:35 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1210
Author: @ggomarighetti
Created: 10/21/2023
Status: Merged
Merged: 10/23/2023
Merged by: @enchev

Base: masterHead: bugfix/tooltips


📝 Commits (1)

  • 85689ab Catch JSRuntime invoke exceptions

📊 Changes

1 file changed (+16 additions, -3 deletions)

View changed files

📝 Radzen.Blazor/RadzenTooltip.razor (+16 -3)

📄 Description

Resume

Surrounded with try/catch block all dispose/close JSRuntime invocations by following trace:

warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
      Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
         at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at Radzen.Blazor.RadzenTooltip.Close()
         at Radzen.Blazor.RadzenTooltip.DisposeAsync()
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c_DisplayClass74_0.<<Dispose>g_HandleAsyncExceptions|1>d.MoveNext()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'ddd3ruk9hgbsR3wGvW1-UScDHLj7YJsjfH0P0OIqsLg'.
      Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed.
         at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args)
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at Radzen.Blazor.RadzenTooltip.Close()
         at Radzen.Blazor.RadzenTooltip.DisposeAsync()
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c_DisplayClass74_0.<<Dispose>g_HandleAsyncExceptions|1>d.MoveNext()

Evidence

Not required

Reference

Not required


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1210 **Author:** [@ggomarighetti](https://github.com/ggomarighetti) **Created:** 10/21/2023 **Status:** ✅ Merged **Merged:** 10/23/2023 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `bugfix/tooltips` --- ### 📝 Commits (1) - [`85689ab`](https://github.com/radzenhq/radzen-blazor/commit/85689ab27e3d1123b13c051be7ad9d617b6a4835) Catch JSRuntime invoke exceptions ### 📊 Changes **1 file changed** (+16 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenTooltip.razor` (+16 -3) </details> ### 📄 Description ### Resume > Surrounded with try/catch block all dispose/close JSRuntime invocations by following trace: ``` warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100] Unhandled exception rendering component: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed. Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed. at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Radzen.Blazor.RadzenTooltip.Close() at Radzen.Blazor.RadzenTooltip.DisposeAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c_DisplayClass74_0.<<Dispose>g_HandleAsyncExceptions|1>d.MoveNext() fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit 'ddd3ruk9hgbsR3wGvW1-UScDHLj7YJsjfH0P0OIqsLg'. Microsoft.JSInterop.JSDisconnectedException: JavaScript interop calls cannot be issued at this time. This is because the circuit has disconnected and is being disposed. at Microsoft.AspNetCore.Components.Server.Circuits.RemoteJSRuntime.BeginInvokeJS(Int64 asyncHandle, String identifier, String argsJson, JSCallResultType resultType, Int64 targetInstanceId) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, CancellationToken cancellationToken, Object[] args) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Radzen.Blazor.RadzenTooltip.Close() at Radzen.Blazor.RadzenTooltip.DisposeAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.<>c_DisplayClass74_0.<<Dispose>g_HandleAsyncExceptions|1>d.MoveNext() ``` ### Evidence > Not required ### Reference > Not required --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:19:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2601