ibiza240 / MTGAHelper-Windows-Client

MTGAHelper Tracker local program
https://mtgahelper.com
MIT License
55 stars 10 forks source link

Unhandled exception. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. #4

Closed DanielPBak closed 4 years ago

DanielPBak commented 4 years ago

When trying to run the program through the command line, I get the following stack trace:

C:\Program Files (x86)\Wizards of the Coast\MTGA\MTGALauncher>dotnet "C:\Program Files (x86)\MTGAHelper\MTGAHelper Tracker\MTGAHelper.Tracker.dll"
Unhandled exception. Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadAndMoveToContent()
   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.JsonSerializer.Deserialize(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
   at MTGAHelper.Tracker.WPF.App.OnStartup(StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at MTGAHelper.Tracker.WPF.App.Main()

And the most recent log file:

01 00:02:11 [WRN] () (Managed) {outputLogError} Unknown error in AddMessage with part: "[UnityCrossThreadLogger]10/1/2019 12:02:10 AM
<== Survey.GetConfig(1231)
{

  \"postMatchSurvey\": {

    \"ExcludeEvents\": [

      \"NPE\"

    ],

    \"Chance\": 1.0,

    \"Question\": \"RateMatch\",

    \"Options\": \"YesNo\"

  }

}"
01 00:02:24 [WRN] () (Managed) {outputLogError} Unknown error in AddMessage with part: "[UnityCrossThreadLogger]10/1/2019 12:02:10 AM
<== Survey.GetConfig(1231)
{

  \"postMatchSurvey\": {

    \"ExcludeEvents\": [

      \"NPE\"

    ],

    \"Chance\": 1.0,

    \"Question\": \"RateMatch\",

    \"Options\": \"YesNo\"

  }

}"
01 00:02:24 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:12 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:14 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:15 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:18 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:19 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:22 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:24 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:03:24 [WRN] () FileSizeChangedNewText() Could not upload data. Status:"Uploading" - Problems:[]
01 00:16:42 [INF] () C:\Program Files (x86)\MTGAHelper\MTGAHelper Tracker
DanielPBak commented 4 years ago

Update: uninstalling, deleting the appdata folder and reinstalling fixed the issue.

ibiza240 commented 4 years ago

Hi!

Glad you could find a way around the bug you experienced.

If it happens again, I would be happy to look at it in more details. The MTGA output_log.txt file that caused this would be useful for debugging, if it is possible to provide it.