[OnTurnError] unhandled error : The CancellationTokenSource has been disposed. #6643
Labels
Bot Services
Required for internal Azure reporting. Do not remove. Do not change color.
customer-replied-to
Indicates that the team has replied to the issue reported by the customer. Do not delete.
customer-reported
Issue is created by anyone that is not a collaborator in the repository.
I am getting this error when user stops the chat and comes after some time to continue the conversation. The bot stops responding until I restart the app service. I am using teams channel. I am on latest version of bot framework c#.
This only happens if they are in repeated child dialog. I have a child dialog handling Q&A and I only exit that child dialog when user says exit, cancel, home etc.
Here is the stack trace -
Microsoft.Bot.Builder.Integration.AspNet.Core.IBotFrameworkHttpAdapter[0]
2024-04-16T08:26:14.1498802Z [OnTurnError] unhandled error : The CancellationTokenSource has been disposed.
2024-04-16T08:26:14.1510465Z System.ObjectDisposedException: The CancellationTokenSource has been disposed.
2024-04-16T08:26:14.1685928Z at Microsoft.Bot.Builder.ShowTypingMiddleware.FinishTypingTaskAsync(ITurnContext turnContext)
2024-04-16T08:26:14.1701899Z at Microsoft.Bot.Builder.ShowTypingMiddleware.ProcessTypingAsync(ITurnContext turnContext)
2024-04-16T08:26:14.1976692Z at Microsoft.Bot.Builder.ShowTypingMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken)
2024-04-16T08:26:14.2164601Z at Microsoft.Bot.Builder.Teams.TeamsSSOTokenExchangeMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken)
2024-04-16T08:26:14.2258972Z at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)
2024-04-16T08:26:14.2268689Z at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken)
The text was updated successfully, but these errors were encountered: