Attachments with incorrect base64 contentUrl in sendActivity fails silently
@ckkashyap já está trabalhando nisso.
Desde 6/2/2019.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
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]
- Linguagem predominante
- TypeScript
- Estrelas
- 199
- Forks
- 133
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microsoft/BotFramework-DirectLineJS
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 25/100
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 30/100
microsoft/BotFramework-DirectLineJS#432 · 1 reação ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
microsoft/BotFramework-DirectLineJS#424 · 3 comentários ·
-
Application crashes when refresh token returns an errorTalvez livre de novo @compulim assumiu há 794 dias e não há nenhum pull request aberto. Abertabug
microsoft/BotFramework-DirectLineJS#421 · 3 comentários · 1 responsável ·
Todas as issues de microsoft/BotFramework-DirectLineJS
Issues semelhantes
-
module-request
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
ports get and web print 'Port N already in use, trying next...' for every busy port they skipAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
appandflow/stim#1604 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
lingdojo/kana-dojo#31060 · 1 comentário · 5 reações ·
Mantenedores costumam responder em até 1 dia
-
SSH workspace restore rewrites relative symlinks into the deleted sync-back staging directoryAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
paperclipai/paperclip#14173 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia