vitalif / grive2

Google Drive client with support for new Drive REST API and partial sync
http://yourcmc.ru/wiki/Grive2
GNU General Public License v2.0
1.52k stars 141 forks source link

Request failed due to auth token expired: 401 #378

Open kp3393 opened 1 year ago

kp3393 commented 1 year ago

Hello team, I have been using Grive2 to sync my data on the server with my google drive. I created my own Oauth2 credentials as per the documentation and was able to download my google drive to the current directory. However, when trying to upload the data from the server to the google directory, the sync usually stops after an hour, and I have to restart the sync again. The files I transfer are relatively huge (almost 300-400 GB).

This is the recurring error:

`request failed due to auth token expired: 401 (body: ). refreshing token exception: /var/ptmp/portage/net-misc/grive-0.5.2_pre20211128-r1/work/grive-0.5.2_pre20211128/libgrive/src/json/JsonParser.cc(165): T hrow in function Parse Dynamic exception type: boost::wrapexcept [gr::expt::BacktraceTag*] = #0 0x55ab276cf3a9 grive gr::Exception::Exception()

1 0x55ab276b1396 grive gr::JsonParser::Parse(char const*, unsigned long)

2 0x55ab276c102e grive gr::http::ValResponse::Write(char const*, unsigned long)

3 0x7f3aff88c0ea /usr/lib64/libcurl.so.4

4 0x7f3aff89b703 /usr/lib64/libcurl.so.4

5 0x7f3aff883a44 /usr/lib64/libcurl.so.4

6 0x7f3aff8852be /usr/lib64/libcurl.so.4 curl_multi_perform

7 0x7f3aff85fc0b /usr/lib64/libcurl.so.4 curl_easy_perform

8 0x55ab276a9a62 grive gr::http::CurlAgent::ExecCurl(std::__cxx11::basic_string<char, std::char_traits, std::allocator >

const&, gr::DataStream*, gr::http::Header const&)

9 0x55ab276c2a5d grive gr::AuthAgent::Request(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&

, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, gr::SeekStream, gr::DataStream, gr::http: :Header const&, unsigned long long)

10 0x55ab276a7499 grive gr::v2::Syncer2::Upload(gr::Resource*, bool)

11 0x55ab276de2fe grive gr::Resource::SyncSelf(gr::Syncer, gr::ResourceTree, gr::Val const&)

12 0x55ab276de640 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

13 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

14 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

15 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

16 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

17 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

18 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

19 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

20 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

21 0x55ab276de751 grive gr::Resource::Sync(gr::Syncer, gr::ResourceTree, gr::Val const&)

22 0x55ab27673f7b grive gr::Drive::Update()

23 0x55ab2766475e grive Main(int, char**)

24 0x55ab276613ed grive main`

Does anyone have experience solving this issue?