question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Json.Serialization exception

See original GitHub issue

Hi there!

First of thanks the amazing work 😃

I just have a weird issue. The code worked like a charm yesterday and now when I try to do this (please note that I did not change the code at all from yesterday and it was working before)

_me = await _factory.Me();

it throws this exception: NullReferenceException: Object reference not set to an instance of an object Manatee.Json.Serialization.Internal.Serializers.NullableSerializer._Decode[T] (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Json.Serialization.Internal.Serializers.GenericTypeSerializerBase.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.DefaultValueSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.SchemaValidator.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.JsonSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.JsonSerializer.Deserialize (System.Type type, Manatee.Json.JsonValue json) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.JsonSerializer.Deserialize[T] (Manatee.Json.JsonValue json) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Trello.Json.Entities.JsonExtensions.Deserialize[T] (Manatee.Json.JsonObject obj, Manatee.Json.Serialization.JsonSerializer serializer, System.String key) (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) Manatee.Trello.Json.Entities.ManateeAction.FromJson (Manatee.Json.JsonValue json, Manatee.Json.Serialization.JsonSerializer serializer) (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) Manatee.Json.Serialization.Internal.Serializers.JsonSerializableSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.ReferencingSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.DefaultValueSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.SchemaValidator.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.JsonSerializer.Deserialize (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) Manatee.Json.Serialization.Internal.Serializers.ListSerializer._Decode[T] (Manatee.Json.Serialization.SerializationContext context) (at <ee51fd8653414dabb052b80a25619a0e>:0) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. Manatee.Trello.Internal.DataAccess.JsonRepository.ValidateResponse (Manatee.Trello.Rest.IRestResponse response) (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) Manatee.Trello.Internal.DataAccess.JsonRepository+<ProcessRequest>d__71[T].MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Trello.Internal.DataAccess.JsonRepository+<Execute>d__11[T].MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Trello.Internal.Synchronization.SynchronizationContext1+<GetData>d__16[TJson].MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Trello.Internal.Synchronization.DeletableSynchronizationContext1+<GetData>d__7[T].MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Trello.Internal.Synchronization.SynchronizationContext1+<GetBasicData>d__20[TJson].MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) --- End of stack trace from previous location where exception was thrown --- System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) Manatee.Trello.Internal.Synchronization.SynchronizationContext+<Synchronize>d__21.MoveNext () (at <a0b6a6ea15e04ad5a94bf37479bb7883>:0) — End of stack trace from previous location where exception was thrown — System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at <ac823e2bb42b41bda67924a45a0173c3>:0) System.Runtime.CompilerServices.TaskAwaiter.GetResult () (at <ac823e2bb42b41bda67924a45a0173c3>:0) KittenEngine.Trello.KnTrello+<AddCardAsync>d__2.MoveNext () (at Assets/Trello/KnTrello.cs:34) UnityEngine.Debug:LogException(Exception) KittenEngine.Trello.<AddCardAsync>d__2:MoveNext() (at Assets/Trello/KnTrello.cs:49) System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetException(Exception) Manatee.Trello.Internal.Synchronization.<Synchronize>d__21:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetException(Exception) Manatee.Trello.Internal.Synchronization.<GetBasicData>d__20:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetException(Exception) Manatee.Trello.Internal.Synchronization.<GetData>d__7:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetException(Exception) Manatee.Trello.Internal.Synchronization.<GetData>d__16:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetException(Exception) Manatee.Trello.Internal.DataAccess.<Execute>d__11:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetException(Exception) Manatee.Trello.Internal.DataAccess.<ProcessRequest>d__71:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(IRestResponse) Manatee.Trello.Internal.RequestProcessing.<Process>d__9:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(IRestResponse) Manatee.Trello.Internal.RequestProcessing.<Execute>d__10:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(IRestResponse) Manatee.Trello.Internal.RequestProcessing.<<AddRequest>b__0>d:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(IRestResponse1) Manatee.Trello.Rest.<ExecuteAsync>d__91:MoveNext() System.Runtime.CompilerServices.AsyncTaskMethodBuilder1:SetResult(IRestResponse1) Manatee.Trello.Rest.<ExecuteWithRetry>d__121:MoveNext() UnityEngine.UnitySynchronizationContext:ExecuteTasks()

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
gregsdenniscommented, Jan 23, 2019

If you have any more trouble, please feel free to hit me up on slack. It may be a better forum for a conversation than a GH issue.

0reactions
tim-invinciblecatcommented, Jan 23, 2019

Thank you so much. I will use emailed cards. Even if I would have like to be able to set also custom fields, it seems like the best option so far!

Read more comments on GitHub >

github_iconTop Results From Across the Web

.NET Json Serialization Exception for C# - ...
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is...
Read more >
How to Serialize Exceptions as JSON in .NET
Demonstrate how to serialize exceptions in .NET with elaborate explanation, guidelines and practical examples.
Read more >
JsonSerializationException Class
Initializes a new instance of the JsonSerializationException class with a specified error message, JSON path, line number, line position, and a reference to...
Read more >
JsonSerializationException Class
The exception thrown when an error occurs during JSON serialization or deserialization. ... The JsonSerializationException type exposes the following members.
Read more >
System.Text.Json - can't serialize exception #43026
Description We're trying to use System.Text.Json for serialization and deserialization inside our API project with GraphQL.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found