Getting error "Failed to parse package: SyntaxError: Unexpected token %0A in JSON at position 3334" while deploying/promoting Synapse workspace

Choudhary, Roshankumar 6 Reputation points
2022-11-01T01:58:44.02+00:00

Below is the error log I get when I try to deploy (promote) Synapse workspace from DEV to INT environment. The template file is generated by Synapse and there is no manual editing done on that. Also, all the parameters are overridden with no special character that would need escaping.

2022-11-01T01:45:31.1145249Z ##[debug]arguments:
2022-11-01T01:45:31.1145757Z ##[debug]arguments:
2022-11-01T01:45:31.1146246Z ##[debug] x509
2022-11-01T01:45:31.1146721Z ##[debug] x509
2022-11-01T01:45:31.1147294Z ##[debug] -noout
2022-11-01T01:45:31.1147865Z ##[debug] -noout
2022-11-01T01:45:31.1148423Z ##[debug] -in
2022-11-01T01:45:31.1148989Z ##[debug] -in
2022-11-01T01:45:31.1149552Z ##[debug] /AzDOAgents/Agent1/_work/_temp/Cert.pem
2022-11-01T01:45:31.1150162Z ##[debug] /AzDOAgents/Agent1/_work/_temp/Cert.pem
2022-11-01T01:45:31.1150877Z ##[debug] -fingerprint
2022-11-01T01:45:31.1151463Z ##[debug] -fingerprint
2022-11-01T01:45:31.1152258Z [command]/usr/bin/openssl x509 -noout -in /AzDOAgents/Agent1/_work/_temp/Cert.pem -fingerprint
2022-11-01T01:45:31.1263286Z SHA1 Fingerprint=91:A1:0XXXX
2022-11-01T01:45:31.1264734Z ##[debug]FINGERPRINT CREATION SUCCESSFUL
2022-11-01T01:45:31.1323105Z ##[debug][POST]https://login.windows.net/xxx-xxxx/oauth2/token/
2022-11-01T01:45:31.8659386Z Workspace info response: {"type":"Microsoft.Synapse/workspaces","properties":{"encryption":{"doubleEncryptionEnabled":false},"defaultDataLakeStorage":{"accountUrl":"https://sasnwxxxxxx1.dfs.core.windows.net","filesystem":"saxxxxxxx1in01"},"provisioningState":"Succeeded","managedVirtualNetwork":"default","connectivityEndpoints":{"web":"https://web.azuresynapse.net?workspace=%2fsubscriptions%2fdb2a9xxxxac4-8da6-b3da2dc68e0a%2fresourceGroups%2fRG_xxxxxxxxT%2fproviders%2fMicrosoft.Synapse%2fworkspaces%2fsnwxxxxe1in01","dev":"https://snwxxxxxe1in01.dev.azuresynapse.net","sqlOnDemand":"snwxxxxxe1in01-ondemand.sql.azuresynapse.net","sql":"snwxxxxx1in01.sql.azuresynapse.net"},"managedResourceGroupName":"xxxxxxxin01_Synapse_Managed","sqlAdministratorLogin":"xxxxxx","privateEndpointConnections":[{"id":"/subscriptions/dxxxxxx-b3da2dc68e0a/resourceGroups/RG_xxxxxxxx_INT/providers/Microsoft.Synapse/workspaces/snwxxxxxe1in01/privateEndpointConnections/pvlDev-snwxxxxe1in01-xxxxx-c4b6xxxxxbeaf0600","properties":{"privateEndpoint":{"id":"/subscriptions/db2a93d4-166a-4ac4-8da6-xxxx0a/resourceGroups/RG_xxxxx_xxxxx_INT/providers/Microsoft.Network/privateEndpoints/pvlDev-snwxxxxxe1in01"},"privateLinkServiceConnectionState":{"status":"Approved"}}},{"id":"/subscriptions/db2a93d4-xb3da2dc68e0a/resourceGroups/RG_x_XXXXXXX_INT/providers/Microsoft.Synapse/workspaces/xxxxxxxin01/privateEndpointConnections/pvlSqlOnDemand-xxxxxxxe1in01-da7e17a0-6xxxxxxxxx7eeed0ded10","properties":{"privateEndpoint":{"id":"/subscriptions/x-b3xxx68e0a/resourceGroups/RG_x_xxxxx_INT/providers/Microsoft.Network/privateEndpoints/pvlSqlOnDemand-xxxxxxxxin01"},"privateLinkServiceConnectionState":{"status":"Approved"}}},{"id":"/subscriptions/xxxxxx-b3dxxxxxe0a/resourceGroups/RG_xxxxx_INT/providers/Microsoft.Synapse/workspaces/snxxxxxe1in01/privateEndpointConnections/pvlSql-xxxxxxxxe1in01-5f10944xxxxxxxf3dd58add3","properties":{"privateEndpoint":{"id":"/subscriptions/db2axxxxxx8da6-b3da2dc68e0a/resourceGroups/RG_xxxxxxx/providers/Microsoft.Network/privateEndpoints/pvlSqlxxxxxxe1in01"},"privateLinkServiceConnectionState":{"status":"Approved"}}}],"workspaceUID":"5b0xxxxxxxx-5a8996269f06","extraProperties":{"WorkspaceType":"Normal","IsScopeEnabled":false},"managedVirtualNetworkSettings":{"preventDataExfiltration":true,"allowedAadTenantIdsForLinking":[]}},"id":"/subscriptions/db2xxxxxxxx-8da6-b3xxxx0a/resourceGroups/RG_xxxxxxx_INT/providers/Microsoft.Synapse/workspaces/xxxxxxx","location":"eastus","name":"xxxxxx1in01","identity":{"type":"SystemAssigned","tenantId":"xxxxxxxe36a0baac5b","principalId":"cc2xxxxxxxxxxx},"tags":{"DPCCODE":"xxxx CORP DIST","EAICODE":"XXXXX","ENV":"INT","TENANT":"XXXXXXX"}}
2022-11-01T01:45:31.8667206Z Workspace location: eastus
2022-11-01T01:45:31.8667825Z Begin replacement of parameters in the template
2022-11-01T01:45:31.8670730Z Error during execution: Error: Failed to parse package: SyntaxError: Unexpected token
2022-11-01T01:45:31.8671505Z in JSON at position 3334
2022-11-01T01:45:31.8673357Z ##[debug]task result: Failed
2022-11-01T01:45:31.8706320Z ##[error]Encountered with exception:Error: Failed to parse package: SyntaxError: Unexpected token
in JSON at position 3334
2022-11-01T01:45:31.8718904Z ##[debug]Processed: ##vso[task.issue type=error;]Encountered with exception:Error: Failed to parse package: SyntaxError: Unexpected token %0A in JSON at position 3334
2022-11-01T01:45:31.8729579Z ##[debug]Processed: ##vso[task.complete result=Failed;]Encountered with exception:Error: Failed to parse package: SyntaxError: Unexpected token %0A in JSON at position 3334
2022-11-01T01:45:31.8752627Z ##[section]Finishing: Synpase deployment task for workspace: xxxxxxe1in01

The problem is there is no special character in the template file. Also, I did override all the parameters to avoid the error still no luck.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Choudhary, Roshankumar 6 Reputation points
    2022-11-03T17:07:28.5+00:00

    @Bhargava-MSFT - Thank you for the input, I was able to open a ticket with support team and I am getting the help needed.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.