Duplicate UI | Bot Ghosting in Teams but works nicely in the Emulator - BotFramework v4
akarim-ofc-outlook opened this issue · comments
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- 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
- PR
- Merged
Javascript SDK TODO
- PR
- Merged
Python SDK TODO
- PR
- Merged
Java SDK TODO
- PR
- Merged
Samples TODO
- PR
- Merged
Docs TODO
- PR
- Merged
Tools TODO
- PR
- Merged
CC
@aukgit , @akarim-ofc-outlook, @BruceHaley, @hossainalazad90, @Stevenic, @EricDahlvang
I am facing it and can't solve yet! @BruceHaley @Stevenic
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.
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.
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
Hi @ramfattah @stevkan @dmvtech @ceciliaavila I have attached a steps that will help to figure it out easily.
- Step 1: Download Shared project from Drive.
- Step 2: Use Password(bot123) to open project.
- Step 3: Add value in “MicrosoftAppId” , ”MicrosoftAppPassword” in appsetting.json file
- Step 4: Add value in “id” and “validDomains” property in manifest.json file
- Step 5: run application.
- Step 6: run Ngrok.
- Step 7: Zip manifest.json containing folder as manifest.zip
- 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.
Hi everyone, we have this issue in our backlog and we will start working on it this week.
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.
Hi @ramfattah, @tracyboehrer, we think this issue can be closed, it was a configuration problem in the hero cards.
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.
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.
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
Hey LuchoPeres
Is it fixed yet?