Skip to content

JsonReaderException thrown by SDK when invoking Skills #4556

@pkueecslibo

Description

@pkueecslibo

Version

4.9.4

Describe the bug

PVA recently experienced a lot of JsonReaderException when call SkillHttpClient to post activity to skills. The exception is preventing us for accessing the actual StatusCode of the response and do additional troubleshooting and reporting.

Here is the call stack.

Newtonsoft.Json.JsonReaderException:
at Newtonsoft.Json.JsonTextReader.ParseValue (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Newtonsoft.Json.JsonConvert.DeserializeObject (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Newtonsoft.Json.JsonConvert.DeserializeObject (Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed)
at Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpClient+d__171.MoveNext (Microsoft.Bot.Builder.Integration.AspNet.Core, Version=4.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Integration.AspNet.Core.Skills.SkillHttpClient+<PostActivityAsync>d__21.MoveNext (Microsoft.Bot.Builder.Integration.AspNet.Core, Version=4.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Integration.AspNet.Core.Skills.SkillHttpClient+d__41.MoveNext (Microsoft.Bot.Builder.Integration.AspNet.Core, Version=4.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Bot.Builder.Integration.AspNet.Core.Skills.SkillHttpClient+<PostActivityAsync>d__3.MoveNext (Microsoft.Bot.Builder.Integration.AspNet.Core, Version=4.9.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.Dialog.Engine.TurnResponse.InvokeSkillResponse+<ExecuteAsync>d__12.MoveNext (Microsoft.CCI.OnlineEngine.Dialog.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.Dialog.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\Dialog.Engine\TurnResponse\InvokeSkillResponse.csMicrosoft.CCI.OnlineEngine.Dialog.Engine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 134) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.TurnResponseHandler+<ExecuteTurnResponeAsync>d__20.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\TurnResponseHandler.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 226) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.TurnResponseHandler+<<StartExecutingTurnResponseTaskAsync>b__19_0>d.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\TurnResponseHandler.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 195) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.Common.ExecuteWithRetry+<>c__DisplayClass16_0+<<RunAsync>b__0>d.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.Common.ExecuteWithRetry+<RunAsync>d__171.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.CCI.Common.ExecuteWithRetry+d__171.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.Common.ExecuteWithRetry+<RunAsync>d__16.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.TurnResponseHandler+<StartExecutingTurnResponseTaskAsync>d__19.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\TurnResponseHandler.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 198) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.TurnResponseHandler+<ExecuteResponseAsync>d__15.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\TurnResponseHandler.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 100) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.BotFrameworkBot+<OnTurnCoreAsync>d__22.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\BotFrameworkBot.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 657) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.BotFrameworkBot+<>c__DisplayClass20_1+<<OnTurnAsyncImplAsync>b__0>d.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\BotFrameworkBot.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 397) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.Common.ExecuteWithRetry+<>c__DisplayClass16_0+<<RunAsync>b__0>d.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.CCI.Common.ExecuteWithRetry+<RunAsync>d__171.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.CCI.Common.ExecuteWithRetry+d__17`1.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.CCI.Common.ExecuteWithRetry+d__16.MoveNext (Microsoft.CCI.Common, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.CCI.OnlineEngine.VirtualAgent.Bot.BotFrameworkBot+d__20.MoveNext (Microsoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\a\1\s\src\OnlineEngine\VirtualAgent\Bot\BotFrameworkBot.csMicrosoft.CCI.OnlineEngine.VirtualAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 418)

Expected resolution

We would like to be able to still receive the statuscode in the response if the deserialization fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SkillsThe issue is related to skillsP0Must Fix. Release-blockerbugIndicates an unexpected problem or an unintended behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions