alfredapp / google-drive-workflow

Alfred Workflow for Google Drive
BSD 3-Clause "New" or "Revised" License
170 stars 8 forks source link

Multiple Google Drive Paths not working any more #43

Closed jovobe closed 2 years ago

jovobe commented 2 years ago

Diagnostic

Workflow version

2022.15

Alfred version

5.0

macOS version

12.4

Architecture

arm64

Preferences

Dict { result_limit = 50 }

Full Disk Access

Granted

Google drive path

Does NOT Exist: /Volumes/GoogleDrive/My Drive,/Volumes/GoogleDrive/Shared drives/some-shared-drive

Cache dir

cache.db

Cache file

16777233 28161706 -rw-r--r-- 1 username staff 0 108261376 "Jul 15 13:54:55 2022" "Jul 15 11:48:56 2022" "Jul 15 11:48:56 2022" "Jul 14 21:36:55 2022" 4096 229504 0 /Users/username/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db

Temporary cache

Does NOT exist

Build progress

NOT running

Launchd job

Loaded: - 0 com.alfredapp.googledrive Installed

Debugger output

[15:50:03.480] Logging Started...
[15:50:09.779] Google Drive[Keyword] Processing complete
[15:50:09.780] Google Drive[Keyword] Passing output '' to Run Script
[15:50:09.853] Google Drive[Run Script] Processing complete
[15:50:09.857] Google Drive[Run Script] Passing output '' to Run Script
[15:50:09.948] ERROR: Google Drive[Run Script] Google Drive path does not exist!
[15:50:09.952] Google Drive[Run Script] Processing complete
[15:50:09.953] Google Drive[Run Script] Passing output 'PATH_ERROR' to Run Script
[15:50:09.953] Google Drive[Run Script] Passing output 'PATH_ERROR' to Conditional
[15:50:09.954] Google Drive[Conditional] Processing complete
[15:50:09.954] Google Drive[Conditional] Passing output 'PATH_ERROR' to Post Notification
[15:50:09.954] Google Drive[Post Notification] Processing complete
[15:50:09.954] Google Drive[Post Notification] Passing output 'PATH_ERROR' to Play Sound

More details

Since Update 2022.13 where the new Alfred 5 stuff was added, the feature to add multiple paths to the google_drive_path is not working any more. For reference that it was working beforehand, see this issue: https://github.com/alfredapp/google-drive-workflow/issues/25 This functionality is crucial for me. Can I expect a bugfix for this?

vitorgalvao commented 2 years ago

The change and fix are explained in the release notes for 2022.13:

  • No longer allow multiple paths, to simplify path setting and more readily support Linked Shared Folders.
    • If you have multiple Drives and want to ignore some, add the root to the Google Drive Path and the ones you wish to not see to the Ignore List.
jcarrolo commented 2 years ago

Is there a way to bring this functionality back? I have multiple drives and really need to them. This is a major setback for me

vitorgalvao commented 2 years ago

Is there a way to bring this functionality back? I have multiple drives and really need to access both.

Again, the solution is in the release notes that I both linked and quoted above:

If you have multiple Drives and want to ignore some, add the root to the Google Drive Path and the ones you wish to not see to the Ignore List.

If you want to access all drives and ignore none, add the common directory between both. E.g. instead of /Volumes/GoogleDrive/My Drive,/Volumes/GoogleDrive/Shared drives/some-shared-drive, do /Volumes/GoogleDrive.

jovobe commented 2 years ago

This is a very cumbersome solution. Imagine my situation: I want to index my Drive plus one specific shared drive. Whenever a new shared drive is added (which happens a lot), I have to update my ignore list by adding the new shared drive. I currently see no other solution than rolling back to 2022.12 which feels like the wrong way.

vitorgalvao commented 2 years ago

Imagine my situation (…) Whenever a new shared drive is added (which happens a lot)

I need to imagine everyone’s situation. Constantly adding shared drives is not the common use case. I need to think of every user and what better supports the largest amount of people.

I have to update my ignore list by adding the new shared drive.

If you want to ignore it. If you don’t, this solution is the opposite. Again, there are other users to think about.

With the introduction of Google Drive shortcuts, adding Drives piecemeal will result in files not showing up anyway. Thus, adding the root and ignoring what you don’t want is the solution which will work with the direction Google is going.

jcarrolo commented 2 years ago

I do not believe that this is working. I have 2 drives - /Volumes/GoogleDrive and /Volumes/GoogleDrive-112737553631035858984. In the workflow, I entered /Volumes/GoogleDrive. I rebuilt cache and after the rebuild it can not find a file that I created just prior to the rebuild.

vitorgalvao commented 2 years ago

@jcarrolo In your case the root directory is /Volumes, because there are two separate Google Drive directories there side by side. Do you know why your setup is like that? What version of the Google Drive app do you have installed?

jcarrolo commented 2 years ago

My Google drive version is Version: 60.0.2.0 (Apple Silicon)

vitorgalvao commented 2 years ago

And do you know or can you think of why your setup has two different drives in /Volumes instead of storing them inside Volumes/GoogleDrive?

jcarrolo commented 2 years ago

No idea. One was created by my company and one is my personal drive

vitorgalvao commented 2 years ago

Do they have different emails associated with them?

jcarrolo commented 2 years ago

Yes

jcarrolo commented 2 years ago

I just tested it with /Volumes and it appears to be working.

bevanjkay commented 2 years ago

@vitorgalvao In my setup I have four different Google Drive accounts linked within the application, so there are four Google Drive paths. They are all under /Volume and I am happy to do it this way if this is what you believe will work, but could there be side effects if I have other volumes attached under that path?

examples of two of my pathnames are; /Volumes/GoogleDrive-108382340023517537906 /Volumes/GoogleDrive-114647590801554019699

vitorgalvao commented 2 years ago

Thank you all for the feedback. Indeed I don’t think adding /Volumes is the proper approach so 2022.16 reverts to using the comma-separated method from before (but as GUI User Configuration) until I think of a better solution. Maybe I’ll wait until Google finishes the transition of Google Drives to the File Provider API and reevaluate then.

Presumably, if those GoogleDrive-NNNNNNNNNNNNNNNNNNNNNN are always from Drives with different associated emails (is that also the case for you @bevanjkay?) the shortcuts issue won’t apply.

bevanjkay commented 2 years ago

@vitorgalvao The first account has the usual /Volumes/GoogleDrive and the subsequent ones have the ID attached /Volumes/GoogleDrive-* - yes each mounted Volume is a separate Google Account.

I can't speak into the shortcuts part right now as I wasn't aware of the change until now.

jcarrolo commented 2 years ago

@vitorgalvao Thank you very much for reverting to the original behavior. Much appreciated.

vitorgalvao commented 2 years ago

Version 2022.19 of the Google Drive workflow goes back to using the File Picker configuration. But because those are now editable in Alfred 5.0.3, comma-separated paths will continue to work. This way we get the best of both worlds.

You won’t have to make any changes after the update, everything should continue to work as you had it.