Unhandled exception. System.InvalidCastException: Unable to cast object of type 'Microsoft.Playwright.Transport.Converters.ChannelToGuidConverter' to type 'System.Text.Json.Serialization.JsonConverter`1[Microsoft.Playwright.Core.ElementHandle]'.
at System.Text.Json.Serialization.JsonCollectionConverter`2.GetElementConverter(JsonTypeInfo elementTypeInfo)
at System.Text.Json.Serialization.JsonCollectionConverter`2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadUsingMetadata[TValue](JsonElement element, JsonTypeInfo jsonTypeInfo)
at Microsoft.Playwright.Helpers.JsonExtensions.ToObject[T](JsonElement element, JsonSerializerOptions options) in /_/src/Playwright/Helpers/JsonExtensions.cs:line 52
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 222
at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal)
at Microsoft.Playwright.Core.Frame.QuerySelectorAllAsync(String selector) in /_/src/Playwright/Core/Frame.cs:line 645
at Program.<Main>$(String[] args) in D:\repos\playwright-reproduction\Program.cs:line 9
at Program.<Main>$(String[] args) in D:\repos\playwright-reproduction\Program.cs:line 10
at Program.<Main>$(String[] args) in D:\repos\playwright-reproduction\Program.cs:line 10
at Program.<Main>(String[] args)
Context:
Code Snippet
Project at https://github.com/JustusGreiberORGADATA/playwright-reproduction
Prints stacktrace
Describe the bug
This for some reason only happens if my TargetFramework is
net6.0. On.net7.0and.net8.0everything works fine.