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

Error: cli/runNpxCommand(deploy to Azure Static Web Apps) failed. #13114

Open
patentslump opened this issue Jan 28, 2025 · 4 comments
Open

Error: cli/runNpxCommand(deploy to Azure Static Web Apps) failed. #13114

patentslump opened this issue Jan 28, 2025 · 4 comments
Assignees
Labels
needs attention This issue needs the attention of a contributor. TA:Compute Team Area: Compute

Comments

@patentslump
Copy link

Describe the bug
A clear and concise description of what the bug is.
Can't deploy to dev. Had the same problem Two days ago, and it got better on its own...Don't know why
(×) Error: Unable to execute script action. Script: `npx @azure/static-web-apps-cli deploy ./dist
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'deploy
  2. Click on '....'dev
  3. Scroll down to '....'
  4. See error
    ×) Error: Lifecycle stage deploy failed.
    (√) Done: cli/runNpmCommand(install dependencies) was executed successfully.
    (√) Done: npm install command executed at /Users/andrewkirby/TeamsApps/TeamTraining/teamTraining/.
    (√) Done: cli/runNpmCommand(build app) was executed successfully.
    (√) Done: npm run build --if-present command executed at /Users/andrewkirby/TeamsApps/TeamTraining/teamTraining/.
    (×) Error: cli/runNpxCommand(deploy to Azure Static Web Apps) failed.
    (×) Error: Unable to execute script action. Script: npx @azure/static-web-apps-cli deploy ./dist -d <REDACTED:secret> --env production. Error: ✖ ✖ Deployment Failed :( ✖ Deployment Failure Reason: Could not load StaticSitesClient metadata from remote. Please check your internet connection. ✖ For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/azure/static-web-apps/ ✖ If you believe this behavior is unexpected, please raise a GitHub issue at: https:***
    (!) Warning: cli/runNpmCommand(install dependencies) was not executed.
    (!) Warning: cli/runNpmCommand(build app) was not executed.
    (!) Warning: azureFunctions/zipDeploy was not executed.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

VS Code Extension Information (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

CLI Information (please complete the following information):

  • OS: [e.g. iOS8.1] Mac OS 15.2
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Copy link

👋 Hi @patentslump,

Thank you for reporting this issue! We want to let you know that:

⏱️ Our team will personally review your issue
🎯 You can expect a response within 2 business days

✨ This is an AI-generated initial response
🤖 AI-Generated Preliminary Analysis:

Based on the provided error logs and the current question, it seems you are encountering issues when deploying to Azure Static Web Apps using the Teams Toolkit. The error message indicates that there is a problem with loading StaticSitesClient metadata from remote sources, which may be related to internet connectivity or access issues.

Error Details:

Error: Unable to execute script action. Script: `npx @azure/static-web-apps-cli deploy ./dist -d <REDACTED:secret> --env production`. Error: `✖ 
✖ Deployment Failed :(
✖ Deployment Failure Reason: Could not load StaticSitesClient metadata from remote. Please check your internet connection.

Potential Solutions:

  1. Check Internet Connection:

    • Ensure that your internet connection is stable and active. The error message explicitly mentions checking the internet connection.
  2. Antivirus Software:

  3. Network and Firewall Settings:

    • Verify that there are no network or firewall settings blocking access to Azure services. You may need to whitelist certain URLs or IP addresses.
  4. Azure Configuration:

    • Ensure that your Azure configuration and credentials are correctly set up. This includes verifying that the deployment environment is correctly configured and that the StaticSitesClient can access the necessary metadata.
  5. Retry the Deployment:

    • Sometimes, transient issues can cause deployment failures. Retry the deployment after ensuring network connectivity and configuration settings.
  6. Azure Static Web Apps Documentation:

  7. Open a GitHub Issue:

    • If the issue persists, consider raising a GitHub issue with detailed information about your setup and the error. This can help the maintainers provide more targeted assistance.
    • Reference: Teams Toolkit GitHub Issues

Actionable Steps:

  1. Check Internet Connection:

    • Ensure your internet connection is working properly.
  2. Antivirus Check:

    • Check if your antivirus software is blocking or quarantining StaticSitesClient.exe and add an exception if necessary.
  3. Network and Firewall:

    • Verify that your network and firewall settings allow access to Azure services.
  4. Retry Deployment:

    • Retry the deployment after verifying the above steps.
  5. Refer to Documentation:

    • Consult the Azure Static Web Apps documentation for further guidance.
  6. Raise an Issue:

    • If unresolved, raise an issue on the Teams Toolkit GitHub repository with detailed information.

By following these steps, you should be able to troubleshoot and resolve the deployment issue. If the problem persists, providing more detailed information and logs will help in diagnosing the issue further.


Note: This is an automated first response generated by AI. A human team member will review your issue and provide a more detailed response soon. We appreciate your patience!

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Jan 28, 2025
@sayali-MSFT
Copy link

@patentslump , Thank you for your inquiry about your Teams app development issue!
We are checking the issue. We will get back to you shortly.

@huimiu huimiu added the TA:Compute Team Area: Compute label Jan 29, 2025
@patentslump
Copy link
Author

patentslump commented Jan 29, 2025 via email

@sayali-MSFT
Copy link

@patentslump , Glad to hear that your issue is resolved!!
We are closing this issue for now, please feel free to reopen it, if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs attention This issue needs the attention of a contributor. TA:Compute Team Area: Compute
Projects
None yet
Development

No branches or pull requests

4 participants