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

Uninstall application package with json manifest by manifest id not working #13094

Open
tranhuyentran23 opened this issue Jan 21, 2025 · 5 comments
Labels
needs attention This issue needs the attention of a contributor.

Comments

@tranhuyentran23
Copy link

Describe the bug

To Reproduce

  1. Sideload the application package with json manifest by command line:
    teamsapp install --file-path appPackage.zip

  2. Observe the manifest sideloaded successfully

  3. Uninstall the sideloaded manifest by manifest id
    teamsapp uninstall -i false --mode manifest-id --manifest-id <manifestId> --options m365-app
    (manifestId is the "id" property of the json manifest as definition in document)

  4. An error was shown

Expected behavior
The sideloaded manifest will be uninstall successfully without any errror

Screenshots

Image

VS Code Extension Information:

  • OS: Windows 10
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jan 21, 2025
Copy link

👋 Hi @tranhuyentran23,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

To address the issue with uninstalling the application package by manifest id, follow these steps to troubleshoot and resolve the problem:

  1. Verify Manifest ID: Ensure that the manifestId you are using is correct and matches the "id" property in your JSON manifest file. You can open the appPackage.zip and inspect the manifest file to confirm this.

  2. Confirm Uninstall Command: Double-check the command syntax you are using to uninstall the app. Based on the error description, your command should look like this:

    teamsapp uninstall --manifest-id <manifestId> --options m365-app
  3. Check for Errors in Command Execution: Look at the error message displayed when you attempt to uninstall the app. This might give you more insight into what is going wrong.

  4. Use a JSON Validator: Ensure that your JSON manifest file is correctly formatted. Malformed JSON can sometimes cause issues with commands that rely on the manifest file. Use a JSON validator tool to check for syntax errors.

  5. Refer to Documentation: As mentioned in your question, refer to the official documentation to ensure you are following the correct steps for sideloading and uninstalling the app.

  6. Update Teams Toolkit: Ensure that you are using the latest version of the Teams Toolkit. Sometimes issues are resolved in newer versions, so updating might help.

Example Steps for Troubleshooting

  1. Inspect the JSON Manifest:

    {
      "id": "your-manifest-id",
      // other properties
    }

    Make sure the "id" property matches the manifestId you are using in the uninstall command.

  2. Run the Uninstall Command:

    teamsapp uninstall --manifest-id your-manifest-id --options m365-app

If the problem persists after following these steps, consider providing more details about the error message you are receiving. This will help in diagnosing the issue more precisely.

For additional support, you can also refer to related issues on GitHub, such as:

By following these steps, you should be able to identify and resolve the issue with uninstalling the application package by manifest id.


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@Meghana-MSFT
Copy link

Thank you for reporting this, we will check this and get back to you.

@Meghana-MSFT
Copy link

@tranhuyentran23 - We tested this at our end, and we are able to run the uninstall command successfully. Could you please confirm that you have used correct manifest id only?

Image

@tranhuyentran23
Copy link
Author

Hi @Meghana-MSFT , I tried with a sample zip package that using schema:
https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json
manifestVersion: devPreview
manifest id: e923e00f-b3e3-123d-b81e-de9c3a31718c

Image

Could you help to take a look at my sample json that I was using, and let me know if I missed any config. Thanks!

{
    "$schema": "https://developer.microsoft.com/json-schemas/teams/vDevPreview/MicrosoftTeams.schema.json",
    "accentColor": "#230201",
    "authorization": {
        "permissions": {
            "resourceSpecific": [
                {
                    "name": "Document.ReadWrite.User",
                    "type": "Delegated"
                }
            ]
        }
    },
    "description": {
        "full": "This is the template to get started.",
        "short": "A template to get started."
    },
    "developer": {
        "name": "Contoso",
        "privacyUrl": "https://www.contoso.com/privacy",
        "termsOfUseUrl": "https://www.contoso.com/servicesagreement",
        "websiteUrl": "https://www.contoso.com"
    },
    "extensions": [
        {
            "requirements": {
                "capabilities": [
                    {
                        "minVersion": "1.1",
                        "name": "Selection"
                    },
                    {
                        "minVersion": "1.1",
                        "name": "DialogApi"
                    },
                    {
                        "minVersion": "1.5",
                        "name": "WordApi"
                    }
                ],
                "scopes": [
                    "document"
                ]
            },
            "ribbons": [
                {
                    "contexts": [
                        "default"
                    ],
                    "requirements": {
                        "capabilities": [
                            {
                                "minVersion": "1.1",
                                "name": "AddinCommands"
                            }
                        ],
                        "formFactors": [
                            "desktop"
                        ],
                        "scopes": [
                            "document"
                        ]
                    },
                    "tabs": [
                        {
                            "builtInTabId": "TabHome",
                            "groups": [
                                {
                                    "controls": [
                                        {
                                            "actionId": "Office.AutoShowTaskpaneWithDocument",
                                            "enabled": true,
                                            "icons": [
                                                {
                                                    "size": 16,
                                                    "url": "https://localhost:3000/assets/icon-16.png"
                                                },
                                                {
                                                    "size": 32,
                                                    "url": "https://localhost:3000/assets/icon-16.png"
                                                },
                                                {
                                                    "size": 80,
                                                    "url": "https://localhost:3000/assets/icon-16.png"
                                                }
                                            ],
                                            "id": "msgReadOpenPaneButton",
                                            "label": "Show Taskpane",
                                            "overriddenByRibbonApi": false,
                                            "supertip": {
                                                "description": "Opens a pane displaying all available properties.",
                                                "title": "Show Taskpane"
                                            },
                                            "type": "button"
                                        }
                                    ],
                                    "icons": [
                                        {
                                            "size": 16,
                                            "url": "https://localhost:3000/assets/icon-16.png"
                                        },
                                        {
                                            "size": 32,
                                            "url": "https://localhost:3000/assets/icon-32.png"
                                        },
                                        {
                                            "size": 80,
                                            "url": "https://localhost:3000/assets/icon-80.png"
                                        }
                                    ],
                                    "id": "msgReadGroup",
                                    "label": "Contoso Add-in"
                                }
                            ]
                        }
                    ]
                }
            ],
            "runtimes": [
                {
                    "code": {
                        "page": "https://localhost:3000/functions.html"
                    },
                    "id": "ow365.FunctionFile.Url",
                    "lifetime": "short",
                    "requirements": {
                        "capabilities": [
                            {
                                "minVersion": "1.1",
                                "name": "AddinCommands"
                            }
                        ],
                        "formFactors": [
                            "desktop"
                        ]
                    },
                    "type": "general"
                },
                {
                    "actions": [
                        {
                            "id": "Office.AutoShowTaskpaneWithDocument",
                            "multiselect": false,
                            "pinnable": false,
                            "supportsNoItemContext": false,
                            "type": "openPage"
                        }
                    ],
                    "code": {
                        "page": "https://localhost:3000/index.html"
                    },
                    "id": "Index.Url",
                    "lifetime": "short",
                    "requirements": {
                        "capabilities": [
                            {
                                "minVersion": "1.1",
                                "name": "AddinCommands"
                            }
                        ],
                        "formFactors": [
                            "desktop"
                        ]
                    },
                    "type": "general"
                }
            ]
        }
    ],
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "id": "e923e00f-b3e3-123d-b81e-de9c3a31718c",
    "localizationInfo": {
        "additionalLanguages": [
        ],
        "defaultLanguageTag": "en-us"
    },
    "manifestVersion": "devPreview",
    "name": {
        "full": "Contoso Add-in",
        "short": "contoso"
    },
    "showLoadingIndicator": true,
    "validDomains": [
        "contoso.com"
    ],
    "version": "4.1.0"
}

@Meghana-MSFT
Copy link

We will check this internally and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention This issue needs the attention of a contributor.
Projects
None yet
Development

No branches or pull requests

2 participants