Getting error: System.InvalidOperationException: Error loading discovery document: Issuer name is missing

Please include the following information in your post:

  • Which SDK this is regarding: e.g. Auth0-OidcClient-WinForms
  • SDK Version: e.g. 3.2.5
  • Platform Version: e.g. ,NET Framework 4.8
  • Code Snippets/Error Messages/Supporting Details/Screenshots:
************** Exception Text **************
System.InvalidOperationException: Error loading discovery document: Issuer name is missing
   at IdentityModel.OidcClient.OidcClient.<EnsureProviderInformationAsync>d__17.MoveNext() in /_/src/OidcClient/OidcClient.cs:line 395
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IdentityModel.OidcClient.OidcClient.<EnsureConfigurationAsync>d__16.MoveNext() in /_/src/OidcClient/OidcClient.cs:line 373
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IdentityModel.OidcClient.OidcClient.<LoginAsync>d__9.MoveNext() in /_/src/OidcClient/OidcClient.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Auth0.OidcClient.Auth0ClientBase.<LoginAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Apex.UserExperience.MainViewModel.<LogInOut>d__139.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

Is this a feature request or bug report? I do not know if it’s a bug; it seems to be a runtime issue. However, it happened only once on my machine, while on my tester’s machine, it’s show stopping her from logging into my app, which is configured as a native app with mobile endpoints.

Until today I never saw the error at all. I saw it once, showing her how it was working fine on my machine (lol); however, I cannot otherwise even reproduce it. But it happens all the time on her machine.

I found some posts that it’s possible to skip the issuer verification, but that seems like bad practice.

What is going on and how do I get it to work?

Sincerely,

Bob

I’m seeing this same error trying to update to the latest Auth0-OidcClient-WPF library. I’m updating from an older version that was originally a 3rd party library that is very similar, but I haven’t been able to get past this. I’ve setup the Auth0Client just as shown in the examples (setting the Domain and ClientID). I’m sure it’s something simple I’m missing, but would appreciate input on how to go about diagnosing this.

More info: I’ve been able to compile and run the sample from GitHub - auth0-samples/auth0-WinFormsWPF-oidc-samples: Auth0 OIDC Client with Windows Forms / WPF applications. This seems to work fine. I then built my own sample based on the same source in a project that I constructed from scratch just to make sure I understood the steps involved. This also worked fine.

But I still can’t seem to get my existing project to work when applying the same concepts and I can’t seem to isolate what the issue is. Still working at it.

1 Like

I want to bump this thread as I am now running into the same error.

I’m looking for some guidance into how to further debug this problem. Is there anything I can add to the Auth0ClientOptions or an extra parameter to client.loginAsync()?

I am building a winforms plugin and for some reason, the loginAsync() function works on one version of the base application but not the other so I need to learn how to dive deeper and see what I can change to get it working with all versions of the application my plugin ties to.

I seem to have the same problem suddenly with a WPF application. Just adding this to follow this thread

Getting the same problem here. Only some users. I can’t debug it because nether of my dev machines throw the error. Also, I can’t work out where it is “unhandled.”

So. Seems that the problems I ran into was caused by some machines were configured to use IPV6 and dns lookup failed

1 Like