System.ComponentModel.Win32Exception (1260) Error (Edit: Blazor related auth error)
See original GitHub issueGoogleWebAuthorizationBroker.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:
- Created a year ago
- Comments:8 (3 by maintainers)
Top 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 >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 @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.
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.