microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.5k stars 2.45k forks source link

Duplicate UI | Bot Ghosting in Teams but works nicely in the Emulator - BotFramework v4 #6616

Closed akarim-ofc-outlook closed 1 month ago

akarim-ofc-outlook commented 1 year ago

The same thing works in the Bot Framework Emulator (v4) but in the real team it creates duplicate UI for choices, for the same code it creates a duplicate and doesn’t create one for the other

Version

SL Package Version
1 Microsoft.Bot.Builder.Integration.AspNet.Core 4.21.0
2 adaptivecards 3.1.0
3 AdaptiveCards.Templating 1.5.0
4 Microsoft.AspNetCore.Mvc.NewtonsoftJson 7.0.11
5 Microsoft.Bot.Builder.Dialogs 4.21.0

Describe the bug

The bug is weird and there are similar bugs fixed by the BOT team before. It creates duplicate UI choices for uncertain cases, we debugged it in many different ways and it works nicely in the emulator but creates duplicate choices UI on the actual team communication.

Full Bug Link: https://docs.google.com/document/d/1oTS0q3K8_ttKgMtR4RPIKKkq2Uj2BWZslUNtlGFP8Bs/edit

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Give a clear and concise description of what you expected to happen.

Screenshots

Additional context

I have been developing Microsoft Team ChatBOT using Bot Framework v4 (Packages are mentioned at the end of the document section).

This bot will be added to the Microsoft Team App as an extension. The end user will communicate through this team extension.

According to business, there are some lifecycles that will be done by both Bot and user interaction. The lifecycle is added in a diagram below-

Tracking Status

Dotnet SDK [TODO]()

Javascript SDK [TODO]()

Python SDK [TODO]()

Java SDK [TODO]()

Samples [TODO]()

Docs [TODO]()

Tools [TODO]()

CC

@aukgit , @akarim-ofc-outlook, @BruceHaley, @hossainalazad90, @Stevenic, @EricDahlvang

azaddunite commented 1 year ago

I am facing it and can't solve yet! @BruceHaley @Stevenic

breakingram commented 1 year ago

Hi @akarim-ofc-outlook,

are you able to share a minimal reproducible zipped bot project that I could test locally from my end? If so, please be sure to remove any secrets/keys beforehand.

aukgit commented 1 year ago

Dear @ramfattah

Thank you for your alacrity response.

I am sharing a senior software engineer @hossainalazad90 with you.

He can also share things via Skype if required.

He (@hossainalazad90) is a dedicated senior engineer in this project and help you as much as you need.

Plus, https://docs.google.com/document/d/1oTS0q3K8_ttKgMtR4RPIKKkq2Uj2BWZslUNtlGFP8Bs/edit : this doc contains the reproduce steps in image gif.

If you need anything more, feel free to comment. Thanks again.

cc: @BruceHaley @Stevenic @arfizurrahman

azaddunite commented 1 year ago

Dear @ramfattah ,I have shared code in google drive here is link https://drive.google.com/file/d/1WYtR6ycBT133gPKzvUeqNKVUPIdLzr9B/view?usp=sharing Please notify me after getting this .I will remove it after your acceptance! Shared Folder is encrypted so use password for decryption. If you face any difficulties to app feel free to ask me. I have attached a doc that will help to figure it easily. Bot Run step.docx

azaddunite commented 1 year ago

Hi @ramfattah @stevkan @dmvtech @ceciliaavila I have attached a steps that will help to figure it out easily.

  1. Step 1: Download Shared project from Drive.
  2. Step 2: Use Password(bot123) to open project.
  3. Step 3: Add value in “MicrosoftAppId” , ”MicrosoftAppPassword” in appsetting.json file
  4. Step 4: Add value in “id” and “validDomains” property in manifest.json file
  5. Step 5: run application.
  6. Step 6: run Ngrok.
  7. Step 7: Zip manifest.json containing folder as manifest.zip
  8. Step 8: Upload manifest.zip folder in team’s app using

Following steps- Manage Your Apps>Upload an App>Upload a custom app>select manifest.zip from directory>Write or select text from app suggestion and follow the result.

ceciliaavila commented 1 year ago

Hi everyone, we have this issue in our backlog and we will start working on it this week.

LuchoPeres commented 1 year ago

Hi everyone, we have successfully reproduced the reported issue by following the provided steps. Debugging the code, we found out that the line 72 is unnecessary.

In the provided code, both buttons and choices are being added, which results in the options being duplicated. It is advised to use either buttons or choices, as having both is redundant.

Let us know if this solved the issue or if you need anything else.

image

2023-11-15 11_53_53-Clipboard

ceciliaavila commented 11 months ago

Hi @ramfattah, @tracyboehrer, we think this issue can be closed, it was a configuration problem in the hero cards.

aukgit commented 11 months ago

Hey @ceciliaavila

Is it fixed?

Please fix it, then close it.

It is an intense issue, and it took more than 14 hours to get to the bottom of it.

We always assume it is us, not the framework; in this, it was the framework and doing GHOSTing.

aukgit commented 11 months ago

Hi everyone, we have successfully reproduced the reported issue by following the provided steps. Debugging the code, we found out that the line 72 is unnecessary.

In the provided code, both buttons and choices are being added, which results in the options being duplicated. It is advised to use either buttons or choices, as having both is redundant.

Let us know if this solved the issue or if you need anything else.

image

2023-11-15 11_53_53-Clipboard

I actual provided this workaround on that day to @azaddunite, however, it doesn't look professional when it displays without the double feeding.

I think the framework should be smart enough to have single input not double inputs.

Hey @azaddunite,

Could you please show the diff, how it looks without the line 72 and with.

Case # 1

Take one screenshot from emulator when we have line 72

Case # 2

Take another screenshot without line 72 in the emulator.

cc: @ramfattah , @ceciliaavila , @aukgit, @akarim-ofc-outlook

aukgit commented 9 months ago

Hey LuchoPeres

Is it fixed yet?