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

Bug (prefixed, informational): Visual Studio Upgrade Fails: Says invalid manifest version #9851

Open
wrharper-AASP opened this issue Sep 5, 2023 · 9 comments
Assignees
Labels
bug Something isn't working TA:E2E Team Area: E2E

Comments

@wrharper-AASP
Copy link

Describe the bug
I have already fixed this by downgrading my manifest version, this is more of an informational bug report.

To Reproduce
Steps to reproduce the behavior:
Just upgraded my project to the latest version via: https://github.com/OfficeDev/TeamsFx/wiki/Upgrade-project-to-use-Teams-Toolkit-5.0-features and look at the manifest.json file.

Expected behavior
Version change should automatically fix itself?
In my version before this upgrade, I was using 1.16, but it looks like it is forcing a downgrade on the manifest back to 1.14:

"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",

Screenshots

Teams Toolkit has checked manifest with its schema:

Summary:
1 failed.
(×) Error: /manifestVersion must be equal to constant

Trying to resolve actions for lifecycle provision
Action aadApp/create found for lifecycle provision
Action teamsApp/create found for lifecycle provision
Action script found for lifecycle provision
Action file/createOrUpdateJsonFile found for lifecycle provision
Action aadApp/update found for lifecycle provision
Action teamsApp/validateManifest found for lifecycle provision
Action teamsApp/zipAppPackage found for lifecycle provision
Action teamsApp/update found for lifecycle provision
Executing app registration and provision 

Lifecycle stage: provision(8 step(s) in total). The following actions will be executed: 
(1/8) Action aadApp/create: Create an Azure Active Directory app to authenticate users
(2/8) Action teamsApp/create: create a Teams app.
(3/8) Action script
(4/8) Action file/createOrUpdateJsonFile: Create or update JSON file.
(5/8) Action aadApp/update: Apply Azure Active Directory app manifest to an existing app
(6/8) Action teamsApp/validateManifest: validate a Teams app.
(7/8) Action teamsApp/zipAppPackage: build a Teams app package.
(8/8) Action teamsApp/update: update a Teams app.

Executing lifecycle provision
Trying to resolve actions for lifecycle provision
Action aadApp/create found for lifecycle provision
Action teamsApp/create found for lifecycle provision
Action script found for lifecycle provision
Action file/createOrUpdateJsonFile found for lifecycle provision
Action aadApp/update found for lifecycle provision
Action teamsApp/validateManifest found for lifecycle provision
Action teamsApp/zipAppPackage found for lifecycle provision
Action teamsApp/update found for lifecycle provision
Executing action aadApp/create in lifecycle provision
Executing action aadApp/create
Environment variable AAD_APP_CLIENT_ID already exist, skipping new Azure Active Directory app creation step.
Environment variable SECRET_AAD_APP_CLIENT_SECRET already exist, skipping new Azure Active Directory app creation step.
Action aadApp/create executed successfully
Action aadApp/create in lifecycle provision succeeded with output {}
Executing action teamsApp/create in lifecycle provision
Action teamsApp/create in lifecycle provision succeeded with output {"TEAMS_APP_ID":"SECURITY_NOTPUTTINGHERE","TEAMS_APP_TENANT_ID":"SECURITY_NOTPUTTINGHERE"}
Executing action script in lifecycle provision
Start to run command: "echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__DOMAIN=localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__ENDPOINT=https://localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__INDEXPATH=#";" on path: "C:\Users\zizzy\source\repos\AASPMessenger\AASPMessenger".
 [script action stdout] "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__DOMAIN=localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__ENDPOINT=https://localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__INDEXPATH=#";

Action script in lifecycle provision succeeded with output {"PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__DOMAIN":"localhost:44302","PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__ENDPOINT":"https://localhost:44302","PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__INDEXPATH":"#"}
Executing action file/createOrUpdateJsonFile in lifecycle provision
Action file/createOrUpdateJsonFile in lifecycle provision succeeded with output {}
Executing action aadApp/update in lifecycle provision
Executing action aadApp/update
Build Azure Active Directory app manifest completed, and app manifest content is written to C:\Users\zizzy\source\repos\AASPMessenger\AASPMessenger\build\aad.manifest.local.json
Applied manifest ./aad.manifest.json to Azure Active Directory application with object id SECURITY_NOTPUTTINGHERE
Action aadApp/update executed successfully
Action aadApp/update in lifecycle provision succeeded with output {"AAD_APP_ACCESS_AS_USER_PERMISSION_ID":"SECURITY_NOTPUTTINGHERE"}
Executing action teamsApp/validateManifest in lifecycle provision

Teams Toolkit has checked manifest with its schema:

Summary:
1 failed.
(×) Error: /manifestVersion must be equal to constant

Failed to Execute lifecycle provision due to failed action: teamsApp/validateManifest. ManifestValidationFailed:Teams Toolkit has completed checking your app package against validation rules. 1 failed.. Env output: {"TEAMS_APP_ID":"SECURITY_NOTPUTTINGHERE","TEAMS_APP_TENANT_ID":"SECURITY_NOTPUTTINGHERE","PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__DOMAIN":"localhost:44302","PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__ENDPOINT":"https://localhost:44302","PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__INDEXPATH":"#","AAD_APP_ACCESS_AS_USER_PERMISSION_ID":"SECURITY_NOTPUTTINGHERE"}
Execution summary:

Summary:
(×) Error: Lifecycle stage provision failed.
  (√) Done: aadApp/create was executed successfully.
  (√) Done: teamsApp/create was executed successfully.
    (√) Done: Teams app with id SECURITY_NOTPUTTINGHERE already exists, skipped creating a new Teams app.
  (√) Done: script was executed successfully.
    (√) Done: Successfully executed command echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__DOMAIN=localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__ENDPOINT=https://localhost:44302"; echo "::set-teamsfx-env PROVISIONOUTPUT__AZUREWEBAPPTABOUTPUT__INDEXPATH=#";
  (√) Done: file/createOrUpdateJsonFile was executed successfully.
    (√) Done: The json file has been generated successfully to ./appsettings.Development.json.
  (√) Done: aadApp/update was executed successfully.
    (√) Done: Applied manifest ./aad.manifest.json to Azure Active Directory application with object id SECURITY_NOTPUTTINGHERE
  (×) Error: teamsApp/validateManifest failed.
    (×) Error: Teams Toolkit has completed checking your app package against validation rules. 1 failed.
  (!) Warning: teamsApp/zipAppPackage was not executed.
  (!) Warning: teamsApp/update was not executed.

{
  "errorType": "UserError",
  "source": "AppStudioPlugin",
  "name": "ManifestValidationFailed",
  "message": "Teams Toolkit has completed checking your app package against validation rules. 1 failed.",
  "stack": "ManifestValidationFailed: Teams Toolkit has completed checking your app package against validation rules. 1 failed.\n    at Function.UserError (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at ValidateManifestDriver.validate (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at async ValidateManifestDriver.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async ValidateManifestDriver.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async ValidateManifestDriver.execute (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async Lifecycle.executeImpl (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async Lifecycle.execute (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async Coordinator.provision (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async Coordinator.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async FxCoreV3Implement.provisionResources (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async FxCoreV3Implement.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async FxCoreV3Implement.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async FxCoreV3Implement.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async Object.envLoaderMWImpl (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)\n    at async FxCoreV3Implement.<anonymous> (C:\\snapshot\\TeamsFx\\packages\\server\\lib\\index.js)",
  "innerError": null,
  "userData": null,
  "timestamp": "2023-09-05T12:41:13.923Z",
  "displayMessage": "Teams Toolkit has completed checking your app package against validation rules. 1 failed. Check [Output panel](command:fx-extension.showOutputChannel) for details.",
  "helpLink": null,
  "issueLink": null
}

I guess the real question at the end of the day is, why is Microsoft still using 1.14 when the 1.16 manifest is out? Upgrade to TeamsFx, but downgrade to manifest.

@microsoft-github-policy-service
Copy link
Contributor

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@manbuettner
Copy link

I have same Error after Update Node JS from 16.19.1 to 18.17.1

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Sep 6, 2023
@adashen adashen added investigating TA:E2E Team Area: E2E labels Sep 6, 2023
@nliu-ms
Copy link
Contributor

nliu-ms commented Sep 6, 2023

Thanks @wrharper-AASP @manbuettner , do you mean that previously you're using manifest version 1.16. But when you upgrade project by clicking upgrade in VS Code's upgrade notification or VS's upgrade info bar, the manifest version has been changed to 1.14? And it has some validation errors in manifest.json due to wrong "manifestVersion" value?

@manbuettner
Copy link

i change manually to 1.14 if i set to 1.16
Inside TokenValues i change for send here to XXX.
If you need the coplete Error, can i send with all the TenantID and Perrmission-ID?

i got this error:
(×) Error: /manifestVersion must be equal to constant

[2023-09-06T08:33:51.881Z] [Info] - Failed to Execute lifecycle provision due to failed action: teamsApp/validateManifest. ManifestValidationFailed:Teams Toolkit has completed checking your app package against validation rules. 1 failed.. Env output: {"TEAMS_APP_ID":"92fdce6f-13fc-4ed0-b62b-24102a112310","TEAMS_APP_TENANT_ID":"XXX-7dfc-461b-8428-5593067df953","PROVISIONOUTPUT__AZURESTORAGETABOUTPUT__DOMAIN":"localhost:53000","PROVISIONOUTPUT__AZURESTORAGETABOUTPUT__ENDPOINT":"https://localhost:53000","PROVISIONOUTPUT__AZURESTORAGETABOUTPUT__INDEXPATH":"/index.html#","AAD_APP_ACCESS_AS_USER_PERMISSION_ID":"XXX-c461-46a4-958f-975d93b9e7e4"}
[2023-09-06T08:33:51.887Z] [Info] - Execution summary:

Summary:
(×) Error: Lifecycle stage provision failed.
(√) Done: aadApp/create was executed successfully.
...

@wrharper-AASP
Copy link
Author

I manually dropped down to 1.14, this is just informational. Microsoft should be able to read the manifest via JSON format and detect this problem to fix it automatically.

@nliu-ms
Copy link
Contributor

nliu-ms commented Sep 7, 2023

Thanks @manbuettner @wrharper-AASP . We validate the manifest with its schema. This validation error usually happens when manifest version doesn't match version defined in schema.

E.g. Below can work:

"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",

or

"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.16",

But this one doesn't work:

"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",

I'm not if it is your case. Please let me know if I understood it.

@wrharper-AASP , you said this is informational. Do you mean that you expect Teams Toolkit to automatically update "manifestVersion" to make it compatible with schema, instead of throwing errors? Thanks.

@adashen adashen added needs more info Need user to provide more info and removed needs attention This issue needs the attention of a contributor. labels Sep 7, 2023
@manbuettner
Copy link

Thank you very much! i not check the line above after update from 4x to 5x

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Sep 7, 2023
@wrharper-AASP
Copy link
Author

yes somehow this happened:
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",
so i had to manually fix the schema which can be fixed automatically. They must have changed the manifestVersion during the update but not the $schema.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs more info Need user to provide more info label Sep 7, 2023
@nliu-ms
Copy link
Contributor

nliu-ms commented Sep 8, 2023

Thanks @wrharper-AASP , then it should be a bug of upgrading. Let me check, thanks for reporting!

@nliu-ms nliu-ms added bug Something isn't working and removed investigating needs attention This issue needs the attention of a contributor. labels Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working TA:E2E Team Area: E2E
Projects
None yet
Development

No branches or pull requests

4 participants