Unable to connect to Google Sheets using Quickstart tutorial
See original GitHub issueHi, 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:
- Created 3 years ago
- Comments:16 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thanks for fixing. Works like a charm again 😃
Fix has been released in https://www.nuget.org/packages/Google.Apis.Auth/1.48.0
Thanks for reporting.