microsoft / microsoft/BotFramework-WebChat

DLSpeech: Composer crashes when Mic is on and another activity with input hint "expecting" is recieved

Open
#4,710 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bot Services bug customer-reported
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Is it an issue related to Adaptive Cards?

No

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Others or unrelated

Which area does this issue affect?

Speech

What is the public URL for the website?

No response

Please describe the bug

When a message is received from the bot at the time STT recognition is ongoing, an error is thrown by Composer (React component) which causes the whole bot to crash.

The error is: "Failed to stop recognition while the current one is ongoing and it is not abortable".

The problem with the current library is that it does not allow us to catch and decide whether the error can be ignored instead, the Composer component crashes.

Do you see any errors in console log?
Error: Failed to stop recognition while the current one is ongoing and is not abortable. at Composer.js:216:17  at eu (react-dom.production.min.js:240:251) at ru (react-dom.production.min.js:244:163) at Ec (react-dom.production.min.js:284:388) at react-dom.production.min.js:283:409  at be (react-dom.production.min.js:281:398) at uc (react-dom.production.min.js:273:439) at Fi (react-dom.production.min.js:127:105) at Ec (react-dom.production.min.js:286:247) at react-dom.production.min.js:282:391
How to reproduce the issue?
  1. Connect to a bot which uses Direct Line Speech and React for the frontend.
  2. When the bot sends an activity with input hint: Expecting Input, the STT recognition turns on automatically.
  3. Before this STT completes, if the bot sends another activity (delayed send from bot) with input hint: Expecting Input, the error "Failed to stop recognition while the current one is ongoing and is not abortable" appears and the entire application crashes.
What do you expect?

The application should not crash and/or should allow the developer to pass a custom error handler which can suppress errors when required.

What actually happened?
  1. When the bot sends an activity with input hint: Expecting Input, the STT recognition turns on automatically.
  2. Before this STT completes, if the bot sends another activity (delayed send from bot) with input hint: Expecting Input, the error "Failed to stop recognition while the current one is ongoing and is not abortable" appears and the entire application crashes.
Do you have any screenshots or recordings to repro the issue?

crash - failed to stop recognition error_non-sensitive

Adaptive Card JSON

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash with Direct Line Speech and two delayed activities using the "expecting input" hint, then inspect Composer.js around line 216 and the speech-recognition stop path. Done means the Composer no longer crashes during an ongoing, non-abortable recognition, with the requested error-handling behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
audio-video-rtc, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.