question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

a deadlock occurs when obtaining an access token.

See original GitHub issue

Description of the Issue

In my Windows Forms application, a deadlock occurs when obtaining an access token. I think that “ConfigureAwait (false)” is necessary for “await getResponse (request, isStream, httpRequest)” on line 40 of Box.V2/Request/HttpRequestHandler.cs

Versions Used

.NET SDK:4.7.1

Steps to Reproduce

        private void button1_Click(object sender, EventArgs e)
        {
            StreamReader reader = new StreamReader("./config.json");
            string json = reader.ReadToEnd();
            IBoxConfig config = BoxConfig.CreateFromJsonString(json);
            BoxJWTAuth boxJWT = new BoxJWTAuth(config);
            string token = boxJWT.AdminToken();  // <<== deadlock
        }

Error Message, Including Stack Trace

No message due to deadlock. The getResponse method of HttpRequestHandler class is trying to return “StatusCode: 200, ReasonPhrase: ‘OK’, Version: 1.1, Content: System.Net.Http.StreamContent, Headers:”.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
BryceBarbaracommented, Apr 28, 2020

Why is this labeled as a question? It’s quite obviously a bug.

1reaction
tjones0808commented, Mar 16, 2020

once i hit the line of getting a token my app stops responding. has this been fixed on nuget yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deadlock while acquiring Azure AD Token
Using this: taskAccessToken.Wait(); var AccessToken = result.AccessToken; instead of var AccessToken = taskAccessToken.Result; results in the ...
Read more >
Postgres deadlock detected when revoking an oauth2 ...
Postgres deadlock detected when revoking an oauth2 access token #3637 ... This behavior is sporadic, most token refreshes are successful.
Read more >
Analyze and prevent deadlocks - Azure SQL Database
A deadlock occurs when two or more tasks permanently block one another because each task has a lock on a resource the other...
Read more >
Dynatrace API - Tokens and authentication
Name API value Description Read audit logs auditLogs.read Grants access to the audit log. Read Geographic regions geographicRegions.read Grants access to the Geograp... Read JavaScript mapping...
Read more >
DB transaction lock & How to handle deadlock
One easy and intuitive way to change an account's balance is to first get that account from the database, then add or subtract...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found