Attachments with incorrect base64 contentUrl in sendActivity fails silently
@ckkashyap 已經在處理了。
開始於 2019年2月6日。
評估
這個 Issue 還沒有評估資料。
描述
Versions
What package version of the SDK are you using: 4.0.8 (botbuilder, botbuilder-dialogs)
What nodejs version are you using: v.8.12.0
What browser version are you using: Chrome v69
What os are you using: Windows 10
Describe the bug
When trying to create an attachment that is intentionally corrupt (via an incorrect base64 url), the bot fails silently without throwing an error.
To Reproduce
- Create bot with command to trigger send activity with an attachment with the following code:
try {
console.log('Start');
await context.sendActivity({
type: 'message',
attachments: [{
contentType: 'text/plain',
contentUrl: 'data:image/png;base64,abc\nabc',
name: 'dot.png'
}]
});
console.log('Succeeded');
} catch (err) {
console.log(err);
throw err;
}
And on the BotFrameworkAdapter instance, register an onTurnError handler like so:
adapter.onTurnError = async (context, error) => {
console.log(error);
await context.sendActivity(`Sorry, ran into an error!\n ${ error.message }`);
}
- Run bot, send command utterance to send activity
- Sending the command failed
Note that there is no error in the console, and the lineconsole.log("Succeeded");is never reached. Similarly, onTurnError is never triggered.
The message fails silently, and after timing out, the Web Chat instance logs a 502 Bad Gateway error.
Sending other messages pass through successfully.
Expected behavior
Since the contentUrl is invalid, the bot should try and catch an error when this command is initiated.
[bug]
- 主要語言
- TypeScript
- 星號
- 199
- 分支
- 133
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
microsoft/BotFramework-DirectLineJS 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 35/100
-
難度 4/5 3-5 天 新手友好度 25/100
-
難度 4/5 3-5 天 新手友好度 30/100
microsoft/BotFramework-DirectLineJS#432 · 1 個 reaction ·
-
難度 3/5 1-2 天 新手友好度 35/100
microsoft/BotFramework-DirectLineJS#424 · 3 則留言 ·
-
Application crashes when refresh token returns an error可能重新可做 @compulim 於 794 天前認領,目前沒有進行中的 PR。 未關閉bug
microsoft/BotFramework-DirectLineJS#421 · 3 則留言 · 已指派 1 人 ·
查看 microsoft/BotFramework-DirectLineJS 的全部 Issue
相似的 Issue
-
check:passed streams:add
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 88/100
Fission-AI/OpenSpec#1986 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
nestjs/docs.nestjs.com#3554 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
publicodes/publicodes#868 ·
-
namespace operations
難度 1/5 1 小時以內 新手友好度 78/100
EclipseFdn/open-vsx.org#13488 ·
維護者通常 2 天內回覆