Completed
Last Updated: 17 Dec 2021 13:07 by Rob
Release 2.30.0
Jason
Created on: 21 Sep 2021 09:02
Category: Grid
Type: Bug Report
18
TaskCancellation errors

Occasionally I am getting TaskCancellation errors such as:

[13:07:52 ERR] Unhandled exception in circuit 'hQsJqY3F4XbTbzQETSggJClg_e4YRyQkrKHFMHCXugM'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
   at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at Telerik.Blazor.Components.TelerikComboBox`2.Dispose()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__140_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)

 

===========

ADMIN EDIT

===========

The error is related to a Microsoft bug. It occurs one minute after some client component has been disposed.

The exceptions are not bypassed due to memory leak. The bug is expected to be fixed in .NET 6 and this will be respected for the Telerik components, so that the errors do not appear.

18 comments
Rob
Posted on: 17 Dec 2021 13:07

@Joana - Correct, we're still currently on 2.29. We'll be upgrading to 2.30 in our next Sprint, I'll report back if we're still seeing issues after upgrading.

 

Thanks,

 

Rob

ADMIN
Joana
Posted on: 17 Dec 2021 06:38

Hi,

@Jason, thank you for the follow-up. I am glad that the issue is not reproducible.

@Rob, could you please verify that 2.30 version is used in your code? Looking at the StackTrace it seems that the version is not 2.30.

Regards,
Joana
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
Jason
Posted on: 14 Dec 2021 17:55

Joana,

I need to apologize, but I think we are no longer seeing the issue with 2.30.  In case something changes, I will respond in this forum

Thanks,

Jason

Rob
Posted on: 13 Dec 2021 14:05

We're still seeing them as well (.Net 5 Blazor Server) in regards to the TelerikSwitch control.

 

fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'dW4zhU7IzNKWHPe1nin3QpS_BZx9X4KEWvIJbAXPcvI'.
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Telerik.Blazor.Components.TelerikSwitch`1.DestroySwitch()
at Telerik.Blazor.Components.TelerikSwitch`1.Dispose()
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
ADMIN
Joana
Posted on: 13 Dec 2021 07:40

Hi Jason,

Could you please specify the component that you encounter the error with? Adding the error output might be useful as well.

Regards,
Joana
Progress Telerik

Learn about the important changes coming in UI for Blazor 3.0 in January 2022!
Jason
Posted on: 08 Dec 2021 13:15
We are still seeing the issue.  We are running .NET5 platform.
ADMIN
Joana
Posted on: 01 Dec 2021 17:46

Hello everyone,

Thank you so much for sharing your feedback!

It is truly valuable to us and that's the reason why we did not rush into closing the item with 2.29 release - to be sure that we have evaluated our customers' scenarios.

@Thomas shared a scenario with NET3.1 and we managed to reproduce it with the MultiSelect component. We already pushed a fix on our code base and will be released with 2.30. 

Regards,
Joana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

John
Posted on: 01 Dec 2021 16:35

Hi Joana,

We wanted to provide feedback that the Telerik Blazor 2.29 release has resolved the TaskCancellation error issue for us (in our .NET Core 5.0 web app + Telerik Blazor UI 2.29). 

Kind regards,

John Bigler (Carnegie Mellon University)

Smiljan
Posted on: 25 Nov 2021 13:31

Hi,

just to report that since upgrade to 2.29 I have not noticed any more Taskcancellation errors (and I log everything).
Also an app is enterprise level, so it's not some minor sample.
So - good job so far! 
If I notice anything, I'll report.

Using - .Net core 3.1 + Blazor.

BR, Smiljan

ADMIN
Joana
Posted on: 25 Nov 2021 13:11

Hi Thomas,

I have attached a gif that records my testing. I cannot replicate any TaskCancellation errors with the Drawer and Switch.

Could you please verify the scenario and send me the project where you encounter the error?

Regards,
Joana
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Thomas
Posted on: 24 Nov 2021 14:59

Hi,

I upgrade to 2.29 version and still have the problem in (maybe more will be found):

- Telerik.Blazor.Components.TelerikSwitch`1.DestroySwitch()

- Telerik.Blazor.Components.TelerikDrawer`1.DestroyDrawer()

I use .Net Core 3.1.

Your fix will work in this version?

 

Best

T


 

 

 

ADMIN
Joana
Posted on: 11 Nov 2021 06:30

Hi everyone,

Yesterday we released our 2.29 version. It includes fixes for the cancellation errors (or any errors on disposal) for the majority of our components. The fixes target all .NET versions. 

However, we would really appreciate your feedback and whether there are scenarios when you still experience such errors. The reason for moving the milestone to 2.30 is to be able to make sure that everything is resolved before marking it as completed.

I hope the above makes sense.

Regards,
Joana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Jason
Posted on: 09 Nov 2021 13:29

The post from Nadezhda on 3 Nov 2021 indicates this will be fixed in 2.29.0 release.

But at the top of this message thread it indicates the fix is scheduled for 2.30.0 release.

Can someone please clarify which is correct?

ADMIN
Nadezhda Tacheva
Posted on: 03 Nov 2021 11:36

Hello Caitlin,

I'm stepping in to provide an update on behalf of my colleague Joana. Please see my comments on the relevant points as follows:

  1. When will the fix be implemented? - The fix for this bug is planned for our upcoming 2.29.0 release. It is expected to be live after November 10th.

  2. Which .NET versions would this fix apply to? - Once we start working on the fix, we will research which .NET versions it could be applicable for. In case you haven't, you can follow the public thread to receive email updates on status changes. When the implementation process starts, we will mark the post with an "In Development" label and you will be notified via email accordingly. We will run the necessary tests after the implementation and then we will be able to confirm.

I hope you will find this information useful. If any further questions appear, please let us know.

Regards,
Nadezhda Tacheva
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Caitlin
Posted on: 27 Oct 2021 15:14

Hi Joana,

Please could you give an update on timelines for your investigation?

1. When will the fix be implemented? Either a date or release would be great.

2. As in Jason's question below - which .NET versions would this fix apply to?

 

Thanks,

Caitlin

ADMIN
Joana
Posted on: 15 Oct 2021 08:36

Hi all,

We will perform research during implementation of the item whether the issue could be fixed in all environments. I hope you understand that we depend on Microsoft for handling the issue.

The initial investigation that we performed resulted in an unfortunate choice between memory leak on dispose or cancellation errors. However, we see the huge demand of our customers and we will dig deeper and will post an update here with the outcome of the implementation.

Regards,
Joana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Jason
Posted on: 08 Oct 2021 17:38
Similar to the comment from NovaStor, I am wondering if this fix will apply to .NET 5 as well?
NovaStor
Posted on: 08 Oct 2021 17:18

After upgrading to 2.29.0, will these errors still be reported for applications targeting Blazor Server with ASP.NET Core 3.1?

 

Thank you.