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.

Unable to connect to Google Sheets using Quickstart tutorial

See original GitHub issue

Hi, I have been running the .NET Quickstart tutorial for the Google Sheets API succesfully for a couple of weeks as Desktop Application. But the last two days it doesn’t seem to connect anymore via OAuth2.

I get an AggregateException on GoogleWebAuthorizationBroker.AuthorizeAsync(…) with the following inner exception.

Any ideas on how to solve this. Thanks!

Google.Apis.Auth.OAuth2.LocalServerCodeReceiver+LimitedLocalhostHttpServer+ServerException:
Unexpected end of network stream reading request line.

   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.LimitedLocalhostHttpServer.ReadRequestLine(Func`1 getChar) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:line 282
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.LimitedLocalhostHttpServer.GetQueryParamsFromClientAsync(TcpClient client, CancellationToken cancellationToken) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:line 266
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.LimitedLocalhostHttpServer.GetQueryParamsAsync(CancellationToken cancellationToken) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:line 207
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.GetResponseFromListener(LimitedLocalhostHttpServer server, CancellationToken ct) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:line 461
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.ReceiveCodeAsync(AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\LocalServerCodeReceiver.cs:line 432
   at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.AuthorizeAsync(String userId, CancellationToken taskCancellationToken) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\AuthorizationCodeInstalledApp.cs:line 78
   at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(Initializer initializer, IEnumerable`1 scopes, String user, CancellationToken taskCancellationToken, IDataStore dataStore, ICodeReceiver codeReceiver) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\GoogleWebAuthorizationBroker.cs:line 154
   at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(ClientSecrets clientSecrets, IEnumerable`1 scopes, String user, CancellationToken taskCancellationToken, IDataStore dataStore, ICodeReceiver codeReceiver) in C:\Apiary\2020-07-01.13-31-04\Src\Support\Google.Apis.Auth\OAuth2\GoogleWebAuthorizationBroker.cs:line 70

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alec-seyncommented, Jul 12, 2020

thanks for fixing. Works like a charm again 😃

0reactions
amanda-tarafacommented, Jul 9, 2020

Fix has been released in https://www.nuget.org/packages/Google.Apis.Auth/1.48.0

Thanks for reporting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't use the Google Sheets API within Python
I'm following the official quickstart tutorial from Google (this one) that explains how to use the Google Sheets API in Python but I...
Read more >
Google Sheets API - Go Quickstart tutorial ...
I follow the guide to run the command go run quickstart.go . However, when I go to http://localhost:8000, it warns that ...
Read more >
Go quickstart | Google Sheets
In the Google Cloud console, go to Menu menu > APIs & Services > Credentials. Go to Credentials. Click Create Credentials > OAuth...
Read more >
Google Sheets API - Python Quickstart not working #113
Hi! I'm trying to follow the quickstart guide to use the Google Sheets API with Python 3, but the code fails each time....
Read more >
Google Sheets API in Python | Getting Started - YouTube
In part 1 of the Google Sheets API in Python tutorial series, ... to create Google Sheets API service instance to connect to...
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