generator-teams icon indicating copy to clipboard operation
generator-teams copied to clipboard

Default bot implementation throws an error when receiving an adaptive card chat message

Open wictorwilen opened this issue 3 years ago • 1 comments

Description

The default bot implementation throws an error, see below, when an adaptive card (non text) message is sent to it.

Steps to reproduce

Scaffold a new project with a bot and a messaging extension. Run it (gulp serve) and use the message extension in the bot chat and post an adaptive card to the chat

Expected results

At least no errors in the console

Actual results

The following error is shown:

POST /api/messages 200 775 - 2.320 ms
  msteams [onTurnError]: TypeError: Cannot read property 'toLowerCase' of undefined +56s
POST /api/messages 200 - - 5.425 ms
(node:14462) UnhandledPromiseRejectionWarning: TypeError: Cannot perform 'set' on a proxy that has been revoked
    at Proxy.<anonymous> (/home/wictor/code/test/yoteams-test/node_modules/botbuilder-core/lib/turnContext.js:387:36)
    at Generator.next (<anonymous>)
    at fulfilled (/home/wictor/code/test/yoteams-test/node_modules/botbuilder-core/lib/turnContext.js:9:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:14462) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)

Project you experience issues with

generator-teams

generator version

3.1.1

build tools version

1.3.0

nodejs version

14.17.6

npm version

6.14.15

Operating system (environment)

Linux

Additional Info

No response

wictorwilen avatar Oct 08 '21 09:10 wictorwilen

@wictorwilen did you try that with 3.5.0.?

stephanbisser avatar Nov 18 '21 12:11 stephanbisser