OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
451 stars 177 forks source link

AppStudioPlugin.TeamsAppUpdateFailed - Unable to update the app from the YAML actions "teamsApp" #12070

Closed andres-swax closed 1 month ago

andres-swax commented 1 month ago

Describe the bug

When trying to run teamsApp/update there is an error. A similar error is also triggered by teamsApp/create if the app doesn't exist (TEAMS_APP_ID empty on env files).

An error 500 is raised on the Teams dev portal/apps section as well when trying to delete an app.

To Reproduce

Start any TTK project which has not been provisioned before. It will fail on the first step, creating the Teams app.

Start a TTK project which has been provisioned. It will fail on the last step, where the teams app is updated.

I detected this today beginning 2024/07/26 5 PM EDT. Until last night (2024/07/25) it was working just fine.

Happens with Release and Pre-Release versions of TTK.

This feels more like a backend issue, but even if the Teams app is already properly configured in the portal and there is no need for any update, it's still not possible to start a debug session.

Additional Info

Sample log relevant part. On this particular scenario the app already existed so there was no error on step 1.

(√) Done: teamsApp/create was executed successfully. (√) Done: Teams app with id abcdefa-xxxx-yyyy-zzzz-c1de49bnnnnn already exists, skipped creating a new Teams app. (√) Done: aadApp/create was executed successfully. (√) Done: aadApp/update was executed successfully. (√) Done: Applied manifest ./appPackage/aad.manifest.json to Microsoft Entra application with object id uuuuuu-kkkl-nnnn-be03-xxxxxxxx (√) Done: file/createOrUpdateEnvironmentFile was executed successfully. (√) Done: Variables have been generated successfully to c:\xyzhere.env. (√) Done: arm/deploy was executed successfully. (√) Done: ARM templates are deployed successfully. Resource group name: rg-hello-there-local. Deployment name: my-deployment-name (√) Done: botFramework/create was executed successfully. (√) Done: The bot registration has been updated successfully (https://dev.botframework.com/bots?id=xxxxxxxx-rrrrrrrr-4412-aaaa-gdffdgfdg). (√) Done: arm/deploy was executed successfully. (√) Done: ARM templates are deployed successfully. Resource group name: rg-my-resource-group-local. Deployment name: Create-my-custom-step-here (√) Done: teamsApp/validateManifest was executed successfully. (√) Done: teamsApp/zipAppPackage was executed successfully. (√) Done: teamsApp/validateAppPackage was executed successfully. (×) Error: teamsApp/update failed. (×) Error: Unable to update Teams app with ID nnnnnnnn-2b73-4c38-a768-xyzyxysysysys in Teams Developer Portal due to Unable to make API call to Developer Portal: AxiosError, Request failed with status code 422, API name: create-app, X-Correlation-ID: f57c43e3-xxxx-4615-zzzz-0a9123123aa8bf. This may be due to a temporary service error. Try again after a few minutes. data: "Error while updating assets to the blob storage for tenant id 34343434-1111-2222-8722-34343433222, appDefinitionId 23232323-1111-4c38-333-c1433434343. Error message: Error while deleting assets from the blob storage for tenant id 34343434-1111-2222-8722-34343433222, appDefinitionId 23232323-1111-4c38-333-c1433434343. Error message: Key based authentication is not permitted on this storage account."

microsoft-github-policy-service[bot] commented 1 month ago

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.

andres-swax commented 1 month ago

Update: 24h later, still broken.

NNemec commented 1 month ago

I see the same error here. Same project I successfully provisioned ~2 weeks ago. Today it fails with that error.

I found this post about the error message itself: https://learn.microsoft.com/en-us/answers/questions/401852/im-getting-error-message-key-based-authentication - but going through the suggested steps, I find that the default setting for the generated storage account that is automatically created in Azure portal on first provisioning is already "Enabled": image

Experimentally setting that flag to "Disabled" causes the earlier step "azureStorage/enableStaticWebsite" to fail, which makes me wonder whether the new error in "teamsApp/update" discussed here might come from a different storage account?

andres-swax commented 1 month ago

That link does reinforce my idea that it is something broken on the backend. Maybe the actions do use some temp storage and that's what's broken.

Speculating only.


From: Norbert Nemec @.> Sent: Sunday, July 28, 2024 10:55:13 AM To: OfficeDev/teams-toolkit @.> Cc: Andrés Santamaría @.>; Author @.> Subject: Re: [OfficeDev/teams-toolkit] AppStudioPlugin.TeamsAppUpdateFailed - Unable to update the app from the YAML actions "teamsApp" (Issue #12070)

I see the same error here. Same project I successfully provisioned ~2 weeks ago. Today it fails with that error.

I found this post about the error message itself: https://learn.microsoft.com/en-us/answers/questions/401852/im-getting-error-message-key-based-authentication - but going through the suggested steps, I find that the default setting for the generated storage account that is automatically created in Azure portal on first provisioning is already "Enabled": image.png (view on web)https://github.com/user-attachments/assets/33671d25-8970-428f-8c12-6c1cdba232c2

Experimentally setting that flag to "Disabled" causes the earlier step "azureStorage/enableStaticWebsite" to fail, which makes me wonder whether the new error in "teamsApp/update" discussed here might come from a different storage account?

— Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/teams-toolkit/issues/12070#issuecomment-2254564131, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABKRZ6OVTQLTCUKI5YADU23ZOUH6DAVCNFSM6AAAAABLRO3UACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU3DIMJTGE. You are receiving this because you authored the thread.Message ID: @.***>

HuihuiWu-Microsoft commented 1 month ago

Duplicated with https://github.com/OfficeDev/teams-toolkit/issues/12092