MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
285 stars 508 forks source link

Logo and App Name is not visible while receiving card sent through Messaging Extension #7952

Open sznorbert07 opened 1 year ago

sznorbert07 commented 1 year ago

While sending an Adaptive Card via Messaging Extension, the App logo and name is not visible for the recipient. Altough it is visible for me (as sender). This is what I see (the sender): Sender

This is what the recipient sees: Receiver

The issue is little bit different on mobile, because there I can see the App name, but the logo is missing. ios

I was pretty sure it is a bug in the Teams client, hence I tried reproducing the issue with the following Sample App, and the issue is the same. The sample I tried with: https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/msgext-search/csharp This is what I see: Sender 1

This is what the recipient sees: Receiver 1

On iOS: ios 1

ghost commented 1 year ago

Hi sznorbert07! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.

Best regards, Teams Platform

sayali-MSFT commented 1 year ago

@sznorbert07 - Thanks for reporting your issue. We will check this at our end, If it is bug then raise it accordingly and will get back to you.

sayali-MSFT commented 1 year ago

@sznorbert07 -We have tested this scenario on IOS, Desktop and Web as well. It is showing the Logo and App Name. Could you please check it once on updated version? Desktop recipient - Microsoft Teams Version 1.6.00.2359 (64-bit). ME_Recp IOS recipient - IOS version - 16.2 IOS Teams Version-4.22.77.2022223502/1212 MicrosoftTeams-image (33)

Sender- ME_Sender

sznorbert07 commented 1 year ago

@sayali-MSFT: I have checked it again with my college, and we both have the same issue with the sample mentioned above. We just grabbed the manifest (demo manifest/msgext-search.zip) from the Microsoft-Teams-Samples repo.

We also updated Teams through the client (by clicking 3 dot -> Check for updates) and we have the latest app installed: 1.6.00.1381 (64-bit)

It would be crucial for us to find the cause of this issue, because we are about to update our Teams App in the Microsoft Teams Store, and we cannot do it, because it got stuck in the App Review phase. Inkedimage_2023_01_24T08_38_52_609Z

By the way I have noticed something wih Fiddler, which could help investigate this issue. I have captured 2 HTTP requests and probably noticed some issues:

The first request sent to the following url: https://emea.ng.msg.teams.microsoft.com/v1/agents/28:6b502cd4-2968-4d6e-aaa8-09d83afccccf/invoke (Notice the botID in the url, which is the same as the AppID: 6b502cd4-2968-4d6e-aaa8-09d83afccccf)

I have got back the Thumbnail Card. In the next step I sent the message, and Teams made a request to https://emea.ng.msg.teams.microsoft.com/v1/users/ME/conversations/19%3A2f69e183-77c9-4ac6-b6c0-6d89c201c125_b675a75c-65f4-4495-bc50-916eb67d4987%40unq.gbl.spaces/messages with the following request (and also the problematic as I see):

{
    "content": "<span class=\"inline-compose-card\" itemid=\"158e365a70aa492aa99770fdfe9a65dc\" itemscope=\"\" itemtype=\"http://schema.skype.com/InputExtension\"><span content=\"158e365a70aa492aa99770fdfe9a65dc\" itemprop=\"cardId\"></span></span>",
    "messagetype": "RichText/Html",
    "contenttype": "text",
    "amsreferences": [],
    "clientmessageid": "3607222623316112091",
    "imdisplayname": "Name1 Name2",
    "properties": {
        "importance": "",
        "subject": "",
        "cards": "[{\"appIcon\":\"https://eu-prod.asyncgw.teams.microsoft.com/v1/objects/0-weu-d18-723c41b85f126ed0dd59519d900d487d/views/imgpsh_fullsize\",\"appId\":\"0553f8e7-3c12-4abc-a8dd-32e63824c144\",\"appName\":\"search-extension-settings\",\"cardClientId\":\"158e365a70aa492aa99770fdfe9a65dc\",\"contentType\":\"application/vnd.microsoft.card.thumbnail\",\"content\":{\"title\":\"StockSharp.TrueFX, 5.0.128\",\"subtitle\":\"Trading and algorithmic trading platform (stock markets, forex, bitcoins and options). .NET API for InteractiveBrokers, GainCapital, OANDA, FIX/FAST, Binance etc. More info on web site https://stocksharp.com/store/api/\",\"images\":[{\"alt\":\"Icon\",\"url\":\"https://eu-prod.asyncgw.teams.microsoft.com/urlp/v1/url/content?url=https%3a%2f%2fapi.nuget.org%2fv3-flatcontainer%2fstocksharp.truefx%2f5.0.128%2ficon\"}],\"buttons\":[{\"type\":\"openUrl\",\"title\":\"Nuget Package\",\"value\":\"https://www.nuget.org/packages/StockSharp.TrueFX\"},{\"type\":\"openUrl\",\"title\":\"Project\",\"value\":\"https://stocksharp.com/\"}]}}]"
    }
}

In this request under the properties.cards property I see an appId property with a wrong ID: 0553f8e7-3c12-4abc-a8dd-32e63824c144 However in the manifest.json the id and composeExtensions.botId properties are with the 6b502cd4-2968-4d6e-aaa8-09d83afccccf ID. They are different.

As a recipient I have checked the console log with DevTools and the following error appears when receiving the message (Console.log):

?agent=electron&version=23010100905&ring=ring3_6:98 ["CDL: {errorCode:Error,requestId:q-145,component:RequestHandler,requestWindowId:main,operationType:query,operationName:appDefinition,message:error while processing q-145: {name:Error,message:Unexpected error value: { message: getGroupChatAppDefinition - No registeredApp found with appId (73a6380d-6854-476c-a842-9628be4f71b3) for chat (19:028cc9c2-e6fb-427f-9ed3-4b1fa5f967b5_2f69e183-77c9-4ac6-b6c0-6d89c201c125@unq.gbl.spaces), callerContext: (cdl), status: NotFound },stack:[]} (reason: undefined),hostRendererId:5e3ce6c0-2b1f-4285-8d4b-75ee78787346}"]

Heres again a different appID is mentioned: 73a6380d-6854-476c-a842-9628be4f71b3. This ID is the same per Teams App.

I also have checked what is the case with a working Teams App from the store, and it appears to be the same ID everywhere, which I would expect from our app and from the Sample app.

I will attach two .txt files with the HTTP requests captured with Fiddler. One is the requests mentioned above and one with a working app from the store (ArcGIS Maps)

Working App (ArcGIS Maps).txt Not working Sample app.txt

sayali-MSFT commented 1 year ago

@sznorbert07 -Thanks for providing information, we are checking it internally and let you know once we get any updates.

sayali-MSFT commented 1 year ago

@sznorbert07 -Could you please confirm below things: 1.Is the recipient being same tenant user or guest user? 2.Recipient teams version is updated or not.

sznorbert07 commented 1 year ago

@sayali-MSFT Both user has the same Teams client version and are in the same tenant.

sznorbert07 commented 1 year ago

@sayali-MSFT We have made few tests and it turned out that the problem only occurs if we are using custom app by uploading the App Package. We tried our app from the Store and it works, but when we uploaded the same App Package as a custom app, the issue is there.

sayali-MSFT commented 1 year ago

@sznorbert07 -We are also trying the above scenario, when we uploaded as custom app,in that case icon and display name is not showing properly. We have raised bug for the same and concerned team is looking into it. We will inform you once we get any update. appicon

sayali-MSFT commented 1 year ago

@sznorbert07 -Got the update from engineering team, as it is ByDesign behaviour. When the current user (recipient) looks at this card, they will not see the message extension header because the app definition doesn't exist for recipient. In order for the app icon and name to show up on the card, Sender should sideload the app to the group chat, or recipient should sideload the app for himself.