Giter Club home page Giter Club logo

Comments (12)

abhinovpankaj avatar abhinovpankaj commented on June 14, 2024

Exception Message:
Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=620656717901-k5umr1re3-----------------------*****apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A62406%2Fauthorize%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fspreadsheets.readonly" for authorization. See inner exception for details.

from dotnet-samples.

erickoledadevrel avatar erickoledadevrel commented on June 14, 2024

See inner exception for details.

Can you please post that inner exception as well?

from dotnet-samples.

abhinovpankaj avatar abhinovpankaj commented on June 14, 2024

See inner exception for details.

Can you please post that inner exception as well?

Inner Exception Message:

Dispatcher processing has been suspended, but messages are still being processed.

Stacktrace:

   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at Microsoft.Win32.NativeMethods.ShellExecuteEx(ShellExecuteInfo info)
   at System.Diagnostics.ShellExecuteHelper.ShellExecuteFunction()
   at System.Diagnostics.ShellExecuteHelper.ShellExecuteOnSTAThread()
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Google.Apis.Auth.OAuth2.LocalServerCodeReceiver.<ReceiveCodeAsync>d__14.MoveNext()

from dotnet-samples.

erickoledadevrel avatar erickoledadevrel commented on June 14, 2024

Thanks. Unfortunately that error isn't very descriptive. I don't see any record of others running into this error before either, so I'm not sure what the cause could be. Is there anything special about your environment that could be causing an issue?

from dotnet-samples.

nguyenthanhliemfc avatar nguyenthanhliemfc commented on June 14, 2024

My sample code here please take a look when you have free time.
This sample is Xamarin Forms core is NET Standard. I test on Android it's show error "Fail to run browser with ...."

from dotnet-samples.

erickoledadevrel avatar erickoledadevrel commented on June 14, 2024

@nguyenthanhliemfc - The auth flow shown in these samples will only work in a desktop environment. More information about the different auth options is available here:

https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth

@abhinovpankaj - Is your app also running on Xamarin?

from dotnet-samples.

nguyenthanhliemfc avatar nguyenthanhliemfc commented on June 14, 2024

Its same error when I test on UWP Windows 10 too!

from dotnet-samples.

abhinovpankaj avatar abhinovpankaj commented on June 14, 2024

@nguyenthanhliemfc - The auth flow shown in these samples will only work in a desktop environment. More information about the different auth options is available here:

https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth

@abhinovpankaj - Is your app also running on Xamarin?

No, I am running a WPF Application.

from dotnet-samples.

erickoledadevrel avatar erickoledadevrel commented on June 14, 2024

The samples in this repo will only work for console applications. For other application types, please see the auth guide I linked to above.

from dotnet-samples.

abhinovpankaj avatar abhinovpankaj commented on June 14, 2024

from dotnet-samples.

nguyenthanhliemfc avatar nguyenthanhliemfc commented on June 14, 2024

@abhinovpankaj Is it work?

from dotnet-samples.

abhinovpankaj avatar abhinovpankaj commented on June 14, 2024

@abhinovpankaj Is it work?

No it doesn't. Once I get time I will create one sample app and upload it.
For the time being you can use GoogleCredential class. For this you will have to create Service credentials and provide access to that service account on the google sheet you are connecting to.

from dotnet-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.