getsentry / raven-csharp

Superseded by: https://github.com/getsentry/sentry-dotnet
BSD 3-Clause "New" or "Revised" License
231 stars 121 forks source link

InvalidOperationException #241

Closed mehdyh closed 5 years ago

mehdyh commented 6 years ago

I log internal exceptions of sharpraven locally and this exception keeps showing:


logging exception:Newtonsoft.Json.JsonSerializationException: Error getting value from ' ​' on '   '. ---> System.InvalidOperationException: Nullable object must have a value.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at    .get_XMsg2Mime()
   at Get ​(Object )
   at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeDictionary(JsonWriter writer, IDictionary values, JsonDictionaryContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
   at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
   at SharpRaven.Data.JsonPacket.ToString(Formatting formatting) in c:\BuildAgent\work\6ff01e7f375f2953\src\app\SharpRaven\Data\JsonPacket.cs:line 340
   at SharpRaven.Data.RequestData.get_Raw() in c:\BuildAgent\work\6ff01e7f375f2953\src\app\SharpRaven\Data\RequestData.cs:line 70
   at SharpRaven.Data.RequestData.get_Scrubbed() in c:\BuildAgent\work\6ff01e7f375f2953\src\app\SharpRaven\Data\RequestData.cs:line 82
   at SharpRaven.Data.Requester.Request() in c:\BuildAgent\work\6ff01e7f375f2953\src\app\SharpRaven\Data\Requester.cs:line 139
   at SharpRaven.RavenClient.Send(JsonPacket packet) in c:\BuildAgent\work\6ff01e7f375f2953\src\app\SharpRaven\RavenClient.cs:line 362
bruno-garcia commented 6 years ago

It'll be tricky to reproduce with only that information. Could you please provide some way for us to repro this?

It does seem like a Json.NET/encoding issue rather but would be great to debug through it.

bruno-garcia commented 6 years ago

@mehdymohajery we've release the RC of our new SDK. Could you please check if it's reproducible with it?

bruno-garcia commented 5 years ago

Closing due to inactivity.