Azure / Azure/static-web-apps

AzureStaticWebApp@0 deploy fails around staticwebapp.config.json with no errors/logs

Open
#1,142 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

**To Reproduce**
I have an Azure Devops pipeline that Builds my angular application and creates an artifact.
I then have a Release pipeline that uses AzureStaticWebApp@0 to deploy that to an Azure Static Web App.
This has been working fine until I attempted to add staticwebapp.config.json into my project.
staticwebapp.config.json is in the /src/ directory of my angular application and also list as part of the assets configuration to output it to the root with the rest of the application (beside index.html).
The file appears to be detected as normal, but then the deployment just quits for no reason. This does not seem to be an error state. I have enabled Verbose logging, but nothing more is written.
(If I remove the staticwebapp.config.json from my project, this deployment works just fine)

```
2023-04-21T14:28:17.4621160Z Verbose logging enabled
2023-04-21T14:28:17.4981887Z Build timeout not specified, defaulting to 15 minutes
2023-04-21T14:28:17.4982618Z App Directory Location: '_Admin Web Build/drop' was found.
2023-04-21T14:28:17.4988260Z config_file_location: config file '_Admin Web Build/drop/staticwebapp.config.json' was found.
2023-04-21T14:28:17.4988625Z Looking for event info
2023-04-21T14:28:17.4993611Z Could not get event info. Proceeding
2023-04-21T14:28:21.3040039Z Skipping step to build /working_dir/_Admin Web Build/drop with Oryx
2023-04-21T14:28:21.3046880Z Didn't find Oryx manifest file under location: /2046f6c8-584a-474b-b9e2-4693eaebb7f7-swa-oryx/app-manifest/oryx-manifest.toml
2023-04-21T14:28:21.3126790Z Determined default file to be: index.html
2023-04-21T14:28:21.3127121Z Using 'staticwebapp.config.json' file for configuration information, 'routes.json' will be ignored.
2023-04-21T14:28:21.3506023Z
2023-04-21T14:28:21.3506728Z ##[warning]For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
2023-04-21T14:28:21.3507346Z ##[warning]If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
2023-04-21T14:28:21.3507518Z ##[warning]Exiting
2023-04-21T14:28:21.4573006Z ##[error]Error: The process '/usr/bin/bash' failed with exit code 1
2023-04-21T14:28:21.4608494Z ##[section]Finishing: Static Web App:
```

Here's the YAML if helpful:
```
steps:
- task: AzureStaticWebApp@0
displayName: 'Static Web App: '
inputs:
app_location: '_Admin Web Build/drop'
output_location: '_Admin Web Build/drop'
config_file_location: '_Admin Web Build/drop'
skip_app_build: true
skip_api_build: true
is_static_export: false
verbose: true
azure_static_web_apps_api_token:
```

**Expected behavior**
Deployment would proceed as normal.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.