Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OnTurnError] unhandled error : The CancellationTokenSource has been disposed. #6643

Open
jagdish-kumawat opened this issue Apr 25, 2024 · 1 comment
Assignees
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.

Comments

@jagdish-kumawat
Copy link

jagdish-kumawat commented Apr 25, 2024

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)

@dmvtech
Copy link
Collaborator

dmvtech commented Apr 25, 2024

@jagdish-kumawat

  • Do you have a minimal repro bot that can exhibit the issue?
  • How long is the delay ("after some time")?
  • Does it just happen on Teams only, or other channels as well?
  • Is this using the legacy QnA or the newer CQA?

@dmvtech dmvtech self-assigned this Apr 25, 2024
@dmvtech dmvtech added 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. labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants