Azure/static-web-apps-cli

Pipelines fail due to https://json.schemastore.org/staticwebapp.config.json network timeout

plamber opened this issue · 2 comments

Describe the bug
Since today when running the deployment of static web apps using the CLI 1.1.6 on a pipeline, the pipeline fails.

To Reproduce
Steps to reproduce the behavior:

Deploy any static web app and it fails with this error message

✖ Failed to load staticwebapp.config.json schema. Continuing without validation!

When trying to access https://json.schemastore.org/staticwebapp.config.json using the browser, it takes very long until the service responds.

Find below the output of one of the pipelines

Run npm i -g @azure/static-web-apps-cli
  npm i -g @azure/static-web-apps-cli
  swa deploy ./app --env production -d ***
  shell: /usr/bin/bash -e {0}
  env:
    CI: false
    AZURE_HTTP_USER_AGENT: 
    SWA_DEPLOYMENT_TOKEN: ***

added 3[2](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:2)[3](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:3) packages in 21s

[4](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:4)8 packages are looking for funding
  run `npm fund` for details
npm notice 
npm notice New minor version of npm available! 10.2.4 -> 10.[5](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:5).0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.0>
npm notice Run `npm install -g npm@10.5.0` to update!
npm notice 

Welcome to Azure Static Web Apps CLI (1.1.[6](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:6))

Deploying front-end files from folder:
  /home/runner/work/Website/Website/app

Consider providing api-language and version using --api-language and --api-version flags,
    otherwise default values apiLanguage: node and apiVersion: [16](https://github.com/EasyLife365/Website/actions/runs/8114947162/job/22181930159#step:6:17) will apply

Deploying to environment: production

network timeout at: https://json.schemastore.org/staticwebapp.config.json
✖ Failed to load staticwebapp.config.json schema. Continuing without validation!
Error: Process completed with exit code 1.

Expected behavior
The pipeline does not fail with such an exception or a fallback is given to an alternative store of the schema

Additional context
Problem started this morning and kept regularly failing during the day.

Probably a duplicate of #802
I would use the swa github action for CI/CD pipelines, as it doesn't rely on the CLI afaik.

Hi @itpropro,
yes. This is a duplicate. Will follow the other conversation.

Cheers