Closed tbhaxor closed 1 week ago
It's coming from: https://stackoverflow.com/questions/78243635/unable-to-publish-the-ms-teams-application-using-teams-cli
Hey @tbhaxor, as you can publish the app from Teams Developer Portal, can you please provide the response from following API:
https://dev.teams.microsoft.com/emea/api/publishing
or
https://dev.teams.microsoft.com/emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true
Thanks!
can you please provide the response from following API:
From the Developer Portal or the CLI?
Here is the debug output of the publish command. You could see some changes in the error message because I have upgraded the toolkit from 3.0.0-alpha.ec50e3de8.0
to 3.0.0
version. Also I couldn't get why I am getting this error message given that I the owner/administrator of this app.
user argument list: ["publish","--env","prod","--debug"]
matched command: teamsapp publish
find option: {"token":"--env","option":"env","value":"prod","isGlobal":false}
find option: {"token":"--debug","option":"debug","value":true,"isGlobal":true}
set required option with default value, folder="./"
set interactive from command.defaultInteractiveOption (value=false)
sendTelemetryEvent ===> project-type, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","is-teamsfx":"true","teamsfx-config-type":"teamsapp.yml","teamsfx-config-version":"1.0.0","teamsfx-version-state":"compatible","teams-js":"false","has-manifest":"true","manifest-version":"1.15","manifest-app-id":"${{TEAMS_APP_ID}}","teamsfx-project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","languages":"js","manifest-capabilities":"staticTab","correlation-id":"","run-from":"Other"}
parsed context: {
"optionValues": {
"env": "prod",
"projectPath": "C:\\Users\\tbhaxor\\source\\repos\\teams-app\\packages\\teams-app",
"nonInteractive": true,
"correlationId": "dc0ed3a2-beea-4ce4-8fc7-e202f8f5e46a",
"platform": "cli"
},
"globalOptionValues": {
"debug": true,
"interactive": false
},
"argumentValues": [],
"telemetryProperties": {
"command-name": "teamsapp publish",
"component": "cli",
"run-from": "Other",
"bin-name": "teamsapp",
"command-debug": "true",
"command-verbose": "undefined",
"command-help": "undefined",
"command-interactive": "false",
"command-version": "undefined",
"correlation-id": "dc0ed3a2-beea-4ce4-8fc7-e202f8f5e46a",
"is-teamsfx": "true",
"teamsfx-config-type": "teamsapp.yml",
"teamsfx-config-version": "1.0.0",
"teamsfx-version-state": "compatible",
"teams-js": "false",
"has-manifest": "true",
"manifest-version": "1.15",
"manifest-app-id": "${{TEAMS_APP_ID}}",
"teamsfx-project-id": "e7cadaac-166d-4d69-b390-ee6ae822680d",
"languages": "js",
"manifest-capabilities": "staticTab"
}
}
sendTelemetryEvent ===> publish-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","command-name":"teamsapp publish","component":"cli","run-from":"Other","command-debug":"true","command-verbose":"undefined","command-help":"undefined","command-interactive":"false","command-version":"undefined","correlation-id":"","is-teamsfx":"true","teamsfx-config-type":"teamsapp.yml","teamsfx-config-version":"1.0.0","teamsfx-version-state":"compatible","teams-js":"false","has-manifest":"true","manifest-version":"1.15","manifest-app-id":"${{TEAMS_APP_ID}}","teamsfx-project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","languages":"js","manifest-capabilities":"staticTab","success":"yes"}
sendTelemetryEvent ===> teamsApp/zipAppPackage-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","component":"teamsAppzipAppPackage","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
(√)Done: Teams Package C:\Users\tbhaxor\source\repos\teams-app\packages\teams-app\appPackage\build\appPackage.prod.zip built successfully!
sendTelemetryEvent ===> teamsApp/zipAppPackage, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","success":"yes","component":"teamsAppzipAppPackage","customized-manifest-keys":"TAB_ENDPOINT;TAB_DOMAIN;AAD_APP_CLIENT_ID","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> teamsApp/validateAppPackage-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","component":"teamsAppvalidateAppPackage","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> metadata, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","manifest.id":"e0fd1a00-f088-463e-8e66-9c7c0e81902f","manifest.version":"1.1.0","manifest.manifestVersion":"1.15","manifest.bots":"","manifest.composeExtensions":"","manifest.staticTabs.contentUrl":"dda67d8039af726239997ab1239f268fa27a30eabdd2622a697a2844dddfa5af","manifest.configurableTabs.configurationUrl":"","manifest.webApplicationInfo.id":"f791fb2b-bbe5-4988-a16a-c8116f2d3e9c","manifest.extensions":"false","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<validate-app-package-url>","component":"AppStudioPlugin","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<validate-app-package-url>","region":"global","component":"AppStudioPlugin","success":"yes","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
Teams Toolkit has checked against all validation rules:
Summary:
49 passed.
(√) Done: Package of your add-in was parsed successfully.
(√) Done: Your package matches the submission type.
(√) Done: Manifest version is not missing and follows the guideline.
(√) Done: Schema URL is present.
(√) Done: Manifest Version and Schema version are the same
(√) Done: Checking the existence of "id".
(√) Done: Field 'id' is a Guid in the manifest.
(√) Done: PackageName is not defined on manifest with version greater than 1.16.
(√) Done: App version should not start with '0'.
(√) Done: App version should contain only numbers separated by dots.
(√) Done: Short name is not missing in the manifest
(√) Done: Short name has the correct length
(√) Done: Short name doesn't contain "Microsoft" or any of the "Microsoft product" names
(√) Done: Short name doesn't contain beta environment keywords
(√) Done: Short name is not reserved name.
(√) Done: Short description is not missing
(√) Done: Short description has the corrected length
(√) Done: Short description doesn't contain copyrighted brand names
(√) Done: Full description has the corrected length
(√) Done: Full description doesn't contain copyrighted brand
(√) Done: Full description does not repeat the same lines in short description
(√) Done: Required field 'developer name' is missing in the manifest.
(√) Done: Developer name has the correct length.
(√) Done: Developer name is valid.
(√) Done: Website URL is not missing in the manifest.
(√) Done: Website URL has the correct length.
(√) Done: Website URL is secure
(√) Done: Website URL is valid and follows the guideline
(√) Done: Privacy URL is not missing in the manifest.
(√) Done: Privacy URL has the correct length
(√) Done: Privacy URL is secure
(√) Done: Privacy URL must not be hosted in the different domain as compared with Company/Website URL
(√) Done: Privacy URL does not point to Beta environment
(√) Done: Terms of use URL is not missing
(√) Done: Terms of use URL has the correct length
(√) Done: Term of use URL is secure
(√) Done: Term of use URL does not point to Beta environment
(√) Done: Term of use URL must not be hosted in the different domain as compared with Company/Website URL
(√) Done: MPNID length cannot be more than 10 symbols
(√) Done: Valid domains don't contain tunneling site
(√) Done: Valid domains don't contain hosting site with a wildcard
(√) Done: Large icon should be 192x192 with no transparency. Image icons are as per guidelines
(√) Done: Small icon has the correct size (32x32)
(√) Done: StaticTabs are in personal scope
(√) Done: Non-reserved staticTabs "Name" property cannot be empty.
(√) Done: Manifest should not contain reserved Activity Type 'systemDefault'.
(√) Done: Manifest should not contain duplicate Activity Type.
(√) Done: Acceptance test service has finished checking provided add-in.
sendTelemetryEvent ===> teamsApp/validateAppPackage, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","success":"yes","component":"teamsAppvalidateAppPackage","id":"e0fd1a00-f088-463e-8e66-9c7c0e81902f","version":"1.1.0","capabilities":"staticTab","manifestVersion":"1.15","isApiME":false,"isSPFx":false,"correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> teamsApp/publishAppPackage-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","component":"teamsApppublishAppPackage","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<get-published-app-url>","component":"AppStudioPlugin","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<get-published-app-url>","region":"emea","component":"AppStudioPlugin","success":"yes","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
Update published Teams app
sendTelemetryEvent ===> app-studio-api-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<update-published-app-url>","component":"AppStudioPlugin","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api-start, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<get-published-app-url>","component":"AppStudioPlugin","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryEvent ===> app-studio-api, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","url":"<get-published-app-url>","region":"emea","component":"AppStudioPlugin","success":"yes","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryErrorEvent ===> teamsApp/publishAppPackage, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","component":"teamsApppublishAppPackage","success":"no","error-code":"AppStudioPlugin.TeamsAppPublishFailed","error-type":"system","error-message":"Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true","error-stack":"TeamsAppPublishFailed: Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true\n at AppStudioResultFactory.SystemError (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4445720)\n at Object.publishTeamsAppUpdate (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4380809)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PublishAppPackageDriver.publish (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4442874)\n at async PublishAppPackageDriver.<anonymous> (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4350732)\n at async PublishAppPackageDriver.execute (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4440186)\n at async TeamsAppMgr.publishTeamsApp (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4453966)\n at async FxCore.publishTeamsAppCLIV3 (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4725664)\n at async exports.ErrorHandlerMW (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4796482)\n at async FxCore.<anonymous> (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4792233)","error-name":"TeamsAppPublishFailed","error-component":"ManifestUtils","error-stage":"publishTeamsAppCLIV3","error-method":"_readAppManifest","error-source":"Teams","correlation-id":"aac4d7bd-b301-463a-9bd7-05ab06a4d86e","run-from":"Other"}
sendTelemetryErrorEvent ===> publish, properties: {"bin-name":"teamsapp","project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","command-name":"teamsapp publish","component":"cli","run-from":"Other","command-debug":"true","command-verbose":"undefined","command-help":"undefined","command-interactive":"false","command-version":"undefined","correlation-id":"","is-teamsfx":"true","teamsfx-config-type":"teamsapp.yml","teamsfx-config-version":"1.0.0","teamsfx-version-state":"compatible","teams-js":"false","has-manifest":"true","manifest-version":"1.15","manifest-app-id":"${{TEAMS_APP_ID}}","teamsfx-project-id":"e7cadaac-166d-4d69-b390-ee6ae822680d","languages":"js","manifest-capabilities":"staticTab","success":"no","env":"6754af9632a2745e85c293e5aac0863370d9bd3330b9938c00cadfd215227d77","error-code":"AppStudioPlugin.TeamsAppPublishFailed","error-type":"system","error-message":"Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true","error-stack":"TeamsAppPublishFailed: Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true\n at AppStudioResultFactory.SystemError (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4445720)\n at Object.publishTeamsAppUpdate (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4380809)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PublishAppPackageDriver.publish (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4442874)\n at async PublishAppPackageDriver.<anonymous> (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4350732)\n at async PublishAppPackageDriver.execute (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4440186)\n at async TeamsAppMgr.publishTeamsApp (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4453966)\n at async FxCore.publishTeamsAppCLIV3 (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4725664)\n at async exports.ErrorHandlerMW (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4796482)\n at async FxCore.<anonymous> (C:\\Users\\tbhaxor\\source\\repos\\teams-app\\node_modules\\@microsoft\\teamsapp-cli\\lib\\index.js:14:4792233)","error-name":"TeamsAppPublishFailed","error-component":"","error-stage":"","error-method":"","error-source":""}
(×) Error: AppStudioPlugin.TeamsAppPublishFailed: Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true
Call stack: TeamsAppPublishFailed: Unable to publish Teams app with ID e0fd1a00-f088-463e-8e66-9c7c0e81902f.Request path: POST /emea/api/publishing/f99fd0c1-6340-48ff-a99e-2f542c84b4f1/appdefinitions?teamstoolkit=true
at AppStudioResultFactory.SystemError (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4445720)
at Object.publishTeamsAppUpdate (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4380809)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PublishAppPackageDriver.publish (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4442874)
at async PublishAppPackageDriver.<anonymous> (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4350732)
at async PublishAppPackageDriver.execute (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4440186)
at async TeamsAppMgr.publishTeamsApp (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4453966)
at async FxCore.publishTeamsAppCLIV3 (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4725664)
at async exports.ErrorHandlerMW (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4796482)
at async FxCore.<anonymous> (C:\Users\tbhaxor\source\repos\teams-app\node_modules\@microsoft\teamsapp-cli\lib\index.js:14:4792233)
Thanks @tbhaxor , I mean Teams Developer Portal network trace.
Or can you please provide your app package zip file to me? Then I can try if I can reproduce the error.
The application is used privately within the tenant, please share your email, and I will send it to you.
hi @tbhaxor, we can reproduce the error now. The exception is due to empty response body from an external API. We are currently contacting the related teams for a solution. Sorry for the inconvenience.
Thank you @anchenyi and @nliu-ms for your assistance. Really appreciate it.
Hi there! Any updates on the fix?
hi @tbhaxor we are still working with the relevant team to resolve the issue. I will post updates here once we have a solution. Thanks.
hi @tbhaxor, the root cause is that our upstream does not correctly handle the \"
in the description, which results in broken JSON input. One temporary workaround is to remove the \"
from your description. The related code fix is in progress, and I will update here once the fix is completed. Sorry for the inconvenience. cc @nliu-ms
Hi @anchenyi Thanks for your response. I have another follow up question.
It is hard to maintain the full description markdown minified in one line. Is there any way we could reference the markdown file?
hi @tbhaxor , right now we do not support referencing a markdown file. @MuyangAmigo could you help to check this requirement?
Hi @tbhaxor, this issue has been resolved. It's fine to use \"
now.
How can I login @microsoft/teamsapp-cli
in the CI using environment variables like it is done in teamsfx (which is deprecated now)?
Also which version should I install to test the fix?
hi @tbhaxor , the fix had been deployed on the backend service. You do not need to change the toolkit version.
How can I login @microsoft/teamsapp-cli in the CI using environment variables like it is done in teamsfx
@jayzhang could you help to check this question?
Ping 0x00. My questions aren't answered.
hi @tbhaxor , right now we do not support referencing a markdown file. @MuyangAmigo could you help to check this requirement?
I have found a workaround for this. You may ignore this question.
Describe the bug
I want to publish the teams application from the
@microsoft/teamsapp-cli
. I can seeteamsApp/update
is working fine butteamsApp/publishAppPackage
from the same provision lifecycle configuration is giving me the error. Unfortunately (even with--verbose
and--debug
), this is all I am getting on the console.To Reproduce Steps to reproduce the behavior:
npm i -g @microsoft/teamsapp-cli
)teamsapp account login m365
)teamsapp provision --env prod && teamsapp deploy --env prod
)teamsapp publish --env prod
)Expected behavior
It should work, as
teamsApp/update
is working. I can also confirm that Publish from the web ui (https://dev.teams.microsoft.com/apps/${APP_ID}/overview) is working.And I can confirm the application (v1.1.0) was submitted for approval, and is now approved.
VS Code Extension Information (please complete the following information): N/A
CLI Information (please complete the following information):
Additional context
Lifecycle hook configuration from
teamsapp.yaml