OfficeDev / microsoft-teams-library-js

JavaScript library for use by Microsoft Teams apps
https://docs.microsoft.com/microsoftteams/platform/
Other
433 stars 199 forks source link

"Invalid Setting" error when adding an app to a meeting and clicking on Save (Only in android) #1574

Open varunk29 opened 1 year ago

varunk29 commented 1 year ago

When we try to add an app to a meeting, it opens a configuration page and then after clicking on save , we get a message "Invalid Settings" and this is happening only on android , it works well in windows,web,macOS and ios

Teams js version - "@microsoft/teams-js": "^2.8.0"

Sample code of configuration page

app.initialize().then(() => { setMessage("Initialized"); pages.config.registerOnSaveHandler(async (saveEvent) => { setMessage("Clicked on save"); try { await pages.config.setConfig({ suggestedDisplayName: "APP_NAME", entityId: "Test123456789012", contentUrl: baseUrl + "/index.html#/tab", websiteUrl: baseUrl + "/index.html#/tabstatic", }); setMessage("Config saved"); saveEvent.notifySuccess(); } catch (err) { setMessage(err.message); } }); pages.config.setValidityState(true); });

Manifest file

`{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.12/MicrosoftTeams.schema.json",
"manifestVersion": "1.12",
"version": "1.1.8",
"id": "--------------------",
"packageName": "com.microsoft.teams.extension",
"developer": {
    "name": "Website",
    "websiteUrl": "https://www.website.ai",
    "privacyUrl": "https://www.website.ai/privacy",
    "termsOfUseUrl": "https://www.website.ai/terms"
},
"icons": {
    "color": "resources/color.png",
    "outline": "resources/outline.png"
},
"name": {
    "short": "APPNAME",
    "full": "APPNAME"
},
"description": {
    "short": "Desc",
    "full": "Desc"
},
"accentColor": "#FFFFFF",
"bots": [],
"composeExtensions": [],
"configurableTabs": [
    {
        "configurationUrl": "https://domain.com/index.html#/config",
        "canUpdateConfiguration": true,
        "scopes": [
            "team",
            "groupchat"
        ],
        "context": [
            "channelTab",
            "privateChatTab",
            "meetingChatTab",
            "meetingDetailsTab",
            "meetingSidePanel"
        ]
    }
],
"staticTabs": [
    {
        "entityId": "index0",
        "name": "Home",
        "contentUrl": "https://domain.com/index.html#/tab",
        "websiteUrl": "https://domain.com/index.html#/tab",
        "scopes": [
            "personal"
        ]
    }
],
"permissions": [
    "identity",
    "messageTeamMembers"
],
"validDomains": [
    "domain.com"
],
"defaultGroupCapability": {
    "team": "tab",
    "groupchat": "tab",
    "meetings": "bot"
}

}`

ghost commented 1 year ago

Hi varunk29! 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

@varunk29 - Thanks for reporting your issue. We will check this at our end and will get back to you.

sayali-MSFT commented 1 year ago

@varunk29 -We are not able to repro the issue as it is working fine from our end. Teams js version - "@microsoft/teams-js": "^2.8.0" Could you please update the teams version and check it once? Also, here we got the similar thread, please check it once-https://techcommunity.microsoft.com/t5/microsoft-teams/android-quot-invalid-settings-quot-while-adding-an-app-into-an/m-p/3686403

https://user-images.githubusercontent.com/93527375/217227464-02bd845f-1a29-4f23-83da-326505539a01.mp4

MicrosoftTeams-image (39)

varunk29 commented 1 year ago

Hey @sayali-MSFT thanks for replying back, I have upgraded the teams-js to 2.8.0, but it is still reproducible on my end. Do you need more information on reproducing this ?

sayali-MSFT commented 1 year ago

@varunk29 -Have you update the team client as well and check it once? If already updated, please share the version details as well so that we can try to reproduce from our end? Teams Client Version- 1416/1.0.0.2023012702/0115 Android Version-8.1.0

Feroz-Istar commented 1 year ago

Android Version : 13 Teams client version - 1416/1.0.02023012702

Issue Description: When we are trying to add Salesken App during a meeting it will display invalid setting

PFB Screenshot for the same:

Screenshot_2023-02-15-14-20-36-60_f56466bc4bb61e6d2de1f3b0468a89d9 Screenshot_2023-02-15-14-21-47-13_fc704e6b13c4fb26bf5e411f75da84f2 Screenshot_2023-02-15-14-22-07-13_fc704e6b13c4fb26bf5e411f75da84f2 Screenshot_2023-02-15-14-26-34-38_f56466bc4bb61e6d2de1f3b0468a89d9

https://user-images.githubusercontent.com/17778549/218982468-06607017-4c68-4fe6-a24a-15efbba8add5.mp4

sayali-MSFT commented 1 year ago

@Feroz-Istar -We are still not able to repro the issue. We have tried to add multiple apps in meeting. All are added successfully in meeting. also, have you facing issue with another app as well like YouTube, Asana? Meanwhile, have you tried the workaround given in below thread- https://techcommunity.microsoft.com/t5/microsoft-teams/android-quot-invalid-settings-quot-while-adding-an-app-into-an/m-p/3686403

We are checking this with internally and get back to you.

Sarthaksalesken commented 1 year ago

@sayali-MSFT Issue is reproducible for the Salesken App

  1. login to the MS Teams
  2. Join the meet from scheduled meet
  3. click on apps from action button
  4. search salesken app and click on add
  5. then click on right click option from the top

Attached : recording already uploaded

Logs.txt

sayali-MSFT commented 1 year ago

@Sarthaksalesken -Is the salesken App is available on teams store? If no, Could you please share the code repo so that we can try it from our end?

Feroz-Istar commented 1 year ago

@sayali-MSFT Salesken App is currently under review in teams store. we have provide the read access of repo on your github username. Please check let us know in any of any information required from our end

Hecedu commented 1 year ago

Hi, we are experiencing the exact same issue on our app. The message is also invalid settings when trying to add the app into any meeting in Teams Android Version 1416/1.0.0.2023022801/0130 Calling Version 2023.01.01.1 This does not occur on iOS. If the app is added using a desktop client or iOS and then accessed in android the app behaves as normal. I'm able to click the button so it's not a problem with microsoftTeams.pages.config.setValidityState() but with microsoftTeams.pages.config.setConfig() Screenshot_20230227-135628_2

sayali-MSFT commented 1 year ago

@Feroz-Istar @Hecedu - We are able to repro that issue, we have raised bug for the same and concerned team is looking into it. We will inform you once we get any update.

ChetanSharma-msft commented 1 year ago

I apologize for delay in response. We are actively checking the status of bug fixes with engineering team and will update this thread, once it is fixed.

Thanks!!

Hecedu commented 1 year ago

I apologize for delay in response. We are actively checking the status of bug fixes with engineering team and will update this thread, once it is fixed.

Thanks!!

Hi Chetan, any updates on this ticket?

sayali-MSFT commented 1 year ago

@Hecedu - Currently we don’t have ETA or Update on this thread. We will let you know once we have any updates on it. Thanks!!

Hecedu commented 1 year ago

Q4 check?

sayali-MSFT commented 1 year ago

@Hecedu Hope you are doing well!! Just wanted to inform you that engineering team is working on this issue, and we are tracking it closely. Once we get any update on it, we will inform you accordingly.

sayali-MSFT commented 11 months ago

Hello @everyone-We got the reply from the engineering team that, Here's the analysis and root cause for this behaviour.

When Salesken app is added and user tries to configure the tab, through setSettings API, teams recieves below settings json:

{
  "suggestedDisplayName": "Salesken",
  "entityId": "Test123456789012",
  "contentUrl": "https://saleskente9154f5tab.z29.web.core.windows.net:/index.html#/cues",
  "websiteUrl": "https://saleskente9154f5tab.z29.web.core.windows.net:/index.html#/tabstatic"
}

To allow this tab to be configured, a domain validation check is done b/w the urls in settings json and valid domains supported by the app.

The supported valid domains do have saleskente9154f5tab.z29.web.core.windows.net for the app, but none of the urls from the settings json match with this supported valid domain, the reason is the :, after .net in the urls https://saleskente9154f5tab.z29.web.core.windows.net:/index.html#/cues

we verified through a UT, if we remove the extra : as highlighted above in red, the check works fine and it'll allow the tab configuration to complete successfully.

Could you please fix the urls in settings json?

Hecedu commented 5 months ago

Hi @sayali-MSFT I never got a notification from GitHub so I just found your reply today. How would we work around this for local testing when the url would most likely have a base address of "https://localhost:port"? notice the duplicate colon.