You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Question]: Any bicep file for ARM Template deployment gives the error: "Task failed while parsing with following error: Unexpected token p in JSON at position 0."
#20795
Open
1 of 4 tasks
bobbintb opened this issue
Jan 21, 2025
· 1 comment
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
Version Azure DevOps Server 2020 Update 1.2
Operation system
Windows Server 2016 Datacenter
Question
I get the same error with any bicep file I try:
2025-01-21T16:23:45.0332306Z ##[error]Error: Ensure the Template file ( 'F:\DEVPipeline\agent\_work\r6\a\_dev\drop\dev-kv\template.bicep' ) is valid. Task failed while parsing with following error: Unexpected token p in JSON at position 0
The agent has Bicep CLI version 0.32.4 and Azure-CLI 2.67.0. The bicep file starts with `param` so it seems like it errors at the very beginning and since it mentions JSON, it seems to be expecting ARM instead of bicep. I don't know how to determine the specific task version. I have it set to use 3 so it should use the latest. The Bicep and Azure CLI versions are the latest at this time and meet the minimum for bicep support for the task. The bicep file is valid, exported from a working environment and decompiled. I've tried other bicep files as well and I get the same issue with all of them.
The text was updated successfully, but these errors were encountered:
I think I found part of the issue. I installed bicep under my user and it didn't install it system-wide. The Azure Pipeline Agent also runs under the NT AUTHORITY\NETWORK SERVICE user. I checked and the profile for that user does have bicep installed it seems and I modified the AZURE_CONFIG_DIR variable to point to it but it still seems to have an issue. I think I'm on the right track but still not quite there.
Task name
ARM Template deployment
Task version
3.x.x
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
Version Azure DevOps Server 2020 Update 1.2
Operation system
Windows Server 2016 Datacenter
Question
The text was updated successfully, but these errors were encountered: