botbuilder-js icon indicating copy to clipboard operation
botbuilder-js copied to clipboard

Language Generation depending on Microsoft Teams Setup not working properly

Open saskialorraine opened this issue 2 years ago • 6 comments

Versions

What package version of the SDK are you using. "botbuilder": "4.16.0",

What nodejs version are you using: Node.js v16.14.2.

Describe the bug

Working with Bot Framework Composer & Bot Framework SDK the following issue appears when deploying to Microsoft Teams:

We are using the existing automation for language generation in the SDK, which should allow the user to get the Bot with the language depending on their language setup in Teams.

This kind of works, but there are unpleasant behaviors. The bot seems to struggle initially recognizing the defined language and therefore switches a few times before getting it right. This, as it seems, only appears in the very beginning of the conversation. It seems that the Bot has trouble initializing. Also, this only happened with a few users (like 5 out of 50).

Is there a way to clean this out or does anyone know what may cause this behavior?

Thanks!

To Reproduce

Steps to reproduce the behavior:

  1. Initially letting the bot proactively messaging a user in teams
  2. Witness the issue

Expected behavior

Just messaging in the defined teams language.

Screenshots

Those are two screenshots from different users:

image image

saskialorraine avatar Aug 31 '22 10:08 saskialorraine

Hi @saskialorraine

I am unaware of this behavior, but it is very interesting for sure.

This bot was built in Composer, correct? And you are using the Node runtime? Have you tested to see if this behaves the same with a C#/dotnet runtime Composer bot?

dmvtech avatar Sep 01 '22 16:09 dmvtech

Hey @dmvtech, thanks for the answer.

Yes, it was built in Composer. No we didn't test it with C# due to time reasons. That would mean to set it all up again and then deploy it on MS teams..

saskialorraine avatar Sep 06 '22 08:09 saskialorraine

image

Again a weird switch appeared

saskialorraine avatar Sep 08 '22 08:09 saskialorraine

image And again.. Just posting this to keep this issue alive

saskialorraine avatar Sep 09 '22 10:09 saskialorraine

Thank you @saskialorraine

Apologies for the delay. I am still investigating. Thank you for the additional information.

dmvtech avatar Sep 20 '22 17:09 dmvtech

Hi @saskialorraine

I am not able to reproduce this. Are you able to test or reproduce this with a locally running bot (code) and test from Teams using ngrok?

We need to check what the locale shows for the conversationUpdate activity (in both situations):

{
  "type": "conversationUpdate",
  "membersAdded": [
    {
      "id": "uuuuuuuu-uuuu-uuuu-uuuu-uuuuuuuuuuuu",
      "name": "Bot"
    },
    {
      "id": "bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbbb",
      "name": "User"
    }
  ],
  "recipient": {
    "id": "uuuuuuuu-uuuu-uuuu-uuuu-uuuuuuuuuuuu",
    "name": "Bot",
    "role": "bot"
  },
  "from": {
    "id": "bbbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbbb",
    "name": "User",
    "role": "user"
  },
  "locale": "en-us"
}

dmvtech avatar Oct 04 '22 00:10 dmvtech

Closing due to inactivity, if problem persist, please re-open or create a new issue.

axelsrz avatar Oct 14 '22 18:10 axelsrz