Skip to content

ShowTypingMiddleware - Infinite loop of typing activity when Adapter on_error() method is called. #1980

Open
@Kevv-J

Description

@Kevv-J

Version

I am using the following packages

botbuilder-schema==4.13.0
botbuilder-core==4.13.0
botbuilder-dialogs==4.13.0

Describe the bug

ShowTypingMiddleware goes into an infinite loop of sending typing activity to user when on_error() method of the BotFrameworkAdapter is called. It doesn't stop till the application is restarted. This is easily reproduced in BotBuilder-Samples tested with BotFramework Emulator.

To Reproduce

Steps to reproduce the behavior:

  1. add ADAPTER.use(ShowTypingMiddleware(delay=0.5, period=1.0)) to app.py of 13, Core Bot Python Sample
  2. Write some code that takes calls the adapter's on_error() method i.e. print(ThisIsABug) in destination step in dialogs/booking_dialog.py
  3. Start the app and test the dialog from BotFramework Emulator.
  4. The app sends infinite typing activity to the emulator when the error is encountered in code.

Expected behavior

ShowTypingMiddleware should stop sending typing activity if on_error() method is called.

Screenshots

Screenshot from 2022-11-01 14-38-03

Additional context

NA

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportUse this label to exclude the issue from the DRI report.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toIndicates that the team has replied to the issue reported by the customer. Do not delete.customer-reportedIssue is created by anyone that is not a collaborator in the repository.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions