Skip to content

[Bug]: TeamsAttachmentDownloader Buffer Error #1401

@lilyydu

Description

@lilyydu

Language

Javascript/Typescript

Version

latest

Description

Error is on line 99 in TeamsAttachmentDownloader-
content: Buffer.from(attachment.content)

Stacktrace:

[onTurnError] unhandled error: TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received an instance of Object
    at new NodeError (node:internal/errors:387:5)
    at Function.from (node:buffer:328:9)
    at TeamsAttachmentDownloader.downloadFile 
    at TeamsAttachmentDownloader.downloadFiles 
  code: 'ERR_INVALID_ARG_TYPE'

Reproduction Steps

1. Spin up the CardGazer Bot
2. Send the bot a message to construct an adaptive card, with a photo of a form.
3. The code should throw the above TypeError.
...

Metadata

Metadata

Assignees

Labels

JSChange/fix applies to JS. If all three, use the 'JS & dotnet & Python' labelbugSomething isn't workingjavascriptPull requests that update Javascript code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions