google-api-dotnet-client: Unable to connect to Google Sheets using Quickstart tutorial
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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- Makes the heuristics for choosing a local callback URL more robust. * Fixes some issues with several authorization requests happening rappidly one after the other. * Our existing integration tests... — committed to amanda-tarafa/google-api-dotnet-client by amanda-tarafa 4 years ago
- Makes .NET Standard 2.0 use an HttpListener instead of a TcpListener on LocalServerCodeReceiver. * Fixes #1596. — committed to amanda-tarafa/google-api-dotnet-client by amanda-tarafa 4 years ago
- Makes .NET Standard 2.0 use an HttpListener instead of a TcpListener on LocalServerCodeReceiver. * Fixes #1596. — committed to amanda-tarafa/google-api-dotnet-client by amanda-tarafa 4 years ago
- Makes .NET Standard 2.0 use an HttpListener instead of a TcpListener on LocalServerCodeReceiver. * Fixes #1596. — committed to googleapis/google-api-dotnet-client by amanda-tarafa 4 years ago
thanks for fixing. Works like a charm again 😃