question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

first ConversationUpdate sent is not matching with the Emulator - locale problem

See original GitHub issue

Version

Based on the _botAgent I’m seeing in my DirectLine object, I’m currently at DirectLine 3.0 and WebChat 4.5.2

Describe the bug

Conversation update is sent without the locale, which then cause the welcome message to be in the default language

To Reproduce

Steps to reproduce the behavior:

  1. Create a React Webchat component
  2. Generate a new token and a new directline object, pass it to ReactWebChat
  3. Your bot didn’t get the locale that you set in the ReactWebChat, but the default one set in the bot

Expected behavior

Your bot use the locale sent via ReactWebChat.

For example, if you use the emulator, the activity object that the bot will recieve is the following : Code_2019-09-09_15-32-17 As you can see the locale is set.

With the ReactWebChat component we get the following : Inkedpwsh_2019-09-09_15-38-51_LI

Additional context

I add a backline which send an event with the locale as soon as the directline is connected (as per example 15 BUT it did not constantly prove to be working (event coming too late after the conversation update maybe, or the other way around), so I had to add a delay of around 300ms to fix the issue but this is far from being optimal

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
cwhittencommented, Sep 15, 2019

@p-nagpal can you provide any detail to the updated ConversationUpdate mechanism and how it affects locales being provided from Direct Line to the bot in a deployed scenario? The service recently made a change that could have affected this behavior, and we should port this behavior in to the BF Emulator to keep the experience consistent if that is the case, or update documentation if the service has different guidance. @Zack-Strife what you may have run in to here is a difference in behavior between how the BF Emulator “emulates” Direct Line and Direct Line actual.

0reactions
compulimcommented, Nov 5, 2019

@Zack-Strife we will close this for now for inactivity. Please create a new issue referencing this one for continuation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known issues - Microsoft Open Source
Emulator will pass the locale setting to the bot as the first ConversationUpdate call. When you're testing in other environments, if it's something...
Read more >
Bot Emulator Error: POST 400 directline.postActivity
I've tried having a configured endpoint that matches what the emulator states it is configured to, but that only results in an infinite ......
Read more >
Send welcome message to users - Bot Service - Microsoft Learn
When a new user input is received, WelcomeUserState is checked to see if DidBotWelcomeUser is set to true. If not, an initial welcome...
Read more >
Microsoft/BotBuilder - Gitter
It works for me in the test chat editor , as does sending a message with a delay ... you'd use BotBuilder.json ,...
Read more >
Fine-Tuning Your Chatbot | Microsoft Press Store
Table 4-1 shows common Activity types, matching interfaces, ... FIGURE 4.3 The Bot Emulator Sending ConversationUpdate Activity. tip.jpg Tip.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found