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.JsonIgnoreAttribute_UnsupportedCollection failing on main #71981

Open
radical opened this issue Jul 11, 2022 · 7 comments
Milestone

Comments

@radical
Copy link
Member

radical commented Jul 11, 2022

Build, and log:

    System.Text.Json.Serialization.Tests.PropertyVisibilityTestsDynamic.JsonIgnoreAttribute_UnsupportedCollection [FAIL]
      System.UriFormatException : Invalid URI: The hostname could not be parsed.
      Stack Trace:
        /_/src/libraries/System.Private.Uri/src/System/UriExt.cs(42,0): at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
        /_/src/libraries/System.Private.Uri/src/System/Uri.cs(369,0): at System.Uri..ctor(String uriString)
        /_/src/libraries/System.Text.Json/tests/Common/PropertyVisibilityTests.cs(1193,0): at System.Text.Json.Serialization.Tests.PropertyVisibilityTests.JsonIgnoreAttribute_UnsupportedCollection()
        --- End of stack trace from previous location ---
  Finished:    System.Text.Json.Tests
@radical radical added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 11, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jul 11, 2022
@ghost
Copy link

ghost commented Jul 11, 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

Build, and log:

    System.Text.Json.Serialization.Tests.PropertyVisibilityTestsDynamic.JsonIgnoreAttribute_UnsupportedCollection [FAIL]
      System.UriFormatException : Invalid URI: The hostname could not be parsed.
      Stack Trace:
        /_/src/libraries/System.Private.Uri/src/System/UriExt.cs(42,0): at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
        /_/src/libraries/System.Private.Uri/src/System/Uri.cs(369,0): at System.Uri..ctor(String uriString)
        /_/src/libraries/System.Text.Json/tests/Common/PropertyVisibilityTests.cs(1193,0): at System.Text.Json.Serialization.Tests.PropertyVisibilityTests.JsonIgnoreAttribute_UnsupportedCollection()
        --- End of stack trace from previous location ---
  Finished:    System.Text.Json.Tests
Author: radical
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

radical added a commit to radical/runtime that referenced this issue Jul 11, 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
@krwq
Copy link
Member

krwq commented Jul 12, 2022

FYI disabled tests are no longer blocking CI so removing label

@krwq krwq removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Jul 12, 2022
@radical
Copy link
Member Author

radical commented Jul 12, 2022

FYI disabled tests are no longer blocking CI so removing label

Oops, sorry, missed this one!

@eiriktsarpalis
Copy link
Member

@radical PTAL at this comment: https://github.com/dotnet/runtime/pull/71875/files#r919266335

Judging by the original code in this change, this appears to be a regression in System.Uri contructor validation.

@radical
Copy link
Member Author

radical commented Jul 12, 2022

@eiriktsarpalis Do you want me to revert this, or would you want to do it as part of the fixing the validation?

@eiriktsarpalis
Copy link
Member

I think simply reverting the accidental change would be good for now.

@eiriktsarpalis eiriktsarpalis removed the untriaged New issue has not been triaged by the area owner label Jul 19, 2022
@eiriktsarpalis eiriktsarpalis added this to the 7.0.0 milestone Jul 19, 2022
@eiriktsarpalis eiriktsarpalis added the untriaged New issue has not been triaged by the area owner label Jul 19, 2022
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Jul 20, 2022
@eiriktsarpalis eiriktsarpalis added test-failure arch-wasm WebAssembly architecture labels Aug 5, 2022
@ghost
Copy link

ghost commented Aug 5, 2022

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

Issue Details

Build, and log:

    System.Text.Json.Serialization.Tests.PropertyVisibilityTestsDynamic.JsonIgnoreAttribute_UnsupportedCollection [FAIL]
      System.UriFormatException : Invalid URI: The hostname could not be parsed.
      Stack Trace:
        /_/src/libraries/System.Private.Uri/src/System/UriExt.cs(42,0): at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
        /_/src/libraries/System.Private.Uri/src/System/Uri.cs(369,0): at System.Uri..ctor(String uriString)
        /_/src/libraries/System.Text.Json/tests/Common/PropertyVisibilityTests.cs(1193,0): at System.Text.Json.Serialization.Tests.PropertyVisibilityTests.JsonIgnoreAttribute_UnsupportedCollection()
        --- End of stack trace from previous location ---
  Finished:    System.Text.Json.Tests
Author: radical
Assignees: -
Labels:

arch-wasm, area-System.Text.Json, test-failure

Milestone: 7.0.0

@radical radical modified the milestones: 7.0.0, 8.0.0 Aug 11, 2022
@eiriktsarpalis eiriktsarpalis modified the milestones: 8.0.0, Future Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants