Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] STJ.Serialization.Tests failing with System.NotSupportedException with AOT #71838

Closed
radical opened this issue Jul 8, 2022 · 7 comments · Fixed by #72126
Closed

[wasm] STJ.Serialization.Tests failing with System.NotSupportedException with AOT #71838

radical opened this issue Jul 8, 2022 · 7 comments · Fixed by #72126
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Text.Json disabled-test The test is disabled in source code against the issue

Comments

@radical
Copy link
Member

radical commented Jul 8, 2022

This is failing on linux, and windows.
Build, and log.

One of the 51 failing tests:

[FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
----- Inner Stack Trace -----
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)

@radical radical added arch-wasm WebAssembly architecture blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Jul 8, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 8, 2022
@ghost
Copy link

ghost commented Jul 8, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This is failing on linux, and windows.
Build, and log.

One of the 51 failing tests:

[FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
----- Inner Stack Trace -----
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)

Author: radical
Assignees: -
Labels:

arch-wasm, blocking-clean-ci

Milestone: -

@ghost
Copy link

ghost commented Jul 8, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

This is failing on linux, and windows.
Build, and log.

One of the 51 failing tests:

[FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
----- Inner Stack Trace -----
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)

Author: radical
Assignees: -
Labels:

arch-wasm, area-System.Text.Json, blocking-clean-ci

Milestone: -

@radical radical removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2022
@radical
Copy link
Member Author

radical commented Jul 8, 2022

Likely introduced by - #71746 . @eiriktsarpalis
This is happening only on AOT though. cc @vargaz

@radical radical changed the title [wasm] STJ.Serialization.Tests failing with System.NotSupportedException with AOT [wasm] STJ.Serialization.Tests failing with System.NotSupportedException with AOT Jul 9, 2022
@radical
Copy link
Member Author

radical commented Jul 10, 2022

I'm not able to reproduce this with just trimming.

@eiriktsarpalis
Copy link
Member

Is it failing nondeterministically? I haven't seen any failures pop up in recent PRs.

@vargaz
Copy link
Contributor

vargaz commented Jul 11, 2022

I can still repro locally.

radical added a commit to radical/runtime that referenced this issue Jul 11, 2022
This seems to be hit only with `EnableAggressiveTrimming=true`, and
`RunAOTCompilation=true`. All the traces are similar to:

```
[FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
----- Inner Stack Trace -----
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
```

Issue: dotnet#71838
radical added a commit to radical/runtime that referenced this issue Jul 12, 2022
@vargaz vargaz self-assigned this Jul 12, 2022
radical added a commit that referenced this issue Jul 12, 2022
… due to linker issues (#71875)

* [wasm] Disable tests failing on HighResourceAOT job

- Disabling `FunctionalTests/System.Text.RegularExpressions.Tests` this
  test for HighResourceAOT
- Also, ensure that the HighResourceAOT tests are run for regular
  library tests, and EAT.

Issue: #71848

* Disable for EAT also

* [wasm] Disable some STJ.Serialization tests failing due to linker issues

This seems to be hit only with `EnableAggressiveTrimming=true`, and
`RunAOTCompilation=true`. All the traces are similar to:

```
[FAIL] System.Text.Json.Serialization.Tests.CollectionTestsDynamic_AsyncStreamWithSmallBuffer.InvalidPropertyNameFail(policyType: typeof(System.Text.Json.Serialization.Tests.CollectionTests+KeyNameNullPolicy), offendingProperty: "Key")
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.NotSupportedException): Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
---- System.NotSupportedException : Metadata for type 'System.Collections.Generic.KeyValuePair`2[System.String,System.String]' was not provided to the serializer. The serializer method used does not support reflection-based creation of serialization-related type metadata. If using source generation, ensure that all root types passed to the serializer have been indicated with 'JsonSerializableAttribute', along with any types that might be serialized polymorphically.
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
----- Inner Stack Trace -----
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper.<SerializeWrapper>d__11`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
   at System.Text.Json.Serialization.Tests.CollectionTests.<>c__DisplayClass377_0.<<InvalidPropertyNameFail>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Text.Json.JsonSerializer.SerializeAsync[KeyValuePair`2](Stream , KeyValuePair`2 , JsonSerializerOptions , CancellationToken )
   at System.Text.Json.Serialization.Tests.JsonSerializerWrapper.AsyncStreamSerializerWrapper.SerializeWrapper[KeyValuePair`2](Stream utf8Json, KeyValuePair`2 value, JsonSerializerOptions options)
```

Issue: #71838

* Disable System.Text.Json.Serialization.Tests.PropertyNameTestsDynamic.JsonNameConflictOnCaseInsensitiveFail also

* Disable another STJ failing test - #71981

* [wasm] Disable two more tests failing due to #71838
@radical radical added disabled-test The test is disabled in source code against the issue and removed blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Jul 12, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 12, 2022
vargaz added a commit to vargaz/runtime that referenced this issue Jul 13, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 13, 2022
@vargaz
Copy link
Contributor

vargaz commented Jul 13, 2022

This looks like a mono runtime problem.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 13, 2022
vargaz added a commit to vargaz/runtime that referenced this issue Jul 14, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 21, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Text.Json disabled-test The test is disabled in source code against the issue
Projects
None yet
3 participants