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

[MSTeams][Action.OpenURL] Open URl button is not working with some URls in Teams #5297

Closed
shereenfathy opened this issue Jan 20, 2021 · 35 comments
Labels
Area-Inconsistency Bugs around renderer inconsistencies across different platforms Bug MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team. Resolution-External Bugs resolved as external to AdaptiveCards.
Projects

Comments

@shereenfathy
Copy link

shereenfathy commented Jan 20, 2021

Platform

  • .Net Core

Details

I've developed bot using Microsoft bot framework, the bot response is adaptive card and i want to use the action.openurl button to open specific link and it worked with some urls but when i used url to document located in Microsoft online word the button become not clickable and this is the json object :

{
  "type": "AdaptiveCard",
  "body": [
    {
      "type": "TextBlock",
      "size": "Medium",
      "weight": "Bolder",
      "text": "test",
      "wrap": true
    }
  ],
  "actions": [
    {
      "type": "Action.OpenUrl",
      "title": "View",
      "url": "https://shpc.itn.intraorange/sites/MUSCLES/_layouts/15/WopiFrame.aspx?sourcedoc={35729A64-4706-43F1-A530-6EF903831010}&file=DRIssuesTest.doc&action=default"
    }
  ],
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "version": "1.2"
}

NOTE: this button worked in teams mobile app but not work in teams on Microsoft edge browser and chrome browser and teams disktop app

@ghost ghost added this to the 21.01 milestone Jan 20, 2021
@ghost ghost added the Area-Inconsistency Bugs around renderer inconsistencies across different platforms label Jan 20, 2021
@ghost
Copy link

ghost commented Jan 20, 2021

please review this issue for target Milestone, Inconsistencies & Priority upon triage.

@ghost ghost added this to Needs triage in Bug Triage Jan 20, 2021
@ghost ghost added the AdaptiveCards v21.01 label Jan 20, 2021
@RebeccaAnne RebeccaAnne added the MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team. label Jan 20, 2021
@RebeccaAnne RebeccaAnne moved this from Needs triage to Investigate in Bug Triage Jan 20, 2021
@RebeccaAnne
Copy link
Contributor

The card seems to work okay in the JS designer. @Wajeed-msft @siduppal could you take a look and see if there's anything going on on the Teams side here?

@ghost ghost removed the Triage-Needed label Jan 20, 2021
@ghost
Copy link

ghost commented Jan 20, 2021

Hi @shereenfathy. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.

@ghost ghost added the Triage-Investigate label Jan 20, 2021
@Mallipriya-MSFT
Copy link

The card seems to be working fine on Teams side as well. Here are the repro screenshots:
MicrosoftTeams-image

card Json

{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "test",
"wrap": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View",
"url": "https://blrdev.sharepoint.com/:w:/s/LibraryAssist142/Eb_7Y3V2jvhCkVfTbBY-AvcBzX2W-BFia9zOMfjHVyaK1g?e=Y6f0ov"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

Posted card

MicrosoftTeams-card

On Click of View Button, Document is opening

image

@Mallipriya-MSFT
Copy link

@shereenfathy, Could you please share the repro screenshots from your side?

@shereenfathy
Copy link
Author

shereenfathy commented Jan 21, 2021

the problem appears when i took the url from the address bar:
image
card json
{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "https://shpc.itn.intraorange/sites/MUSCLES/_layouts/15/WopiFrame.aspx?sourcedoc={6702F20D-3EB2-4C4F-8AFA-85AA7D1B7D14}&file=B2G%20Teams%20Direct%20Routing%20-%20Common%20Issues%20Test.doc&action=default",
"wrap": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View",
"url": "https://shpc.itn.intraorange/sites/MUSCLES/_layouts/15/WopiFrame.aspx?sourcedoc={6702F20D-3EB2-4C4F-8AFA-85AA7D1B7D14}&file=B2G%20Teams%20Direct%20Routing%20-%20Common%20Issues%20Test.doc&action=default"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

posted card
image

and on click on the view button nothing happen

and the document is located in SharePoint Collaboration

Bug Triage automation moved this from Investigate to Closed Jan 21, 2021
@shereenfathy shereenfathy reopened this Jan 21, 2021
Bug Triage automation moved this from Closed to Needs triage Jan 21, 2021
@Mallipriya-MSFT
Copy link

@shereenfathy, It is working with the url copied from the address bar.

image

Card Json

{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "test",
"wrap": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View",
"url": "https://blrdev.sharepoint.com/:w:/r/sites/LibraryAssist142-Nikitha/_layouts/15/Doc.aspx?sourcedoc=%7BEDC75D3C-F612-4013-8122-2520595D6A42%7D&file=aosolis_TaskmodulePayloads.docx&action=default&mobileredirect=true"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

Onclick of view Button, document opens up

image

image

@shereenfathy
Copy link
Author

@shereenfathy, It is working with the url copied from the address bar.

image

Card Json

{
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "test",
"wrap": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "View",
"url": "https://blrdev.sharepoint.com/:w:/r/sites/LibraryAssist142-Nikitha/_layouts/15/Doc.aspx?sourcedoc=%7BEDC75D3C-F612-4013-8122-2520595D6A42%7D&file=aosolis_TaskmodulePayloads.docx&action=default&mobileredirect=true"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}

Onclick of view Button, document opens up

image

image

it is not working on my side, the document is located in SharePoint Collaboration .. does this make any problem? or is my link wrong ? also you can use my link to test.

@cadin
Copy link

cadin commented Jan 21, 2021

I'm experiencing the same (or similar) issue. Neither of the URLs provided by @shereenfathy or @Mallipriya-MSFT work for me. When clicking the button I get a "Something went wrong" message:
image

This is occurring for me in Teams desktop for Mac (R1).
The buttons seem to work properly in Teams for iOS, web, and in desktop Teams R2 or higher.

Does that line up with your experience @shereenfathy?

@RebeccaAnne RebeccaAnne moved this from Needs triage to Investigate in Bug Triage Jan 21, 2021
@ghost ghost removed the Triage-Needed label Jan 21, 2021
@ghost
Copy link

ghost commented Jan 21, 2021

Hi @shereenfathy. We have acknowledged this issue report. Please continue to follow this issue for updates/progress/questions.

@ghost ghost added the Triage-Investigate label Jan 21, 2021
@RebeccaAnne RebeccaAnne added this to the Short Term milestone Jan 21, 2021
@Mallipriya-MSFT
Copy link

@shereenfathy, I have tested with the url provided by you initially in Teams web app, It is working but when tested through Teams desktop app, it is not working. Can you check and confirm this behavior from your end ? Meanwhile, I will check internally.

@Mallipriya-MSFT
Copy link

Hi @cadin, I got it working when posted the adaptive card to channel, Just to confirm have you tested using the API Send chatMessage to channel with same request body format.

@cadin
Copy link

cadin commented Jan 25, 2021

@Mallipriya-MSFT Yes, that's how I'm sending them. It works for you in Teams desktop R1?

@shereenfathy
Copy link
Author

@shereenfathy, I have tested with the url provided by you initially in Teams web app, It is working but when tested through Teams desktop app, it is not working. Can you check and confirm this behavior from your end ? Meanwhile, I will check internally.

@Mallipriya-MSFT
in Teams web app the button is clickable but open the teams app in new tab instead of opening the right link, and yes it is not clickable in teams desktop app.

@Mallipriya-MSFT
Copy link

Hi @shereenfathy, Can we discuss this over a call? Could you please write to us at microsoftteamsdev@microsoft.com.

@RebeccaAnne RebeccaAnne added the Resolution-External Bugs resolved as external to AdaptiveCards. label Feb 4, 2021
@ghost ghost moved this from Investigate to External in Bug Triage Feb 4, 2021
@ghost ghost removed the Triage-Investigate label Feb 4, 2021
@Mallipriya-MSFT
Copy link

Hi @shereenfathy, are you still facing the issue?

@Mallipriya-MSFT
Copy link

@shereenfathy, For now we are closing the issue, please feel free to open again if the issue still persists.

Bug Triage automation moved this from External to Closed Feb 18, 2021
@galando
Copy link

galando commented Jul 25, 2021

Hey,

@Mallipriya-MSFT we are experiencing the same problem. We use "Action.OpenUrl" with url which contain about 200 characters. The button doesn't work from the app, although from mobile it works.

Can we reopen this issue?

@dacopan
Copy link

dacopan commented Aug 3, 2021

same error for me and occurs when:

  • the link is not https
  • not have domain only ip
  • link have spaces

@fabiobarboza7
Copy link

fabiobarboza7 commented Aug 18, 2021

@dacopan and others. I was getting same error. So now it's working for me even http. What a figured out is, if the URL has spaces, special caracters etccc it should be encode look what I did in my code:

http://jsondiff.com/?left=${encodeURIComponent(initialValue)}&right=${encodeURIComponent(lastData)}

Also in my case I used OpenUri (i instead of L).

So that's it, probably just need to encode before call the action.

@JhonBreTo
Copy link

I found this: The sharepoint/OneNote Url should be in encoded format. If URL has '{' and '}' it does not work. Please replace '{' with '%7B' and '}' with '%7D' respectively it will work.

Sample URL:

https://{domainName}.sharepoint.com/:w:/r/teams/My_Test/_layouts/15/Doc.aspx?sourcedoc=%7BF2B5321E-7CA9-468D-B628-8ECB9308F982%7D&file=Document.docx&action=default&mobileredirect=true

credits: https://techcommunity.microsoft.com/t5/teams-developer/teams-adaptive-card-won-t-open-onenote-url-s/m-p/2257072/thread-id/2951

@rahulyadav97185966
Copy link

I want to open the software center from the button. but it didn't work for me. Previously it worked.
I have used the below code.
{ "type": "openUrl", "title": "SCCM", "value": "softwarecenter:" }

Why it is not working now..

@Prasad-MSFT
Copy link

@rahulyadav97185966 - We are able to repro this issue. We have raised a bug for the same and engineering team is looking into it. We will inform you once we get any further update.
Thanks!

image

@rahulyadav97185966
Copy link

rahulyadav97185966 commented Nov 1, 2022

Okay @Prasad-MSFT, Any Updates on it ?

@Prasad-MSFT
Copy link

@rahulyadav97185966 - We are checking with engineering team about this issue. We will inform you once we have any update.
Thanks!

@rahulyadav97185966
Copy link

rahulyadav97185966 commented Nov 14, 2022

Hi @Prasad-MSFT, Any Updates on the issue? Could you please provide the solution or any suggestions? Cause it's been almost a month.

@rahulyadav97185966
Copy link

Hi @Prasad-MSFT @Mallipriya-MSFT, Any Updates on the issue ?

@Prasad-MSFT
Copy link

Hi @rahulyadav97185966 -
Engineering team is investigating the issue. We will update you once we have an ETA to share.

@Prasad-MSFT
Copy link

@rahulyadav97185966 - We got update from engineering team that, "Currently external deep link like softwarecenter: are not supported".

@rahulyadav97185966
Copy link

@Prasad-MSFT Is there any way that we can use external deep links like softwarecenter: Since we need to integrate this in the bot?

@Prasad-MSFT
Copy link

@rahulyadav97185966 - There is no such way to use external deep links.

@rahulyadav97185966
Copy link

When this bug will get fix. @Prasad-MSFT

@Prasad-MSFT
Copy link

@rahulyadav97185966 - We don't support external deep link like softwarecenter:. There is no plan for supporting them.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Inconsistency Bugs around renderer inconsistencies across different platforms Bug MSTeams-Developer-Support [DoNotDelete] Label to notify questions which needs attention from MSTeams Developer Support team. Resolution-External Bugs resolved as external to AdaptiveCards.
Projects
No open projects
Bug Triage
  
Closed
Development

No branches or pull requests