Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Send button on adaptive card broken #8864

Open
sschoeb opened this issue Mar 27, 2024 · 15 comments
Open

[BUG] Send button on adaptive card broken #8864

sschoeb opened this issue Mar 27, 2024 · 15 comments
Labels
Area-Renderers Bug MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team.

Comments

@sschoeb
Copy link

sschoeb commented Mar 27, 2024

Target Platforms

Other

SDK Version

1.5

Application Name

Microsoft Teams

Problem Description

We see more and more issues with our adaptive cards when using buttons to send information. From having this issue once in a while we now have customers

See the following video:
https://github.com/microsoft/AdaptiveCards/assets/2493698/7de2f68c-7974-4073-81b4-3214ebe6435d

This bug appears on certain installations more often then in others. e.g. we cannot reproduce it on our own installation, but we can see it on several customers a lot.

We tracked down the issue to the following:
When clicking a button in the adaptive card, the following request is executed:
POST https://emea.ng.msg.teams.microsoft.com/v1/agents/28:4112cc9a-d683-4ffd-b0bc-2013af7c7497/invoke

The request contains the following content:

{
  "name": "messageback",
  "messageType": "RichText/Media_Card",
  "value": {
    "sendText": "A"
  },
  "imdisplayname": "<Name of the user>",
  "userAadToken": "<access token>",
  "serverMessageId": "1711540995092",
  "clientMessageId": "1362628173875898871"
}

But this request fails with the following response:

HTTP 400 Bad Request with the following content:

{
    "errorCode": 201,
    "message": "Invalid JSON payload.",
    "standardizedError": {
        "errorCode": 201,
        "errorSubCode": 1,
        "errorDescription": "Invalid JSON payload."
    }
}

This issue does make the application unusable for a lot of users, as most of the time the just end up with this error. We on the other side never get called in out bot, as it fails before already.

Other interesting stuff:

  • Happens way more often in the new teams client (we have a few users where we can reproduce it close to 100% of the time, therefore teams is currently unusable for them). But we had reports already before on the old client (but way less often)
  • Sending a normal text works just fine
  • Issue happens in web and also on the windows teams client

Please let me know if you need any further information. We could also provide phone support or whatever you need to get this fixed.

Screenshots

image

Card JSON

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "",
                            "wrap": true,
                            "fontType": "Default",
                            "size": "Small"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "",
                            "fontType": "Default",
                            "size": "Small",
                            "horizontalAlignment": "Right"
                        }
                    ]
                }
            ]
        },
        {
            "type": "TextBlock",
            "text": "",
            "height": "stretch",
            "wrap": true
        },
        {
            "type": "Input.ChoiceSet",
            "id": "sendText",
            "style": "expanded",
            "choices": [
                {
                    "title": "A) Answer A",
                    "value": "A"
                },
                {
                    "title": "B) Answer B",
                    "value": "B"
                },
                {
                    "title": "C) Answer C",
                    "value": "C"
                }
            ],
            "isMultiSelect": true,
            "wrap": true
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ActionSet",
                    "actions": [
                        {
                            "type": "Action.Submit",
                            "title": "",
                            "data": {
                                "msteams": {
                                    "type": "messageBack",
                                    "displayText": "",
                                    "value": {
                                        "sendText": ""
                                    }
                                }
                            },
                            "msteams": {
                                "feedback": {
                                    "hide": true
                                }
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Sample Code Language

No response

Sample Code

No response

@sschoeb
Copy link
Author

sschoeb commented Mar 28, 2024

@anna-dingler pinging you as this bug/issue makes an adaptivecard within a bot completely useless. As we see customers having 80 to 100% of the time issues with these actions, I would consider that somehow urgent. I hope your team can find time to look into it (or at least guide us to another place to report that issue, if this repository should be wrong).

@sueess
Copy link

sueess commented Mar 28, 2024

Additional information:

  • We do not see any error in Azure Bot services, which relate to that problem.

@jwoo-msft jwoo-msft added MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team. Partner-MsftTeams Issues related to AC integration with Microsoft Teams partner Partner-MsftTeamsMobile Bugs related specifically to Teams Mobile integration (iOS/Android) and removed Partner-MsftTeams Issues related to AC integration with Microsoft Teams partner Partner-MsftTeamsMobile Bugs related specifically to Teams Mobile integration (iOS/Android) labels Mar 28, 2024
@sschoeb
Copy link
Author

sschoeb commented Mar 28, 2024

@jwoo-msft thank you very much for the proper tagging. May I ask you for a response if the report here is where it should be or if we should report this kind of issue somewhere else?

As from the 1 of april on based on your teams rollout policy the new teams client will be the default client, we consider this as urgent, as we expect to see this issue on way more of our customers. Would be great if we could at least find the correct place to report the issue and of course we would highly appreciate if someone could even look at it.

@anna-dingler
Copy link
Contributor

Hi @sschoeb and @sueess, this issue should be filed with the Teams team directly. I can find contact info for you if you need :)

@sschoeb
Copy link
Author

sschoeb commented Mar 28, 2024

@anna-dingler thank you very much, a contact info would be great :-)

@anna-dingler
Copy link
Contributor

@dclaux Do you have a contact here?

@sschoeb
Copy link
Author

sschoeb commented Apr 2, 2024

@anna-dingler thank you very much for the link!

@dclaux Sorry for pushing, but a contact or any feedback on that would be great, as the new teams version is default since yesterday our first customers start to move away from using teams but the web version instead (which is an absolute downgrade, but as teams is absolutely unusable the only workaround :/).

@sschoeb
Copy link
Author

sschoeb commented Apr 5, 2024

@dclaux / @anna-dingler we found an additional (maybe important) information:

Having my own teams which is working, I could see that my invoke request looks like this:

{
   "name":"messageback",
   "messageType":"RichText/Media_Card",
   "value":{
      "sendText":"Falsch"
   },
   "imdisplayname":"<display name>",
   "userAadToken":"<token>",
   "serverMessageId":"1712326154213",
   "clientMessageId":"13250346427536952513",
   "conversation":{
      "id":"<id of the conversation>"
   }
}

What we can see here is, that in my (working) environment, teams does send additionally a conversation with an id. (which in my understanding also makes sense). This information is missing in the request we have above where we get a "Invalid JSON" back from the backend.

Do you need any further information on this? I could link you with our customer where we can 100% reproduce this issue if you need a real example.

Edit: I double checked the HAR-file I got from our customer and there I can see that requests to the /invoke-endpoint with the conversationId do work and all the requests without a conversationId do fail. Sadly most of the time teams does not send this conversationId!

@sueess
Copy link

sueess commented Apr 8, 2024

Is there any progress on that one? We are getting more and more reports of users for which the bots a completely not working. Is there any place to report issues like that? I guess it must be also in the interest of Microsoft, that the bots start to work reliable with the new Teams version.

@jwoo-msft
Copy link
Member

@sueess, As previously mentioned, the solution will not involve AdaptiveCards (AC), since AC does not manage the communication between the hosting application that utilizes AC and the bot. It would be best to contact the teams that can directly address your issue.

@sschoeb
Copy link
Author

sschoeb commented Apr 8, 2024

@jwoo-msft Thanks for your reply.

We would love to contact the teams that can directly address the issue, but we just do not know how - any link to a person would be very much appreciated. Or is there another place to report that bug?

@sueess
Copy link

sueess commented Apr 12, 2024

@jwoo-msft I understand your point. However, isn't it also in your interest, that the stuff you guys develop is at the end working? What is a nice train on broken rails? We are more then eager to report the issue at the right place, but so far nobody could give us any hint, how to reach a responsible person.

We would really appreciate a contact, to reduce the pain of "our" customers and the users. I guess we would all be happy about that. Many thanks for some directions!

@sschoeb
Copy link
Author

sschoeb commented May 21, 2024

Dear @jwoo-msft @dclaux @anna-dingler - I understand, that we are in the wrong repository here. But it is super hard to figure out where to report these kind of bugs? We tried multiple repositories, we tried our support on azure (which does not care to much about teams).. so it would be great if you could give us any hint on where we should go next with this one. Is there any support plan where we could get access to someone who cares about bug reports? Or any other option?

@dclaux
Copy link
Member

dclaux commented May 21, 2024

@sschoeb the issue should now be fixed in Teams. Are you still able to repro in Teams web/desktop?

@sschoeb
Copy link
Author

sschoeb commented May 22, 2024

@dclaux No we do currently not see this error on any of our clients. But as we never had a feedback and the bug also before was not consistent we were not sure if it was fixed or not. But these are great news - thank you very much for your fixing the issue and also the update in here!

As a last question: As you may have seen in this report here, we are having a hard time reporting these kind of bugs to Microsoft. We wonder if this what we are doing here is the way to go or if you would recommend to contact Microsoft somehow else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Renderers Bug MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team.
Projects
None yet
Development

No branches or pull requests

5 participants