MicrosoftDocs / msteams-docs

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

Bot and/or app icons are not loading #11632

Open 0x001122 opened 5 days ago

0x001122 commented 5 days ago

Steps to reproduce

Tested on macOS 14.6.1 (23G93) in Google Chrome Version 129.0.6668.58 (Official Build) (arm64)

  1. Open a clean browser session (for example in a private window)
  2. Connect to your Teams

Expected behavior

Icons for bots and apps should be loaded in the Chat section.

Actual behavior

Icons for bots and apps are not loaded and a generic blue placeholder image is displayed instead:

Error details

In the browser console I get a lot of errors about some URLs not loading or throwing an error in some way:

Access to fetch at 'https://fr-prod.asyncgw.teams.microsoft.com/v1/url/content?url=https%3A%2F%2Fres.cdn.office.net%2Fteamsappdata%2Fevergreen-assets%2FThirdPartyApps%2F2f4dc505-8eae-4dad-ad92-c6fed9e4857b_largeImage.png%3Fv%3D3.1.22&v=&v=1' from origin 'https://teams.microsoft.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
GET https://fr-prod.asyncgw.teams.microsoft.com/v1/url/content?url=https%3A%2F%2Fres.cdn.office.net%2Fteamsappdata%2Fevergreen-assets%2FThirdPartyApps%2F2f4dc505-8eae-4dad-ad92-c6fed9e4857b_largeImage.png%3Fv%3D3.1.22&v=&v=1 net::ERR_FAILED

I've noticed that if I take a URL that is not loading, for example https://fr-prod.asyncgw.teams.microsoft.com/v1/url/content?url=https%3A%2F%2Fres.cdn.office.net%2Fteamsappdata%2Fevergreen-assets%2FThirdPartyApps%2F2f4dc505-8eae-4dad-ad92-c6fed9e4857b_largeImage.png%3Fv%3D3.1.22&v=&v=1, and add /urlp just after the domain name, for example https://fr-prod.asyncgw.teams.microsoft.com/urlp/v1/url/content?url=https%3A%2F%2Fres.cdn.office.net%2Fteamsappdata%2Fevergreen-assets%2FThirdPartyApps%2F2f4dc505-8eae-4dad-ad92-c6fed9e4857b_largeImage.png%3Fv%3D3.1.22&v=&v=1 then the URL is loading correctly in my browser.

There also seemed to be a similar issue recently that is now unfortunately closed: https://github.com/MicrosoftDocs/msteams-docs/issues/11580.

BTW we also get a lot of reports from our customer base (more than 50 reports in the last 2 months) and some of these users are using the latest version of Teams:

Could you please investigate and fix the root issue? Thanks.

Prasad-MSFT commented 4 days ago

We tried to repro this, however at our end icons are rendering properly. (Teams Web/Desktop client)

We have Microsoft Teams version 24267.1300.3136.8381. The client version is 49/24092313800.

Could you please ensure that the server hosting the icons includes the Access-Control-Allow-Origin header in its response? Check if there are any network restrictions or proxy settings that might be blocking the CORS headers.

0x001122 commented 4 days ago

Care to elaborate on how would I do that? Unless I missed something the servers hosting the icons are Microsoft's servers and domain names:

0x001122 commented 4 days ago

FYI these are the errors that appear in the browser's console:

Prasad-MSFT commented 3 days ago

@0x001122, could you please share the network trace showing these failing calls? Please share it at microsoftteamsdev@microsoft.com.

0x001122 commented 14 hours ago

@Prasad-MSFT I've just sent an email containing a HAR file exported from Google Chrome (as described in https://learn.microsoft.com/en-us/azure/azure-portal/capture-browser-trace#google-chrome). Please do let me know if you need further information.

Prasad-MSFT commented 12 hours ago

@0x001122, thanks for sharing the logs. We have raised an ICM for this issue and engineering team is looking into it. We will inform you once we have further update. Thanks!