Skip to content

Commit ebd0483

Browse files
Add bicep troubleshooting
1 parent caec34f commit ebd0483

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

TROUBLESHOOTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,29 @@ The api-version '...' is invalid
198198

199199
2. Check for newer API versions in the Bicep templates
200200

201+
### Invalid Win32 application
202+
203+
This is a bit cryptic. It's helpful to execute the `az` command from the error separately in the terminal and supply the `--debug` flag. You might then see errors such as this one:
204+
205+
**Error Message:**
206+
```
207+
cli.azure.cli.core.azclierror: [WinError 193] %1 is not a valid Win32 application
208+
az_command_data_logger: [WinError 193] %1 is not a valid Win32 application
209+
```
210+
211+
Scroll up to see what is executed.
212+
213+
**Solution:**
214+
215+
#### Bicep
216+
217+
In one case, `%USERPROFILE%\.azure\bin` contained a `bicep.exe` file but with a zero-length. The CLI would recognize that the file is there but fail on execution.
218+
219+
1. Verify that bicep is indeed failing: `az bicep version`
220+
2. Delete `%USERPROFILE%\.azure\bin\bicep.exe`.
221+
3. (Re)install bicep: `az bicep install`.
222+
4. Verify bicep: `az bicep version`
223+
201224
## Resource Management Issues
202225

203226
### Resource Group Does Not Exist

0 commit comments

Comments
 (0)