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

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

Open
IAM5K opened this issue Oct 23, 2024 · 10 comments
Assignees
Labels
investigating TA:Compute Team Area: Compute

Comments

@IAM5K
Copy link

IAM5K commented Oct 23, 2024

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:

  • Lifecycle provision was successfully executed for actions such as aadApp/create and arm/deploy.
  • However, the azureStorage/enableStaticWebsite action failed with a TypeError related to an AbortSignal.

Environment:

  • Azure Storage Account: xxxxxx
  • Teams App ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • Bot ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  • Extension Version: 5.10.0

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Oct 23, 2024
@adashen adashen added investigating TA:Compute Team Area: Compute labels Oct 23, 2024
@ls-msc
Copy link

ls-msc commented Oct 23, 2024

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
Copy link
Author

IAM5K commented Oct 23, 2024

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
Copy link
Member

Siglud commented Oct 24, 2024

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. #12583

@IAM5K
Copy link
Author

IAM5K commented Nov 4, 2024

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Nov 4, 2024
@Siglud
Copy link
Member

Siglud commented Nov 5, 2024

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.

@Siglud Siglud removed the needs attention This issue needs the attention of a contributor. label Nov 5, 2024
@IAM5K
Copy link
Author

IAM5K commented Nov 5, 2024

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Nov 5, 2024
@Siglud
Copy link
Member

Siglud commented Nov 11, 2024

The PR that I created are still in the release progress and will publish a pre-release version in this week.

As for this issue you mentioned, it looks like your code want to retrieve some data from Azure? Maybe you should switch to @azure/core-rest-pipeline instead of @azure/core-http because it's no longer supported. See https://www.npmjs.com/package/@azure/core-http/

@Siglud Siglud added investigating needs more info Need user to provide more info and removed needs attention This issue needs the attention of a contributor. labels Nov 11, 2024
@yukun-dong
Copy link
Contributor

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.

Hi @IAM5K , for the adaptive-card-tools issue, could you please kindly provide the name of the template/sample you are using? Thanks.

@IAM5K
Copy link
Author

IAM5K commented Nov 12, 2024

@yukun-dong , my project is about 2 years old and we have been updating our packages or dependency regularly.
After updating to the latest teams tooklit this package was marked as missing.
i added it manually and now the flow is working but it has deprecated warning.

        "@microsoft/adaptivecards-tools": "^1.3.5",

This package was not required separately, but now it is required and the adaptivecard.declare is now deprecated.

export class HelpCommandHandler implements TeamsFxBotCommandHandler {
  triggerPatterns: TriggerPatterns = "help";
  async handleCommandReceived(
    context: TurnContext,
    message: CommandMessage
  ): Promise<string | Partial<Activity> | void> {
    console.log(`Bot received message: ${message.text}`);
    const cardJson = AdaptiveCards.declare(helpCard).render();
    return MessageFactory.attachment(CardFactory.adaptiveCard(cardJson));
  }
}

@microsoft-github-policy-service microsoft-github-policy-service bot added needs attention This issue needs the attention of a contributor. and removed needs more info Need user to provide more info labels Nov 12, 2024
@yukun-dong
Copy link
Contributor

@IAM5K This change is intentional, as we plan to deprecate the "@microsoft/adaptivecards-tools" package in 2025. For more details, please refer to this post. If you'd like to continue using the package without deprecation warnings, please use a version prior to 1.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating TA:Compute Team Area: Compute
Projects
None yet
Development

No branches or pull requests

5 participants