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

The type initializer for 'System.Text.Json.JsonSerializer' threw an exception #108

Open
dhruvgohiloo7 opened this issue Jun 15, 2021 · 5 comments

Comments

@dhruvgohiloo7
Copy link

After updating IdentityModel to 5.1.0 and IdentityModel.OidcClient to 4.0.0, I started getting below exception (only in iOS)

Error loading discovery document: Error connecting to https://auth.example.org/.well-known/openid-configuration/jwks. The type initializer for 'System.Text.Json.JsonSerializer' threw an exception..

@leastprivilege
Copy link
Contributor

@dhruvgohiloo7
Copy link
Author

@leastprivilege I went through the link you provided and tried migrating nuget management format to PackageReference but after migrating to PackageReference, I started getting lots of other errors.

@leastprivilege
Copy link
Contributor

Well - yes - it sucks ;)

If you read through the thread you can see this is a Microsoft package mismatch issue - I am surprised it has not been fixed yet.

I fixed this sample:

https://github.com/IdentityModel/IdentityModel.OidcClient.Samples/blob/main/iOS_AuthenticationServices/iOS11Client/iOS11Client.csproj

@dhruvgohiloo7
Copy link
Author

@leastprivilege I have started getting xamarin package issues so I have downgraded the identitymodel version for now.
Will this issue resolved in the next identitymodel release or I must have to migrate to PackageReference for iOS?

@leastprivilege
Copy link
Contributor

It is not an IdentityModel issue. It's a Microsoft issue as you can see from the referenced thread. It's out of my control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants