Jump to content

Alfred stopped finding files on Google Drive File Stream


Recommended Posts

When you setup the Workflow for the first time, it will set the `google_drive_path` to `/Volumes/Google Drive/My Drive/`. To include the shared drive, you simply want to move one directory up in the directory tree, i.e. set the `google_drive_path` to `/Volumes/Google Drive/`. This will include both your `My Drive` and your `Shared Drives`. That's it. 

Link to comment

Hello everybody, 

 

some time ago I look into this thread, 'cause of vacation and so on. I just want to make sure I install the newest version from @vitor's workflow, is this the newest one?

It seems that there are different versions with a different approach, I'm quite unsure which one is the "best" one?

 

Also, I notice that the version I installed is not working anymore...

Thanks a lot!

Edited by Henry31
add notice
Link to comment

Hi everyone. I've recently switched over to the Google Drive desktop client from Backup and Sync (where spotlight was working) and now have an issue where any file that Google Drive modifies is removed from the  spotlight index until I open the file again. However if Google Drive re-syncs the file it seems to strip the metadata away and the file becomes invisible to spotlight. 

 

I'm probably going to stop using Google Drive as it seems like this will not be fixed by them any time soon. However I wanted to give this workflow a try and see if I can live with it. 

 

I was able to get the workflow to enable finding files inside Google Drive with Alfred. Is this supposed to be able to search inside files as well (full indexing) or just return a file name? Does it support the "in" operator?

 

Thanks

 

Link to comment
2 hours ago, Tcellguy said:

Is this supposed to be able to search inside files as well (full indexing) or just return a file name? Does it support the "in" operator?

 

No and no. The workflow only indexes filesystem metadata. It doesn't read any files, as that would take far too long.

Link to comment
  • 2 months later...

Hi to all, this workflow worked like a charm on my 15" mid-2015 Macbook Pro. Now I own a 14" M1Pro, I migrated everything with time machine, but sadly it doesnt work anymore.

This is the log when I try to rebuild cache:

 

Quote

[10:34:42.995] Google Drive[Keyword] Processing complete

[10:34:42.996] Google Drive[Keyword] Passing output '' to Run Script

[10:34:43.519] ERROR: Google Drive[Run Script] Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7

Ignoring ffi-1.15.0 because its extensions are not built. Try: gem pristine ffi --version 1.15.0

Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0

Ignoring sassc-2.4.0 because its extensions are not built. Try: gem pristine sassc --version 2.4.0

Google Drive path does not exist!

[10:34:43.525] Google Drive[Run Script] Processing complete

[10:34:43.526] Google Drive[Run Script] Passing output 'PATH_ERROR' to Run Script

[10:34:43.526] Google Drive[Run Script] Passing output 'PATH_ERROR' to Conditional

[10:34:43.526] Google Drive[Conditional] Processing complete

[10:34:43.527] Google Drive[Conditional] Passing output 'PATH_ERROR' to Post Notification

[10:34:43.527] Google Drive[Post Notification] Processing complete

[10:34:43.527] Google Drive[Post Notification] Passing output 'PATH_ERROR' to Play Sound

 

I presume it's a problem of path, but how can I solve it?

 

Link to comment

@ecstaticax You are posting in the wrong place, the Workflow’s thread is another. Its first post explains how to set your Google Drive path, and the second explains how you can find out what it is if you set it to an atypical location.

 

You also seem to have a possibly broken Ruby installation. If that will be a problem is early to see, but it wouldn’t be surprised if the culprit were the restoring from backup. Apple doesn’t seem to have tested migrating machines from one architecture to another nearly enough, nor would I ever trust them to even do an acceptable job at it.

Link to comment
4 hours ago, vitor said:

@ecstaticax You are posting in the wrong place, the Workflow’s thread is another. Its first post explains how to set your Google Drive path, and the second explains how you can find out what it is if you set it to an atypical location.

 

You also seem to have a possibly broken Ruby installation. If that will be a problem is early to see, but it wouldn’t be surprised if the culprit were the restoring from backup. Apple doesn’t seem to have tested migrating machines from one architecture to another nearly enough, nor would I ever trust them to even do an acceptable job at it.

 

Thanks for your reply. I reply in this thread (or did I have to do it in the other?). Is there anyway I can manually correct Ruby? Regards.

Link to comment
Just now, ecstaticax said:

Is there anyway I can manually correct Ruby?

 

Don’t worry about it until we know if it’s a problem. But if it is a problem, you likely can’t fix it without a full reinstall. The problem seems rare so there’s sparse information online.

Link to comment
59 minutes ago, vitor said:

 

Don’t worry about it until we know if it’s a problem. But if it is a problem, you likely can’t fix it without a full reinstall. The problem seems rare so there’s sparse information online.

 

BTW, I checked and I had two rubys installed. One was 3.0 and x86, the other was 2.6 and universal. Even if I manually removed the first one (it seemed to be installed with homebrew, but it wasn't on the list of homebrew apps), also from paths, nothing works yet. I tried to manually run the gem pristine commands, but they cannot write on the OS default gem. 

Sadly I will have to find some other solution. Thanks for your answer.

Link to comment

I have an update. I installed a new version of Ruby and modified your script to execute that version (placed in /usr/local/opt etc.). Then I had to run all the pristine commands. Now I have a problem with SQL3. I already installed sqlite3 in your workflow alfred directory.

I think I am close to solution but I need help for that error about sqlite3.

 

Quote

[21:09:42.680] Google Drive[Keyword] Processing complete

[21:09:42.681] Google Drive[Keyword] Passing output '' to Run Script

[21:09:42.766] ERROR: Google Drive[Run Script] <internal:/opt/homebrew/Cellar/ruby/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- sqlite3 (LoadError)

from <internal:/opt/homebrew/Cellar/ruby/3.0.3/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'

from /Users/gianluca/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.F1C0ECD0-1308-4364-9B17-46EE07EB4356/rebuild_cache:6:in `<main>'

[21:09:42.769] Google Drive[Run Script] Processing complete

[21:09:42.770] Google Drive[Run Script] Passing output '' to Run Script

[21:09:42.770] Google Drive[Run Script] Passing output '' to Conditional

[21:09:42.770] Google Drive[Conditional] Processing complete

[21:09:42.771] Google Drive[Conditional] Passing output '' to Conditional

[21:09:42.771] Google Drive[Conditional] Processing complete

[21:09:42.771] Google Drive[Conditional] Passing output '' to Post Notification

 

Link to comment
6 minutes ago, ecstaticax said:

modified your script to execute that version

 

Note that change will be overwritten on Workflow updates. But it’s stable now and all reported kinks have been ironed and feature requests implemented, so there’s no plans for updates in the near future.

 

8 minutes ago, ecstaticax said:

placed in /usr/local/opt

 

Using the gem command from that ruby, you have to gem install sqlite3.

Link to comment
6 minutes ago, vitor said:

 

Note that change will be overwritten on Workflow updates. But it’s stable now and all reported kinks have been ironed and feature requests implemented, so there’s no plans for updates in the near future.

 

 

Using the gem command from that ruby, you have to gem install sqlite3.

 

No problem for updates. If it will ever work, I will never update it 🙂

Thanks, I already did it in the meanwhile, and now there's the final problem (I hope):

 

Quote

[21:25:11.742] Google Drive[Keyword] Processing complete

[21:25:11.743] Google Drive[Keyword] Passing output '' to Run Script

[21:25:11.822] ERROR: Google Drive[Run Script] Google Drive path does not exist!

[21:25:11.823] Google Drive[Run Script] Processing complete

[21:25:11.824] Google Drive[Run Script] Passing output 'PATH_ERROR' to Run Script

[21:25:11.824] Google Drive[Run Script] Passing output 'PATH_ERROR' to Conditional

[21:25:11.825] Google Drive[Conditional] Processing complete

[21:25:11.825] Google Drive[Conditional] Passing output 'PATH_ERROR' to Post Notification

[21:25:11.827] Google Drive[Post Notification] Processing complete

[21:25:11.828] Google Drive[Post Notification] Passing output 'PATH_ERROR' to Play Sound

 

I already customized your code with my Italian google drive location, perhaps is it a matter of spaces?

 

Quote

Gdrive_paths = if ENV['google_drive_path'].nil? || ENV['google_drive_path'].empty?
  [Pathname.new('/Volumes/GoogleDrive/Il mio Drive')]
else
  ENV['google_drive_path'].split(',').map { |p| Pathname.new(p.strip).expand_path }
end

 

Link to comment

IT WORKED!

 

So, for all m1 silicon mac owners, migrating with TimeMachine backup these are the steps:

 

- install homebrew

- install ruby for silicon with homebrew

- update .zshrc with path to newest ruby

- update workflow script to point to the newest ruby

- eventually update workflow path to google drive in global enviroment variable.

 

Thanks for the support.

 

Regards!

 

 

Link to comment
2 hours ago, ecstaticax said:

IT WORKED


Glad to read that!

 

2 hours ago, ecstaticax said:

- update .zshrc with path to newest ruby


That’s not necessary and won’t do anything regarding the Workflow.

 

2 hours ago, ecstaticax said:

- eventually update workflow path to google drive in global enviroment variable.


That’s also not necessary for most people nor ARM specific. That is part of the Workflow instructions.

Link to comment
  • 3 months later...

I could use some help.  I've just installed Alfred and this workflow, but I can't get it to find my Google Drive.  It keeps saying "google drive path does not exist.'  I think my drive is in the normal spot.  I see mine says Google Drive not GoogleDrive. I tried adding a space but that didn't help.  Please help me.  I'm brand new to Alfred.  

 

I so miss my Spotlight index/search of my Google Drive.  But I don't know if this is even going to be worth it.  The power of Spotlight was that it would search within files too.  

Screen Shot 2022-03-26 at 10.41.29 PM.png

Screen Shot 2022-03-26 at 10.47.12 PM.png

Link to comment
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...