Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP 401 issue using own OAuth2 client #367

Open
auriusbendikas opened this issue Jun 20, 2022 · 1 comment
Open

HTTP 401 issue using own OAuth2 client #367

auriusbendikas opened this issue Jun 20, 2022 · 1 comment

Comments

@auriusbendikas
Copy link

I am using own Oauth2 client as documented in "Different OAuth2 client to workaround over quota and google approval issues". However it suddenly stopped working. I reviewed and recreated all credentials but it only works the first time when I execute grive -a --id <client_id> --secret <client_secret>. All other invocation of grive gives this error:

$ grive
Failed to refresh auth token: HTTP 401, body: 
exception: /home/aurius/.cache/pikaur/build/grive/src/grive2-0.5.1/libgrive/src/protocol/OAuth2.cc(111): Throw in function Refresh
Dynamic exception type: boost::wrapexcept<gr::OAuth2::AuthFailed>
[gr::expt::BacktraceTag*] = #0 0x55df33f251ed grive gr::Exception::Exception()
#1 0x55df33f1a807 grive gr::OAuth2::Refresh()
#2 0x55df33f1afc9 grive gr::OAuth2::OAuth2(gr::http::Agent*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
#3 0x55df33eacbd3 grive Main(int, char**)
#4 0x55df33ea9e2b grive main
#5 0x7fab81e29290 /usr/lib/libc.so.6 
#6 0x7fab81e2934a /usr/lib/libc.so.6 __libc_start_main
#7 0x55df33eaa815 grive _start

The fact that it works fine the first time points to an regresion in the grive code related to execution of grive after credential configuration.

@DenZxd
Copy link

DenZxd commented Aug 28, 2022

In 2019 I used instruction and all work fine on other laptop , and in 2022 I am try to build from sources and install from repo Xubuntu 20.04 LTS and after grive -a and enter code got this:


Please input the authentication code here:
4/1AdQt8qgdGyuAMHEifdzTu4483pKS6HGL4X
Failed to refresh auth token: HTTP 400, body:
exception: /home/denz/Downloads/grive2-master/libgrive/src/protocol/OAuth2.cc(111): Throw in function void gr::OAuth2::Refresh()
Dynamic exception type: boost::wrapexceptgr::OAuth2::AuthFailed
[gr::expt::BacktraceTag*] = #0 0x55c2e941f897 grive gr::Exception::Exception()
#1 0x55c2e9414b75 grive gr::OAuth2::AuthFailed::AuthFailed()
#2 0x55c2e94147bf grive gr::OAuth2::Refresh()
#3 0x55c2e9413a88 grive gr::OAuth2::OAuth2(gr::http::Agent*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
#4 0x55c2e93b1f45 grive Main(int, char**)
#5 0x55c2e93b2d7a grive main
#6 0x7f5a708c1083 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#7 0x55c2e93b04de grive _start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants