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

gr::AuthAgent::CheckHttpResponse exception #4

Closed
mkauzlar opened this issue May 21, 2015 · 8 comments
Closed

gr::AuthAgent::CheckHttpResponse exception #4

mkauzlar opened this issue May 21, 2015 · 8 comments

Comments

@mkauzlar
Copy link

Hello,
after few lines (random) of sync an exception occurs. Restarting grive continues the sync then the exception again.
Here is the output (some parts overrided with XXXXX for privacy)

Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXX" deleted in local. deleting remote
sync "./XXXXXXXXX deleted in local. deleting remote
sync "./XXXXXXXXX" deleted in local. deleting remote
exception: /home/mkauzlar/Downloads/grive2/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: boost::exception_detail::clone_implgr::http::Error
[gr::http::HttpResponseTag_] = 412
[gr::http::UrlTag_] = https://www.googleapis.com/drive/v2/files/XXXXXXXXX/trash
[gr::http::HeaderTag*] = If-Match: "XXXXXXXXX"
Authorization: Bearer XXXXXXXXXXXXXX
GData-Version: 3.0

The whole drive sync (download) for the first time went ok (yesterday). This is happening now that I deleted some files and tried to resync.

Regards
M

@vitalif
Copy link
Owner

vitalif commented May 21, 2015

Please retry with the latest master, I suppose it's the same bug as in #5

@mkauzlar
Copy link
Author

Seems ok now. I have tested it on a couple of files and don't get the error anymore

@grzesiek-galezowski
Copy link

Happened to me as well today:

/Google Drive$ grive
Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./Shared/Raporty i prezentacje/TDDEBook/custom_commands.rb" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/Rakefile
" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/Rakefile" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/.gitignore" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/.project" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/README.md" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/environment_setup.sh" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/LICENSE.txt" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/License.txt" deleted in local. deleting remote
sync "./Shared/Raporty i prezentacje/TDDEBook/document-web.png" deleted in local. deleting remote
exception: /build/grive2-JFQ2lp/grive2-0.4.0/libgrive/src/protocol/AuthAgent.cc(191): Throw in function long int gr::AuthAgent::CheckHttpResponse(long int, const string&, const gr::http::Header&)
Dynamic exception type: N5boost16exception_detail10clone_implIN2gr4http5ErrorEEE
[PN2gr4expt12BacktraceTagE] = #0 0x47d0fc grive gr::Exception::Exception()
#1 0x4603cc grive gr::AuthAgent::CheckHttpResponse(long, std::string const&, gr::http::Header const&)
#2 0x460c96 grive gr::AuthAgent::Post(std::string const&, std::string const&, gr::DataStream_, gr::http::Header const&)
#3 0x455b6d grive gr::v2::Syncer2::DeleteRemote(gr::Resource_)
#4 0x446bce grive gr::Resource::SyncSelf(gr::Syncer_, gr::Val const&)
#5 0x446e5b grive gr::Resource::Sync(gr::Syncer_, gr::DateTime&, gr::Val const&)
#6 0x446f70 grive gr::Resource::Sync(gr::Syncer_, gr::DateTime&, gr::Val const&)
#7 0x446f70 grive gr::Resource::Sync(gr::Syncer_, gr::DateTime&, gr::Val const&)
#8 0x446f70 grive gr::Resource::Sync(gr::Syncer_, gr::DateTime&, gr::Val const&)
#9 0x446f70 grive gr::Resource::Sync(gr::Syncer_, gr::DateTime&, gr::Val const&)
#10 0x440548 grive gr::State::Sync(gr::Syncer_, gr::Val const&)
#11 0x44a3e6 grive gr::Drive::Update()
#12 0x42fd85 grive Main(int, char_*)
#13 0x42db8b grive main
#14 0x7f380683fa40 /lib/x86_64-linux-gnu/libc.so.6 __libc_start_main
#15 0x42e8f9 grive _start

[PN2gr4http15HttpResponseTagE] = 412
[PN2gr4http6UrlTagE] = https://www.googleapis.com/drive/v2/files/0B0nzjz32viZmNDY5OGh3eEcwNlE/trash
[PN2gr4http9HeaderTagE] = If-Match: "V1-oYosm7Hqin5z0Mtb-CnZdXIE/MTM5MTU0NTMzMTQxMw"
Authorization: Bearer ya29.lwGYROMxLfMBqlvsjsq8w37X7GGO851fLqetSHyQWS62ZjsF_Rn2ABOz
GData-Version: 3.0

Grive version: ~/Google Drive$ grive --version
grive version 0.4.0-pre May 25 2015 13:40:47

@grzesiek-galezowski
Copy link

Also, when I upload files, I get a lot of 412 response:

grive
Reading local directories
Synchronizing folders
Reading remote server file list
Detecting changes from last sync
Synchronizing files
sync "./Shared/Raporty i prezentacje/TDDEBook/cover.png" doesn't exist in server, uploading
sync "./Shared/Raporty i prezentacje/TDDEBook/cover-small.png" doesn't exist in server, uploading
sync "./Shared/Raporty i prezentacje/TDDEBook/Cover.odg" doesn't exist in server, uploading
sync "./Shared/Raporty i prezentacje/TDDEBook/mimetype" doesn't exist in server, uploading
request failed with 412, retrying whole upload in 5s
sync "./Shared/Raporty i prezentacje/TDDEBook/Rakefile~" doesn't exist in server, uploading
sync "./Shared/Raporty i prezentacje/TDDEBook/LICENSE.txt" doesn't exist in server, uploading
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
sync "./Shared/Raporty i prezentacje/TDDEBook/custom_commands.rb" doesn't exist in server, uploading
sync "./Shared/Raporty i prezentacje/TDDEBook/document-web.png" doesn't exist in server, uploading
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s
request failed with 412, retrying whole upload in 5s

@vitalif
Copy link
Owner

vitalif commented Jun 27, 2015

Please retry with the latest master, it should print response body of these 412's - maybe we'll learn something about them at last...

@vitalif
Copy link
Owner

vitalif commented Oct 7, 2015

You can also try the new --http-log file option to have all HTTP responses logged and then provide me the details from the end of that file.

@vitalif
Copy link
Owner

vitalif commented Oct 8, 2015

I'm now also getting a lot of intermittent 412 errors myself... But I don't yet understand why. They usually go away after restarting grive, but I end up with duplicated files...

@vitalif
Copy link
Owner

vitalif commented Oct 9, 2015

I believe 412 is fixed in master by using multipart uploads - now file metadata and contents are uploaded in a single request so the situation where the second request "does not see" the result of the first one due to the async nature of google drive service is impossible.
Please test and reopen the issue if you still experience it.

@vitalif vitalif closed this as completed Oct 9, 2015
@hubyhuby hubyhuby mentioned this issue Nov 15, 2019
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

3 participants