Skip to content

Commit b7a7c27

Browse files
docs: added one more domain to firewall section in troubleshoot (#636)
1 parent e7cbf24 commit b7a7c27

File tree

1 file changed

+37
-29
lines changed

1 file changed

+37
-29
lines changed

docs/www/docs/contribute/99-troubleshooting.md

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,22 @@ sidebar_position: 99
99
:::info
1010
This page lists frequently-asked questions and solutions to help troubleshoot common issues that may be encountered when building or testing the project.
1111
:::
12+
1213
## `swa deploy` fails with no logs
1314

1415
### Context
1516

16-
`swa deploy` currently has a small bug which is being actively worked on by the team. When a user tries to `swa deploy` from within the `app-location`, the deploy command currently fails with an unknown error. This is being tracked in GitHub issue #[514]((https://github.com/Azure/static-web-apps-cli/issues/514).
17+
`swa deploy` currently has a small bug which is being actively worked on by the team. When a user tries to `swa deploy` from within the `app-location`, the deploy command currently fails with an unknown error. This is being tracked in GitHub issue #[514]((https://github.com/Azure/static-web-apps-cli/issues/514).
1718

1819
### Solution
1920

2021
While the team is currently working on the fix, we recommend users to use the other methods of deployment, all documented [here](https://azure.github.io/static-web-apps-cli/docs/cli/swa-deploy)). In case the project does not have an `app-location` folder (i.e. main project is in the `root` folder), we'd recommend using the [Azure Static Web Apps portal](https://portal.azure.com) or [VSCode](https://docs.microsoft.com/en-us/azure/static-web-apps/getting-started?tabs=vanilla-javascript) extension meanwhile!
2122

22-
23-
24-
2523
## `libsecret-1.so.0: cannot open shared object file: No such file or directory`
2624

2725
### Context
2826

29-
When using `swa login`, the flag `--use-keychain` is enabled by default because we encrypt and store your credentials in your native Keychain (aka. the built-in password manager of your operating system). This operation depends on a system dependency called `libsecret`. If your system doesn't come bundled `libsecret` (most systems do provide it by default), you will then encounter this error.
27+
When using `swa login`, the flag `--use-keychain` is enabled by default because we encrypt and store your credentials in your native Keychain (aka. the built-in password manager of your operating system). This operation depends on a system dependency called `libsecret`. If your system doesn't come bundled `libsecret` (most systems do provide it by default), you will then encounter this error.
3028

3129
### Why do I need to `swa login`?
3230

@@ -35,20 +33,22 @@ In order to be able to automatically deploy your app to your Azure Static Web Ap
3533
### Solutions
3634

3735
In order to avoid this issue, you have a few options:
36+
3837
1. [Manually install](https://www.google.com/search?q=instal+libsecret) `libsecret` by adding it to your Docker image or your system (recommended)
3938
2. Disable Keychain access using `--no-use-keychain`. Doing so won't store and remember your credentials anymore, and you will have to interactively log in again each time you run `swa login`
4039
3. Manually provide the Deployment Token for your current project (see [SWA CLI docs](https://azure.github.io/static-web-apps-cli/docs/use/deploy#51-deployment-token)). You will also need to provide `--app-name` and `--resource-group`
4140
4. Manually provide `--client-id`, `--client-secret`, `--app-name` and `--resource-group`.
4241

43-
4442
## SWA CLI - Domains that need Firewall access
4543

4644
### Context
45+
4746
If you are having trouble accessing SWA CLI, the following domains need to be allowed an access in your firewall:
47+
4848
- blob.core.windows.net
4949
- azurestaticapps.net
5050
- swalocaldeploy.azureedge.net
51-
51+
- functionscdn.azureedge.net
5252

5353
## `Unable to download StaticSitesClient binary (File Not Found 404 - 403)`
5454

@@ -62,42 +62,47 @@ It can happen that the host firewall can block downloading these binaries. If us
6262

6363
1. Visit https://swalocaldeploy.azureedge.net/downloads/versions.json
6464
2. Copy the `stable` JSON content, for eg:
65+
6566
```json
6667
{
67-
"version": "stable",
68-
"buildId": "1.0.020761",
69-
"publishDate": "2022-09-07T17:34:35.4261936Z",
70-
"files": {
71-
"linux-x64": {
72-
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/linux/StaticSitesClient",
73-
"sha": "871ae9f154ddb8123e24c507e39dfc11c99f34815e59b178051a6e44a870e308"
74-
},
75-
"win-x64": {
76-
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/windows/StaticSitesClient.exe",
77-
"sha": "360b76959c68cc0865b1aea144c8eb2aa413f4856e55c781a83bd7e1ad352362"
78-
},
79-
"osx-x64": {
80-
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/macOS/StaticSitesClient",
81-
"sha": "1a90511003609af378ff3628feaf3115f9d7e335085a925045e9f206359fdb90"
82-
}
68+
"version": "stable",
69+
"buildId": "1.0.020761",
70+
"publishDate": "2022-09-07T17:34:35.4261936Z",
71+
"files": {
72+
"linux-x64": {
73+
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/linux/StaticSitesClient",
74+
"sha": "871ae9f154ddb8123e24c507e39dfc11c99f34815e59b178051a6e44a870e308"
75+
},
76+
"win-x64": {
77+
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/windows/StaticSitesClient.exe",
78+
"sha": "360b76959c68cc0865b1aea144c8eb2aa413f4856e55c781a83bd7e1ad352362"
79+
},
80+
"osx-x64": {
81+
"url": "https://swalocaldeploy.azureedge.net/downloads/1.0.020761/macOS/StaticSitesClient",
82+
"sha": "1a90511003609af378ff3628feaf3115f9d7e335085a925045e9f206359fdb90"
8383
}
8484
}
85+
}
8586
```
87+
8688
3. Based on your operating system, download the right binary from the provided URLs:
8789
1. Linux: https://swalocaldeploy.azureedge.net/downloads/1.0.020761/linux/StaticSitesClient
8890
2. Windows: https://swalocaldeploy.azureedge.net/downloads/1.0.020761/windows/StaticSitesClient.exe
8991
3. macOS: https://swalocaldeploy.azureedge.net/downloads/1.0.020761/macOS/StaticSitesClient
9092
1. Copy this binary to `$HOME/.swa/deploy/VERSION/StaticSiteClient` (add `.exe` for Windows). For eg:
9193
`/home/USER/.swa/deploy/1.0.020761/StaticSiteClient`
9294
1. Create a file at `$HOME/.swa/deploy/StaticSitesClient.json` with the following content:
95+
9396
```json
9497
{
9598
"metadata": PASTE STABLE JSON CONTENT,
9699
"binary": ABSOLUTE PATH TO STATIC SITE CLIENT BINARY,
97100
"checksum": SH256 CHECKSUM OF THE BINARY SEE BELOW
98101
}
99102
```
100-
For eg:
103+
104+
For eg:
105+
101106
```json
102107
{
103108
"metadata": {
@@ -110,21 +115,24 @@ For eg:
110115
}
111116
```
112117

113-
**IMPORTANT: Make sure the `StaticSitesClient.json#checksum` and `StaticSitesClient.json#metadata.files.[OS].sha` values match!**
114-
6. For Linux and macOS, run `chmod +x /home/USER/.swa/deploy/1.0.020761/StaticSitesClient`
115-
7. Run `swa deploy --verbose silly` and make sure `SWA_CLI_DEPLOY_BINARY` is set correctly. If everything was configured correctly, the deploy should work.
116-
118+
**IMPORTANT: Make sure the `StaticSitesClient.json#checksum` and `StaticSitesClient.json#metadata.files.[OS].sha` values match!** 6. For Linux and macOS, run `chmod +x /home/USER/.swa/deploy/1.0.020761/StaticSitesClient` 7. Run `swa deploy --verbose silly` and make sure `SWA_CLI_DEPLOY_BINARY` is set correctly. If everything was configured correctly, the deploy should work.
117119

118120
How to compute SHA256 checksum:
119-
1. On Windows using Powershell:
121+
122+
1. On Windows using Powershell:
123+
120124
```
121125
PS C:\Users\USER> (Get-fileHash -Algorithm SHA256 .\.swa\deploy\VERSION\StaticSitesClient.exe).Hash.ToLower()
122126
```
127+
123128
2. On Linux:
129+
124130
```
125131
➜ sha256sum ~/.swa/deploy/VERSION/StaticSitesClient | head -c 64
126132
```
133+
127134
3. On macOS:
135+
128136
```
129137
➜ openssl sha256 ~/.swa/deploy/VERSION/StaticSitesClient | awk '{print $2}'
130138
```

0 commit comments

Comments
 (0)