Attachments with incorrect base64 contentUrl in sendActivity fails silently
@ckkashyap y travaille déjà.
Depuis le 6/2/2019.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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]
- Langage dominant
- TypeScript
- Étoiles
- 199
- Forks
- 133
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/BotFramework-DirectLineJS
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
microsoft/BotFramework-DirectLineJS#432 · 1 réaction ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
microsoft/BotFramework-DirectLineJS#424 · 3 commentaires ·
-
Application crashes when refresh token returns an errorPeut-être à nouveau libre @compulim l’a pris il y a 795 jours, et aucune pull request n’est ouverte. Ouvertebug
microsoft/BotFramework-DirectLineJS#421 · 3 commentaires · 1 personne assignée ·
Toutes les issues de microsoft/BotFramework-DirectLineJS
Issues similaires
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
supabase/agent-skills#611 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
polka-codes/test#345 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 92/100
GoogleChromeLabs/project-sesame#217 ·
Les mainteneurs répondent en général sous 12 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
solana-foundation/solana-com#2202 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100