openiddict / openiddict-samples

.NET samples for OpenIddict

Home Page:https://documentation.openiddict.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Weytta.Client hangs waiting for web callback

mlhDevelopment opened this issue · comments

commented

Describe the bug

Weytta.Client waits indefinately for the server to post a callback to the listening port. The server (console log) indicates a successful authentication so the indefinite wait is unexpected.

To reproduce

With latest code,

  1. Run the server
  2. Run the client
  1. Continue in the client window to start the auth process
  2. Note that the server window logs output and finally says "The authorization request was successfully validated"
  3. Note that the client window does not log anything out
  • Expecting either "An error occurred" or "Claims:"
  1. If you debug into the Client project breakpoints after var context = await listener.GetContextAsync(); are never hit

Further technical details

  • Ran on VS Pro 2019 v16.9.4
  • dotnet details:
.NET SDK (reflecting any global.json):
 Version:   5.0.202
 Commit:    db7cc87d51

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19041
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.202\

Host (useful for support):
  Version: 5.0.5
  Commit:  2f740adc14

.NET SDKs installed:
  5.0.201 [C:\Program Files\dotnet\sdk]
  5.0.202 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Sadly I can't reproduce it as it works fine on my two dev machines... not sure what could be causing that.

commented

Could it be a timing thing, where the response is completed so the listener cannot get the response?

That's possible. Could you try moving the Process.Start in a separate thread (with a tiny Task.Delay to delay it a bit)?

commented

I tried (something) and it didn't change anything. However, I have made progress utilizing the Velusia project so this is no longer needed.