JetBrains / YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
https://www.jetbrains.com/youtrack
Apache License 2.0
134 stars 105 forks source link

Calling BearerTokenConnection.GetAuthenticatedApiClient hangs #115

Open ajmaley95 opened 2 years ago

ajmaley95 commented 2 years ago

Expected behavior

Expecting GetAuthenticatedApiClient to return a YouTrackClient object

Actual behavior

GetAuthenticatedApiClient call never returns

Steps to reproduce the behavior

Call GetAuthenticatedApiClient. Tried the following:

var _newClient = _connection.GetAuthenticatedApiClient().Result; var _newClient = await _connection.GetAuthenticatedApiClient(); var _newClient = await _connection.GetAuthenticatedApiClient().ConfigureAwait(false);

ajmaley95 commented 2 years ago

FYI, to resolve this issue, we had to add .ConfigureAwait(false) calls to the awaitable async methods in GetAuthenticatedApiClient. We'd prefer not to have a copied/modified version of the YouTrackSharp project in our code base though.

rekolobov commented 2 years ago

@ajmaley95 Hi, please accept my apologies for not responding earlier

I was able to reproduce similar behavior only during youtrack server startup in very specific cases Otherwise I can't see why this could happen, though I might be not handling some setups properly

Could you please elaborate on how you are using the API or some specifics of your installation? If there is some sensitive data involved, you could create a support ticket via this form