static-web-apps-cli
static-web-apps-cli copied to clipboard
swa deploy fails without error
The swa deploy just fails with no error.
I can briefly see the StaticSitesClient process in ps aux for like 0.5s.
15:22 $ swa deploy --no-use-keychain --verbose=silly -R theproject-dev --app-name theproject-dev --subscription-id abc123
Welcome to Azure Static Web Apps CLI (1.0.2)
Getting config file options from swa-cli.config.json...
Config file does not exist at /home/perosb/build/theproject/swa-cli.config.json
Deploying front-end files from folder:
/home/perosb/build/theproject
Deployment token found in Environment Variables:
- SWA_CLI_DEPLOYMENT_TOKEN: <hidden>
Deploying to environment: preview
Trying to read workflow config with values:
- appLocation: /home/perosb/build/theproject
- outputLocation: /home/perosb/build/theproject
- apiLocation: <undefined>
No workflow config folder found at /home/perosb/build/theproject/.github/workflows
Validating user workflow config (BEFORE):
- appLocation: /home/perosb/build/theproject
- outputLocation: /home/perosb/build/theproject
- apiLocation: <undefined>
Validating user workflow config (AFTER):
- appLocation: /home/perosb/build/theproject
- apiLocation: <undefined>
- outputLocation: /home/perosb/build/theproject
No staticwebapp.config.json found in current project
Deploying project to Azure Static Web Apps...
Fetching release metadata for version: stable. Please wait...
- version: stable
- buildId: 1.0.020391
- publishDate: 2022-08-01T17:11:02.6122551Z
- files:
- linux-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020391/linux/StaticSitesClient
- sha: 2f2accf69fbc9eb87c9ef35900f61771cfa7d449d177babe6534cc0f952ad993
- win-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020391/windows/StaticSitesClient.exe
- sha: 100cc717758ea6ef4af52957128fb0e6b0edd67b0d98b504eabbe7b708f0376e
- osx-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020391/macOS/StaticSitesClient
- sha: 34e91e8631e042839f50db6a78d87de62f57401d2a3f4ab616b6bb51264b9411
Local client binary is up to date. Skipping download.
Deploying using /home/perosb/.swa/deploy/1.0.020391/[email protected]
Deploying using the following options:
- env:
- SWA_CLI_DEBUG: silly
- SWA_RUNTIME_WORKFLOW_LOCATION: <undefined>
- SWA_RUNTIME_CONFIG_LOCATION: <undefined>
- SWA_RUNTIME_CONFIG: <undefined>
- SWA_CLI_VERSION: 1.0.2
- SWA_CLI_DEPLOY_DRY_RUN: false
- SWA_CLI_DEPLOY_BINARY: /home/perosb/.swa/deploy/1.0.020391/[email protected]
- DEPLOYMENT_ACTION: upload
- DEPLOYMENT_PROVIDER: swa-cli-1.0.2
- REPOSITORY_BASE: /home/perosb/build/theproject
- SKIP_APP_BUILD: true
- SKIP_API_BUILD: true
- DEPLOYMENT_TOKEN: <hidden>
- APP_LOCATION: /home/perosb/build/theproject
- API_LOCATION: <undefined>
- CONFIG_FILE_LOCATION: <undefined>
- VERBOSE: true
- DEPLOYMENT_ENVIRONMENT: preview
ℹ DeploymentId: 9396e4a3-79de-48cf-995f-3adc6399f517
ℹ
ℹ Verbose logging enabled
ℹ Build timeout not specified, defaulting to 15 minutes
ℹ App Directory Location: '/home/perosb/build/theproject' was found.
ℹ Looking for event info
ℹ Event info parsed from action options.
ℹ Could not get repository branch. Proceeding
ℹ Could not get repository url. Proceeding
Desktop (please complete the following information):
- OS: Fedora 36
Hey @perosb, can you provide little more context on this like what is the app you're using. Can you check if you're facing similar issue https://azure.github.io/static-web-apps-cli/docs/contribute/Troubleshooting#swa-deploy---current-caveat
Hi, yes we tried those workarounds but still no go. It's a Gatsby app. Swa successfully detects and builds the app, but deploy doesn't work . We have tried different combinations of supplying the output folder.
I have the same issue. The deployment hangs on:
Looking for event info
Event info parsed from action options.
Could not get repository branch. Proceeding
Could not get repository url. Proceeding
@perosb, @lukaszch we did a new StaticSiteClient release recently, can you please check once and get back to us if you find any issue. Thanks.
Hi @sgollapudi77, I can confirm that this issue is fixed for me 👍. Thank you!
Is it an intended behavior that the CLI 1.0.3 doesn't use the latest version of StaticSitesClient (1.0.021731) but the one with a stable tag (1.0.021671)?
On my side, the swa deploy runs perfectly from my company network. I think there is a timeout on swa deploy and from home, the network is not good enough. As I said it is an i18n application, therefore the app is more heavy. Maybe it would be good to add a timeout parameter to be able to deploy.
For those using the cli in Azure DevOps, I've found that installing the CLI without pinning it to a version will now currently install the preview release version 1.0.4, which for some reason re-introduces the problem and the silent failure / timeout will occur.
Pinning the cli to version 1.0.3 does appear to work.
Notably, deployments under both CLI versions ran StaticSitesClient version 1.0.021731.
Given this command:
swa deploy --swa-config-location "." --app-location "." --output-location "./.output/public/" --subscription-id "abc-123" --resource-group "rg-name" --app-name "static-web-app-name" --env "Production" --deployment-token "..."
This is my output:
Welcome to Azure Static Web Apps CLI (1.1.4)
Deploying front-end files from folder:
U:\Programming\project\.output\public
Consider providing api-language and version using --api-language and --api-version flags,
otherwise default values apiLanguage: node and apiVersion: 16 will apply
Deploying to environment: Production
Found configuration file:
U:\Programming\project\staticwebapp.config.json
Deploying project to Azure Static Web Apps...
And nothing arrives in the static web app. I don't get what's happening. I reinstalled the @azure/static-web-apps-cli, but receive the same result. Any ideas?
I'm trying to deploy a nuxt3 project.