You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to update a stacked bar chart that is being used in a dashboard every 5 minutes or so and also has the capability of being able to be manually refreshed whenever the user wants to. When calling chart.React() this is the error I am getting.
Cannot access a disposed object.
Object name: 'DotNetObjectReference`1'.
With a stack trace of:
at Microsoft.JSInterop.DotNetObjectReference1.ThrowIfDisposed()
at Microsoft.JSInterop.DotNetObjectReference1.get_Value()
at Plotly.Blazor.PlotlyJsInterop.d__3.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Plotly.Blazor.PlotlyChart.d__49.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
I also get this error rather frequently. Truthfully, I just wrapped it in a try/catch/do nothing and ignore it for now (Chart will update on my next cycle), but if there is a better solution I would love to hear it.
I am trying to update a stacked bar chart that is being used in a dashboard every 5 minutes or so and also has the capability of being able to be manually refreshed whenever the user wants to. When calling chart.React() this is the error I am getting.
Cannot access a disposed object.
Object name: 'DotNetObjectReference`1'.
With a stack trace of:
at Microsoft.JSInterop.DotNetObjectReference1.ThrowIfDisposed()
at Microsoft.JSInterop.DotNetObjectReference1.get_Value()
at Plotly.Blazor.PlotlyJsInterop.d__3.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Plotly.Blazor.PlotlyChart.d__49.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Code being used to update the chart:
if (_chart != null) { await InvokeAsync(async () => { await _chart.React(); }); }
This same code works fine for the Line (Scatter) charts for updating values in realtime/manual refresh.
The text was updated successfully, but these errors were encountered: