401 exception (probably from expired token) corrupts data

Bug #1337947 reported by Bryan Richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grive (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm downloading ~25GB of pictures and videos from Google Drive. Occasionally grive crashes because of an exception (details below), creating an empty local file for the last-processed file. When I rerun grive, the empty file overwrites the actual file on Google Drive. Luckily I have these files backed up separately!

I'm creating a bug in Grive's Github account separately. I'll include a link once it's available.

Here is a characteristic example with commentary:

    sync "./Pictures/2013/09/07/MVI_4125.MOV" created in remote. creating local

[That's the last file being processed.]

    exception: /build/buildd/grive-0.2.0/libgrive/src/http/CurlAgent.cc(149): Throw in function long int gr::http::CurlAgent::ExecCurl(const string&, gr::http::Receivable*, const gr::http::Header&)
    Dynamic exception type: boost::exception_detail::clone_impl<gr::http::Error>
    std::exception::what: std::exception
    [gr::expt::MsgTag*] =
    [gr::http::CurlCodeTag*] = 0
    [gr::http::HttpResponseTag*] = 401
    [gr::http::UrlTag*] = https://doc-04-20-docs.googleusercontent.com/docs/securesc/3jkjlpf4k76rqkgkk0e0r701d2f1mnjn/o759n60lqh4ibj6oi9u3h05nggvb0leq/1404410400000/10017692553974354887/10017692553974354887/0B03JpV0KFtDKMTgxUlh5T0NiYlE?h=16653014193614665626&e=download&gd=true
    [gr::http::HeaderTag*] = Authorization: Bearer ya29.NwCK_lwV0tjpuBoAAADM7l6YCGQksIdUaVS6nKWbNuJ6yizso7BfCTNVcueN6Q
    GData-Version: 3.0

[Oops, exception because of 401 response. Restart.]

    b@fuzzbomb:~/GoogleDrive$ grive
    grive: Symbol `json_tokener_errors' has different size in shared object, consider re-linking
    Reading local directories
    Synchronizing folders
    Reading remote server file list
    Synchronizing files
    sync "./Pictures/2013/09/07/MVI_4125.MOV" changed in local. uploading

[Broken file gets uploaded.]

Revision history for this message
Bryan Richter (bryan-richter) wrote :
Revision history for this message
Bryan Richter (bryan-richter) wrote :

This bug was fixed upstream in version 0.3.0 (released two years ago, almost to the day).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.