Open jmobrien opened 1 year ago
I haven't fully processed all of the above, but in the name of giving you some ideas, I would look very hard at the corpus
argument of drive_find()
and other functions that ultimately call drive_find()
. If you haven't already, I would also read the docs on shared drives:
https://googledrive.tidyverse.org/reference/shared_drives.html
Just want to chime in here that I am having similar problems that I cannot get to the bottom of.
In my case, I have access to a shared folder that is not part of a shared drive, i.e. the folder's parent is not shared, and this folder appears under "Shared with me" but cannot be accessed via "Shared drives" on the browser GUI.
Now
dd <- googledrive::drive_get(path = "https://drive.google.com/drive/folders/<ID>")
returns a valid dribble with one row. But
googledrive::drive_ls(path = dd, corpus = "allDrives")
and
googledrive::drive_ls(path = dd, corpus = "domain")
both error with:
> rlang::last_trace()
<error/purrr_error_indexed>
Error in `map()`:
ℹ In index: 1.
Caused by error in `.f()`:
! Client error: (404) Not Found
Shared drive not found: 0AEmDcn0Ku6o9Uk9PVA
• message: Shared drive not found: 0AEmDcn0Ku6o9Uk9PVA
• domain: global
• reason: notFound
• location: driveId
• locationType: parameter
---
Backtrace:
▆
1. └─googledrive::drive_ls(path = dd, corpus = "allDrives")
2. ├─rlang::exec(drive_find, !!!params)
3. └─googledrive (local) `<fn>`(corpus = "allDrives", shared_drive = `<drv_id>`, q = "('1BFePA5dltXqdwY1X7Ng_Xal4e7zaZLUM' in parents)")
4. ├─base::append(params, handle_shared_drives(shared_drive, corpus))
5. └─googledrive:::handle_shared_drives(shared_drive, corpus)
6. ├─googledrive::as_shared_drive(shared_drive)
7. └─googledrive:::as_shared_drive.drive_id(shared_drive)
8. └─googledrive::shared_drive_get(id = x)
9. ├─googledrive::as_dribble(map(as_id(id), get_one_shared_drive_id))
10. └─purrr::map(as_id(id), get_one_shared_drive_id)
11. └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
12. ├─purrr:::with_indexed_errors(...)
13. │ └─base::withCallingHandlers(...)
14. ├─purrr:::call_with_cleanup(...)
15. └─googledrive (local) .f(.x[[i]], ...)
The ID 0AEmDcn0Ku6o9Uk9PVA
is not the same as the folder drive_get
. If I'm understanding correctly, I think it's the ID of the drive in which the shared folder sits, but to which I do not have access.
Encountering issues where googledrive is unable to usefully access anything inside a shared FOLDER that comes from a shared drive. Permissions as Content Manager. Limited to these specific shared folders--full shared drives work fine using the usual techniques, as do shared folders that do not come from a shared drive.
This appears similar to #402, but the ultimate guidance there does not seem to work. Example below:
Created on 2023-07-18 with reprex v2.0.2
Tunneling down, the failed API request looks like this:
(above was passed to
request_make()
from withinget_one_shared_drive_id()
)Likely relatedly, it's not possible to directly reference anything about the shared drive the shared folders come from:
Created on 2023-07-18 with reprex v2.0.2
Ideas? I can't tell whether this is an API limitation, a sharing configuration issue, me missing something, or what.