Azure / Azure/static-web-apps

CI broken with "An unknown exception has occurred"

Open
#1,330 1 comment 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**

Our CI job does not work anymore with an error which does not help us to find the problem.
"An unknown exception has occurred"

**Expected behavior**

Throws an error which is understandable and points to the problem or work again.

**Device info (if applicable):**
- OS: Docker node:18
- StaticSitesClient@1.0.024941
- Azure Static Web Apps CLI (1.1.5)

**Additional context**

The CI Job before with StaticSitesClient@1.0.024871 had no problems.

**WORKING** StaticSitesClient@1.0.024871, Azure Static Web Apps CLI (1.1.4):

```log
$ swa deploy --deployment-token $DEPLOYMENT_TOKEN --env=production ./dist |& tee deploy.log
Welcome to Azure Static Web Apps CLI (1.1.4)
Deploying front-end files from folder:
/builds/************/dist
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:
/builds/************/static/staticwebapp.config.json
Deploying project to Azure Static Web Apps...
Could not find StaticSitesClient local binary
- Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.024871/linux/StaticSitesClient@1.0.024871
[swa] ✔ Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.024871/linux/StaticSitesClient@1.0.024871
- Preparing deployment. Please wait...
✔ Project deployed to https://************.azurestaticapps.net/ 🚀
$ cat deploy.log | grep -q "Project deployed to"
Cleaning up project directory and file based variables
00:04
Job succeeded
```

**FAILED** StaticSitesClient@1.0.024941, Azure Static Web Apps CLI (1.1.5)

```log
$ swa deploy --deployment-token $DEPLOYMENT_TOKEN --env=production ./dist |& tee deploy.log
Welcome to Azure Static Web Apps CLI (1.1.5)
Deploying front-end files from folder:
/builds/************/dist
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:
/builds/************/static/staticwebapp.config.json
Deploying project to Azure Static Web Apps...
Could not find StaticSitesClient local binary
- Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.024941/linux/StaticSitesClient@1.0.024941
[swa] ✔ Downloading https://swalocaldeploy.azureedge.net/downloads/1.0.024941/linux/StaticSitesClient@1.0.024941
- Preparing deployment. Please wait...
(node:[32](https://************/-/jobs/32489#L32)) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
✖ An unknown exception has occurred
$ cat deploy.log | grep -q "Project deployed to"
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1
```

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.