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.

System.ComponentModel.Win32Exception (1260) Error (Edit: Blazor related auth error)

See original GitHub issue

GoogleWebAuthorizationBroker.AuthorizeAsync working in our local, but when we deploy our app, we have this error.

Error: System.AggregateException: One or more errors occurred. (Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=...&redirect_uri=...&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar" for authorization. See inner exception for details.)
 ---> System.NotSupportedException: Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=...&redirect_uri=...&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar" for authorization. See inner exception for details.
 ---> System.ComponentModel.Win32Exception (1260): An error occurred trying to start process 'cmd' with working directory '-Some Directory-'. This program is blocked by group policy. For more information, contact your system administrator.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.OpenBrowser(String url)
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.ReceiveCodeAsync(AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
   --- End of inner exception stack trace ---
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.ReceiveCodeAsync(AuthorizationCodeRequestUrl url, CancellationToken taskCancellationToken)
   at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.AuthorizeAsync(String userId, CancellationToken taskCancellationToken)
   at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(Initializer initializer, IEnumerable`1 scopes, String user, CancellationToken taskCancellationToken, IDataStore dataStore, ICodeReceiver codeReceiver)
   at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(ClientSecrets clientSecrets, IEnumerable`1 scopes, String user, CancellationToken taskCancellationToken, IDataStore dataStore, ICodeReceiver codeReceiver)
   --- End of inner exception stack trace ---

We communicated with the server administrators and they said its not related on their side.

This is the code we call the method

credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleClientSecrets.FromStream(stream).Secrets, Scopes, username, CancellationToken.None, new FileDataStore("GoogleToken", true)).Result;

Am i missed something or its about host?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jskeetcommented, May 16, 2022

Thanks @mckaragoz - @amanda-tarafa is on vacation at the moment, but I’m sure she’ll be interested to have a close look when she’s back.

1reaction
amanda-tarafacommented, May 5, 2022

Unfortunately we have other priorities at the moment. We’ll keep these requests on the back burner for now, but we’ll try to reevaluate later in the year.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix auth error in Blazor WASM .NET 7 upgrade?
Adding the following to the client.csproj should fix it: <ItemGroup> <TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.
Read more >
Blazor Server Windows Authentication : Trust Relationship ...
This error only occurs when I am running the Blazor Server app within Visual Studios 2022 on my domain connected computer through a...
Read more >
Handle errors in ASP.NET Core Blazor apps
This article describes how Blazor manages unhandled exceptions and how to develop apps that detect and handle errors.
Read more >
Spurious blazor errors showing in error list that aren't errors
I've noticed this throughout my last 6 months of developing in blazor, and its constant but only minor annoyance. I'm using latest visual...
Read more >
Handshake failure after upgrading to fiddler 4.6.0.2
System.IO.IOException The handshake failed due to an unexpected packet format. The initial contact works: A SSLv3-compatible ClientHello ...
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