Open lucas-zimerman opened 2 years ago
Error: Error while processing envelope (event ID: '88e99c4ae34249ebbf05d99480580758'). #1 in queue. info 09:20:39 Console.Write System.MissingMethodException: Constructor on type 'System.Text.Json.Serialization.Converters.DictionaryOfTKeyTValueConverter`3[[System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String[], mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String[], mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]' not found. at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) <0x100a67290 + 0x00640> in <25bf495f7d6b4944aa395b3ab5293479#66408fa1874fecacca7e1004891fd210>:0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) <0x100c422ec + 0x000bb> in <25bf495f7d6b4944aa395b3ab5293479#66408fa1874fecacca7e1004891fd210>:0 at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture) <0x100c422d8 + 0x0000b> in <25bf495f7d6b4944aa395b3ab5293479#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.Serialization.Converters.IEnumerableConverterFactory.CreateConverter (System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) <0x102da7658 + 0x00203> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializerOptions.GetConverter (System.Type typeToConvert) <0x102d909b4 + 0x0034b> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializerOptions.DetermineConverter (System.Type parentClassType, System.Type runtimePropertyType, System.Reflection.MemberInfo memberInfo) <0x102d90840 + 0x000a7> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonClassInfo.GetConverter (System.Type type, System.Type parentClassType, System.Reflection.MemberInfo memberInfo, System.Type& runtimeType, System.Text.Json.JsonSerializerOptions options) <0x102d8cc18 + 0x0005f> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonClassInfo..ctor (System.Type type, System.Text.Json.JsonSerializerOptions options) <0x102d8b89c + 0x0008f> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializerOptions.GetOrAddClass (System.Type type) <0x102d915b8 + 0x0007b> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.WriteStack.Initialize (System.Type type, System.Text.Json.JsonSerializerOptions options, System.Boolean supportContinuation) <0x102d91d5c + 0x0003b> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializer.WriteCore[TValue] (System.Text.Json.Utf8JsonWriter writer, TValue& value, System.Type inputType, System.Text.Json.JsonSerializerOptions options) <0x102d8fb78 + 0x0008f> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializer.Serialize[TValue] (System.Text.Json.Utf8JsonWriter writer, TValue& value, System.Type type, System.Text.Json.JsonSerializerOptions options) <0x102d8fdd8 + 0x0005b> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at System.Text.Json.JsonSerializer.Serialize[TValue] (System.Text.Json.Utf8JsonWriter writer, TValue value, System.Text.Json.JsonSerializerOptions options) <0x102d8fd54 + 0x0005f> in <cb68364b029e41c3bf425990b94c94d9#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Extensions.JsonExtensions.WriteDynamicValue (System.Text.Json.Utf8JsonWriter writer, System.Object value) <0x102c6c47c + 0x00323> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Extensions.JsonExtensions.WriteDynamic (System.Text.Json.Utf8JsonWriter writer, System.String propertyName, System.Object value) <0x102c6c950 + 0x00027> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Extensions.JsonExtensions.WriteDictionaryValue (System.Text.Json.Utf8JsonWriter writer, System.Collections.Generic.IEnumerable`1[T] dic) <0x102c6bbb4 + 0x000cf> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Contexts.WriteTo (System.Text.Json.Utf8JsonWriter writer) <0x102c46058 + 0x00013> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Extensions.JsonExtensions.WriteSerializableValue (System.Text.Json.Utf8JsonWriter writer, Sentry.IJsonSerializable value) <0x102c6c3cc + 0x00043> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Extensions.JsonExtensions.WriteSerializable (System.Text.Json.Utf8JsonWriter writer, System.String propertyName, Sentry.IJsonSerializable value) <0x102c6c438 + 0x00027> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Transaction.WriteTo (System.Text.Json.Utf8JsonWriter writer) <0x102c57d80 + 0x00153> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Protocol.Envelopes.JsonSerializable.SerializeAsync (System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) <0x102c1d790 + 0x00173> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Protocol.Envelopes.JsonSerializable.SerializeAsync (System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) <0x102c1d790 + 0x0088b> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Protocol.Envelopes.EnvelopeItem.BufferPayloadAsync (System.Threading.CancellationToken cancellationToken) <0x102c787ac + 0x0017b> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Protocol.Envelopes.EnvelopeItem.SerializeAsync (System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) <0x102c1a6b0 + 0x0089b> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Protocol.Envelopes.Envelope.SerializeAsync (System.IO.Stream stream, System.Threading.CancellationToken cancellationToken) <0x102c186b0 + 0x00727> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Http.CachingTransport.StoreToCacheAsync (Sentry.Protocol.Envelopes.Envelope envelope, System.Threading.CancellationToken cancellationToken) <0x102c10930 + 0x00903> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Http.CachingTransport.StoreToCacheAsync (Sentry.Protocol.Envelopes.Envelope envelope, System.Threading.CancellationToken cancellationToken) <0x102c10930 + 0x00e33> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.Http.CachingTransport.SendEnvelopeAsync (Sentry.Protocol.Envelopes.Envelope envelope, System.Threading.CancellationToken cancellationToken) <0x102c66a48 + 0x00123> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0 at Sentry.Internal.BackgroundWorker.WorkerAsync () <0x102c0b0b0 + 0x00da7> in <c543491de6524fd4addbd87a9ec2d93a#66408fa1874fecacca7e1004891fd210>:0
It can be mitigated by adding the following linker rule:
<assembly fullname="System.Text.Json"> <type fullname="System.Text.Json.Serialization.Converters.*" preserve="all"/> </assembly>
Ideally we should add this to the troubleshooting session
EDIT Repro:
SentrySdk.ConfigureScope(scope => { scope.Contexts["New Context"] = new Dictionary<string, string[]> { { "Item", new[] { "1" , "2", "3 " } } }; }); SentrySdk.CaptureMessage("Hello World");
Can we bundle a linker rule file in the SDK? Will it be picked up at build time?
This might be an issue with .NET 6 mobile too, so we should take a look
It can be mitigated by adding the following linker rule:
Ideally we should add this to the troubleshooting session
EDIT Repro: