OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
460 stars 189 forks source link

Failed deployments and provisioning: Issue with azureStorage/enableStaticWebsite during lifecycle provision #12571

Open IAM5K opened 1 week ago

IAM5K commented 1 week ago

Description: During the execution of the lifecycle provision for my Teams app deployment, I encountered an error with the azureStorage/enableStaticWebsite step. It seems to be related to fetching properties of the container $web in an Azure Storage Account.

Logs:

[2024-10-20T10:05:05.764Z] [Error] - Failed to execute lifecycle provision due to failed action: azureStorage/enableStaticWebsite.
gvr:Unable to get properties of container '$web' in Azure Storage Account 'xxxxxx' due to error: 
{"stack":"TypeError: Expected signal to be an instanceof AbortSignal\n\tat new e (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:243:339157)\n\tat /home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:243:327918\n\tat new Promise (<anonymous>)\n\tat i0e (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:243:327882)\n\tat m1e.fetch (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:790:3897)\n\tat m1e.sendRequest (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:790:2282)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async xlt.attemptSendRequest (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:792:9894)\n\tat async Vce.sendOperationRequest (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:791:27805)\n\tat async e.getProperties (/home/xxxx/.vscode/extensions/teamsdevapp.ms-teams-vscode-extension-5.10.0/out/src/extension.js:801:2566)"

Summary:

Environment:

Steps to Reproduce:

  1. Execute lifecycle provision using the existing configurations.
  2. The issue occurs at the azureStorage/enableStaticWebsite step when attempting to fetch container properties.

VS Code Extension Information: Version: 1.94.2 Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Linux x64 6.10.11-amd64

Teams Toolkit v5.10.0

Expected Behavior: The provisioning should complete without error, and the static website should be enabled.

Actual Behavior: Provisioning fails due to the TypeError: Expected signal to be an instanceof AbortSignal.

ls-msc commented 1 week ago

Same error here. To fix it we downgraded the VSCode Teams Toolkit Extension from 5.10.0 down to 5.8.2 so it seems the issue was introduced in 5.10.0

IAM5K commented 1 week ago

Thanks for the confirmation/support @ls-msc , I also tried to switch back and provision works there but the deployment fails. Also the @microsoft/adaptivecards-tools is missing in the new upgrade

[2024-10-23T08:55:47.681Z] [Info] -  [script stdout] node_modules/adaptivecards-templating/lib/json-schema-card.d.ts(1,31): error TS2307: Cannot find module 'adaptivecards/src/schema' or its corresponding type declarations.
src/TeamsBot.ts(1,31): error TS2307: Cannot find module '@microsoft/adaptivecards-tools' or its corresponding type declarations.
src/commands/wish.ts(2,31): error TS2307: Cannot find module '@microsoft/adaptivecards-tools' or its corresponding type declarations.

We need to manually install the package. For now this is a work around but not the solution for all.

This issue will confuse those who initialized the project with v 5.10.0. They will never know what can be the cause of failing provision and deployment.

Siglud commented 1 week ago

Sorry, there is a bug related to 5.10.0 because of the version of @azure/core-http has been changed.

I've created a fix to solve this problem. https://github.com/OfficeDev/teams-toolkit/pull/12583

IAM5K commented 22 hours ago

Since the PR is merged, is it safe to update the extension?

Siglud commented 2 hours ago

We still need to wait next release to bring this fix public. The next pre-release version will start at the middle of the Nov.

IAM5K commented 17 minutes ago

image

recently we started getting this error, with the package we discussed earlier. I had deployed the application by downgrading my teams toolkit. Do you suspect any issue or relation to the package you changed.