-
Notifications
You must be signed in to change notification settings - Fork 378
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
grive crashes when refreshing auth token #315
Comments
the same here
|
Grive 0.3 and 0.2 don't work any more because of a change to the Google API in April. For that you need grive2, from Vitaliy Filippov at http://yourcmc.ru/wiki/Grive2 and http://yourcmc.ru/wiki/Grive2#Installation in particular. Works fine. |
I am getting this error with the following version: |
You mean THAT error (above)? (there is no THIS error attached to your post or referenced from it - did you mean to?). To be precise, my working grive2 code fork is from https://github.com/vitalif/grive2. The URL you mention above looks different, at face value. There could be different "grive2"s out there. Yes, that error looks to be in the sync routine itself, when the code has started to retrieve the remote data. But I notice that you are running 64-bit and running a platform-specific 64-bit libcurl4, whereas I am running 32-bit and running the libcurl from libcurl4-gnutls, which is a difference that I would be very suspicious about as it took me a long time to find a curl3/4 installation and partners for it that didn't make various things crash, grive included. My installation syncs fine. The error from the main branch grive 0.2/0.3 code I think I recall is earlier than the backtrace shown above indicates, before syncing has started. Still, the two points are close. Your error looks to be in parsing a particular thing, rather than an overall problem. It may be worthwhile trying to vary the filenames (try a blank directory sync) to see what changes and maybe confirm that it's a content sensitive issue. So I'd contact Vitaliy. But it may be worth seeing if it is a problem that has been discovered and sorted by checking out the latest code. For the record, the list of things my (OK) grive2 compilation is linked to is /usr/lib/i386-linux-gnu/libboost_program_options.so.1.55.0 The stuff libcurl is itself linked to here (which was the hard part to get properly arranged for me) is /usr/lib/i386-linux-gnu/libidn.so.11.6.12 With that mountain of dependencies, things are intrinsically delicate. As I recall I was battling a problem in which libcurl4 code calls for something like SSLv3_client_method() but links to libssl.so.1.0.0 to supply it, and libssl.so has all its methods named SSL_*, with no "v3". The trick was to get a libcurl that didn't do that, then, or get one that linked to libgnutls-openssl instead. The problem resolved either way ... but the setup was plainly delicate. You may wish to try grive2 on another platform (32-bit and/or a virtual machine running on your own native platform) to see what varies as you vary the setup. |
This is getting too complicated for me. For the time being I switched to rclone, which works fine. |
OK. https://github.com/vitalif/grive2 compiles and runs fine for me (debian stable). That's not complicated! |
When sync to Google drive takes a little longer, auth expires and Grive tries to refresh auth token, then crashes. Steps to reproduce: Sync large local folder to Google drive. Error message:
resquest failed due to auth token expired: 401. refreshing token
exception: /build/grive2-JFQ2lp/grive2-0.4.0/libgrive/src/json/JsonParser.cc(169): Throw in function void gr::JsonParser::Parse(const char*, std::size_t)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr10JsonParser5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x47d0fc grive gr::Exception::Exception()
#1 0x465511 grive gr::JsonParser::Error::Error()
#2 0x4647b0 grive gr::JsonParser::Parse(char const*, unsigned long)
#3 0x4767cd grive gr::http::ValResponse::Write(char const*, unsigned long)
#4 0x7f45b404f508 /usr/lib/x86_64-linux-gnu/libcurl.so.4
#5 0x7f45b4064b5b /usr/lib/x86_64-linux-gnu/libcurl.so.4
#6 0x7f45b406e909 /usr/lib/x86_64-linux-gnu/libcurl.so.4
#7 0x7f45b406f181 /usr/lib/x86_64-linux-gnu/libcurl.so.4 curl_multi_perform
#8 0x7f45b4065d7b /usr/lib/x86_64-linux-gnu/libcurl.so.4 curl_easy_perform
#9 0x45b145 grive gr::http::CurlAgent::ExecCurl(std::string const&, gr::DataStream*, gr::http::Header const&)
#10 0x45b6e8 grive gr::http::CurlAgent::Put(std::string const&, gr::File_, gr::DataStream_, gr::http::Header const&)
#11 0x4607f1 grive gr::AuthAgent::Put(std::string const&, gr::File_, gr::DataStream_, gr::http::Header const&)
#12 0x456e7c grive gr::v2::Syncer2::Upload(gr::Resource*)
#13 0x457e88 grive gr::v2::Syncer2::Create(gr::Resource*)
#14 0x446aa7 grive gr::Resource::SyncSelf(gr::Syncer*, gr::Val const&)
#15 0x446e5b grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#16 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#17 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#18 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#19 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#20 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#21 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#22 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#23 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#24 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#25 0x446f70 grive gr::Resource::Sync(gr::Syncer*, gr::DateTime&, gr::Val const&)
#26 0x440548 grive gr::State::Sync(gr::Syncer*, gr::Val const&)
#27 0x44a3e6 grive gr::Drive::Update()
#28 0x42fd85 grive Main(int, char**)
#29 0x42db8b grive main
#30 0x7f45b2906a40 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#31 0x42e8f9 grive _start
[PN2gr8JsonTextE] = {
"error": {
"errors": [
{
"domain": "global",
"reason": "authError",
"message": "Invalid Credentials",
"locationType": "header",
"location": "Authorization"
}
],
"code": 401,
"message": "Invalid Credentials"
}
}
[PN2gr8ParseErrE] = parse error: trailing garbage
{ "error": { "errors": [
(right here) ------^
The text was updated successfully, but these errors were encountered: