-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Az 0.6.1] Start-AzAutomationRunbook ends with a JSON conversion error #7977
Comments
@alexandair Hey Aleksandar, would you mind providing the following information:
|
PS C:\> Resolve-AzError
DEBUG: 6:11:46 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 6:11:46 PM - using account id 'xxxx@xxxxxxx.onmicrosoft.com'...
HistoryId: 6
Message : Conversion from JSON failed with error: Unexpected character encountered while parsing value: S. Path '', line 0,
position 0.
StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean
performSyncInvoke)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input,
PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input,
PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output,
PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.Azure.Commands.Automation.Common.PowerShellJsonConverter.InvokeScript(String scriptName, Hashtable
parameters)
at Microsoft.Azure.Commands.Automation.Common.PowerShellJsonConverter.Deserialize(String json)
at Microsoft.Azure.Commands.Automation.Common.AutomationPSClient.GetJobStreamRecordAsPsObject(String
resourceGroupName, String automationAccountName, Guid jobId, String jobStreamId)
at Microsoft.Azure.Commands.Automation.Cmdlet.StartAzureAutomationRunbook.AutomationProcessRecord()
at Microsoft.Azure.Commands.Automation.Cmdlet.AzureAutomationBaseCmdlet.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : System.Management.Automation.CmdletInvocationException
InvocationInfo : {Start-AzAutomationRunbook}
Line : Start-AzAutomationRunbook @startParams -Wait -Verbose
Position : At line:1 char:1
+ Start-AzAutomationRunbook @startParams -Wait -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 6
Message : Conversion from JSON failed with error: Unexpected character encountered while parsing value: S. Path '', line 0,
position 0.
StackTrace : at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, Boolean returnHashtable, ErrorRecord&
error)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ConvertFromJsonHelper(String input)
at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.EndProcessing()
at System.Management.Automation.Cmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Exception : System.ArgumentException
InvocationInfo : {Start-AzAutomationRunbook}
Line : Start-AzAutomationRunbook @startParams -Wait -Verbose
Position : At line:1 char:1
+ Start-AzAutomationRunbook @startParams -Wait -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 6
Message : Unexpected character encountered while parsing value: S. Path '', line 0, position 0.
StackTrace : at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType,
Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings)
at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input, Boolean returnHashtable, ErrorRecord&
error)
Exception : Newtonsoft.Json.JsonReaderException
InvocationInfo : {Start-AzAutomationRunbook}
Line : Start-AzAutomationRunbook @startParams -Wait -Verbose
Position : At line:1 char:1
+ Start-AzAutomationRunbook @startParams -Wait -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 6
DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.1720459; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 6:11:47 PM - ResolveError end processing.
DEBUG: 6:11:47 PM - ResolveError end processing. |
@thomasyip-msft, Can you please take a look? |
@safeermohammed @thomasyip-msft |
@cormacpayne @markcowl |
hey @alexandair, do you still see this issue with AZ 1.3.0? Particularly with Az.Automation 1.1.0? If so, do you have a example script of the runbook you're trying to run and full list of parameters for Start-AzAutomationRunbook? |
Does it happen with any type of runbook or what is the output you are trying to read? (trying to repro, just that) |
I have exacly the same issue on pwsh 6.1.3. |
@lwajswaj @cormacpayne This bug is still present in Az 1.6.0. |
Is there any update on this issue? |
I wasn't able to complete the previous PR given a business trip and vacation. I'm working to get it merged as soon as I can. |
@leifyumel, fix for this issue has been release with AZ 2.1.0 (https://github.com/Azure/azure-powershell/releases/tag/v2.1.0-May2019) |
@lwajswaj Thank you. |
Unfortunately, even with v2.1.0, I still see the same issue: VERBOSE: "Job progress state : Id 72369ab0-7d6f-4c50-9a40-29226989b861, state New, time 5/28/2019 1:43:51 PM"
VERBOSE: "Job progress state : Id 72369ab0-7d6f-4c50-9a40-29226989b861, state New, time 5/28/2019 1:43:56 PM"
VERBOSE: "Job progress state : Id 72369ab0-7d6f-4c50-9a40-29226989b861, state Running, time 5/28/2019 1:44:02 PM"
VERBOSE: "Job progress state : Id 72369ab0-7d6f-4c50-9a40-29226989b861, state Running, time 5/28/2019 1:44:07 PM"
VERBOSE: "Job terminal state : Id 72369ab0-7d6f-4c50-9a40-29226989b861, state Completed, time 5/28/2019 1:44:21 PM"
Start-AzAutomationRunbook : Conversion from JSON failed with error: Unexpected character encountered while parsing value: S. Path '', line 0, position 0. |
No repro. Tested with: PSVersion 5.1.17763.771 |
Every time I start a runbook using the Start-AzAutomationRunbook, job completes as expected, but I get an error:
The text was updated successfully, but these errors were encountered: