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

Shared folders not synced #37

Closed
ahilsend opened this issue Oct 17, 2015 · 11 comments
Closed

Shared folders not synced #37

ahilsend opened this issue Oct 17, 2015 · 11 comments

Comments

@ahilsend
Copy link

In google drive it is possible to add files/folders that are accessible by me (company domain access) to "My Drive". These folders have not explicitly been shared with me, but they are in "My Drive".

grive2 will successfully sync folders that have been explicitly shared with me. But not those I added to "My Drive"

In the logs I see this for all files within those shared folders:

file "<FILE-NAME>" parent doesn't exist, ignored
@vitalif
Copy link
Owner

vitalif commented Nov 10, 2015

Grive is using 'me' in readers search condition to list syncable resources. The idea was exactly to allow syncing of shared files/directories...
So, we must find an appropriate search condition to sync "My Drive"...
The documentation is here https://developers.google.com/drive/web/search-parameters
There is a "sharedWithMe" condition - can you test it here, will it show your company files? https://developers.google.com/drive/v2/reference/files/list (there is an "api tester" in the end of the page - just enter "sharedWithMe" into "q" field and click execute)

@migueldvb
Copy link

I have some files that are shared with me and they are shown by entering into https://developers.google.com/drive/v2/reference/files/list sharedWithMe but they are not synced by grive2. These files are stored under a subdirectory.

@vitalif
Copy link
Owner

vitalif commented Jan 11, 2016

Is there something I can add to "my drive" like that? Maybe you can create a public folder and I'll try to add to "my drive" and debug the sync with grive?

@migueldvb
Copy link

I have created a public empty folder in my drive for testing:
https://drive.google.com/folderview?id=0B3Hv-zV2q5IcQ05uMnA4RVM0UzA&usp=sharing
I can sync my own folder using grive2 but not the ones that have been shared with me. When I type grive2 -s I can see my shared folders in google drive but they are not downloaded.

@vitalif
Copy link
Owner

vitalif commented Jan 11, 2016

ok, now please add a file there...

@migueldvb
Copy link

I have uploaded a file to the folder now.

@vitalif
Copy link
Owner

vitalif commented Jan 11, 2016

Hm... I suspect that "me in readers" condition is not needed at all. I've removed it in the master branch, this allowed grive to download your file. Please update and try if everything is ok now.

@migueldvb
Copy link

I have compiled the code with this patch and the unauthorized error when I sync is:

Failed to refresh auth token: HTTP 401, body: {
  "error" : "unauthorized_client"
}

and when I input the new code for authentication:

exception: /home/miguel/Source/grive2/libgrive/src/protocol/OAuth2.cc(116): Throw in function void gr::OAuth2::Refresh()
Dynamic exception type: boost::exception_detail::clone_impl<gr::OAuth2::AuthFailed>
[gr::expt::BacktraceTag*] = #0 0x545c20 :0 gr::Exception::Exception()
#1 0x529261 :0 gr::OAuth2::AuthFailed::AuthFailed()
#2 0x528ee0 :0 gr::OAuth2::Refresh()
#3 0x527d08 :0 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&)
#4 0x4e1e5d :0 Main(int, char**)
#5 0x4e252f :0 main
#6 0x7fbe94e6f610 /usr/lib/libc.so.6 __libc_start_main
#7 0x4e0bf9 :0 _start

@vitalif
Copy link
Owner

vitalif commented Jan 11, 2016

O_o I don't think the change could have caused such error...

@migueldvb
Copy link

I went from v0.3 to the master branch, the error is not related with this ticket.

@migueldvb
Copy link

The change in 9841635 fixed the issue for me. Thank you!

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