Jump to content

Henry31

Member
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Henry31

  1. Just based on my understanding, will this workflow just build up an index. So, a database file on your disk. So not heavy i/o writings, just one file, which will be updated and extended...

     

    I don't know if this is a problem for an SSD. I'm working on a MacBook Pro also with an SSD. But for me, build is a search index is a basic task for a computer, so I'm not worrying about my SSD. It's a task which a computer must do, never mind if it has an SSD or an HDD.

     

    Just my two cents..

  2. On 10/21/2021 at 2:34 PM, vitor said:

     

    Yes. You’re running the commands multiple times and making them trample each other.

     

    On 10/22/2021 at 3:26 AM, vitor said:

    New release is out. It expands gd to differentiate between cache missing or being built and prevents immediate sequential cache rebuilds.

     

    Thanks a lot for clarifying, and also for the new release.


    I installed everything on the mac of my colleague and after a while the index was built up and everything works fine for him. For me, on my mac, after 24h it was not working, the index seems not to built up correctly.

    But now I get it to work, this is how I did it:

    1. Make sure the index agent is disabled
    2. Deleted your workflow
    3. Restarted by Mac
    4. Reinstalled your workflow new
    5. enabled the index agent
    6. after a while the index was built up, everything works 🎉

    Thanks a lot for your work @vitor!!

     

     

  3. Hello @vitor,

    for several weeks your workflow isn't working for me. Today, I take the time and removed the old Google Drive Workflow from Alfred.

     

    I installed the new workflow from your thread here.

    - Google Drive Workflow Version: v2021.4

    - Alfred Version: 4.6 [1266] 

    - MacOS Version: Big Sur (11.6)

     

    After enabling the Agent:

    [11:09:17.099] Google Drive[Script Filter] Queuing argument ''
    [11:09:17.167] Google Drive[Script Filter] Script with argv '' finished
    [11:09:17.168] Google Drive[Script Filter] {"items": [
          {
            "title": "Install Google Drive launchd service",
            "subtitle": "Save a cache of added files whenever /Users/henryauffahrt/henry.auffahrt@aufbau.online - Google Drive is modified",
            "arg": "install"
          },
        ]}
    [11:09:18.036] Google Drive[Script Filter] Processing complete
    [11:09:18.038] Google Drive[Script Filter] Passing output 'install' to Run Script
    [11:09:18.281] Google Drive[External] Processing complete
    [11:09:18.283] Google Drive[External] Passing output '' to Run Script

    PS: I also tried this path: /Users/henryauffahrt/Google Drive - AufBau.

     

    I do not see a message like "all done" popping up for several minutes.

     

    If I search something, I get the following message:

    [11:13:37.146] Google Drive[Script Filter] Queuing argument 'chocolat'
    [11:13:37.287] Google Drive[Script Filter] Script with argv 'chocolat' finished
    [11:13:37.288] Google Drive[Script Filter] {"items":[{"title":"Run :gdrebuildcache or :gdlaunchd","subtitle":"The former will rebuild the cache file once while the latter will rebuild it every day","valid":false}]}

     

    What do you mean with "The former"? Is the indexing process is still in progress?

     

    I tried to rebuild the cache with the :gdrebuildcache command

    [11:14:34.158] Google Drive[Keyword] Processing complete
    [11:14:34.159] Google Drive[Keyword] Passing output '' to Arg and Vars
    [11:14:34.160] Google Drive[Arg and Vars] Processing complete
    [11:14:34.161] Google Drive[Arg and Vars] Passing output '' to Run Script

     

    Passing output '' ← Could the blank output be a problem here?

     

    I also read your comment in the script for the :gdlaunchd

    # Set correct directory to watch
    # Current method might not be robust enough
    # if there are characters in the path which need escaping

     

    So I tried some other pathes like:

    • /Users/henryauffahrt/Google Drive - AufBau/My Drive
    • /Users/henryauffahrt/Google Drive - AufBau/Shared drvies
    • /Users/henryauffahrt/Google Drive - AufBau
    • /Users/henryauffahrt/Google Drive - AufBau/
    • "/Users/henryauffahrt/Google Drive - AufBau" ← Here I get an error output: [11:18:53.931] ERROR: Google Drive[Run Script] Google Drive path does not exist!
    • '/Users/henryauffahrt/Google Drive - AufBau' ← Same as above, thanks for this good error handling

    After changing the path I run :gdrebuildcache and I got the following message:

    [11:22:17.718] Google Drive[Keyword] Processing complete
    [11:22:17.719] Google Drive[Keyword] Passing output '' to Arg and Vars
    [11:22:17.720] Google Drive[Arg and Vars] Processing complete
    [11:22:17.720] Google Drive[Arg and Vars] Passing output '' to Run Script
    [11:22:17.954] ERROR: Google Drive[Run Script] /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize': table main already exists (SQLite3::SQLException)
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
    	from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
    	from /Users/henryauffahrt/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.5665891C-6430-468E-97FC-80D87DD7B501/rebuild_cache:24:in `<main>'

     

    Sorry If I might get it wrong, but with 'initialize' it means that the indexing process is still going on? May I'm not patient enough?

     

    Thanks a lot for your help again, I don't know how to make it up to you 😅

  4. 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!

  5. 17 hours ago, vitor said:

    Fantastic! Now just need to wait for confirmation from @Henry31 and @alfredpanda

     

     

    @vitor you are amazing! I read through all the post that were posted here, I installed the latest version, and it works pretty well. In the beginning, I thought that it was not working, but I think it was building up the cache in the background. After a while, all files and folders will show up close to 1 second after typing in.

     

    What I usually do are two things:

    • "searching for a customer project folder" this is working now  
    • "searching for our current google doc file like 'SEO-Sitemap - domain.com.gsheet'" but as you can see it's a .gsheet file. So this is not a file, this is physical on my disk. And this is working as well

    I had once a very big lag after typing in "seo" I have a huge amount of files including this keyword. The interface from Alfred freezes and I couldn't close it. After some seconds, 10 or 20 it disappears. But yeah, maybe an issue because it is still building up a cache in the background? Or because the json file in the background was getting to big, because of the huge amount of files including this keyword.

     

    16 hours ago, physiltant said:

    I changed the keyword to ' (which I assume many will want to eventually do)

     

    I'm definitely one of these guys. 

    Currently, it is a bit unusual for me. I also changed the keyword to ' , because you can activate Alfred in the "Quick File Search mode". If you then use the space bar in the Alfred window, ' is entered, and you search the whole computer.

    Before it was native everything, of course. Now I have to go down once with the arrow key, or I just type the space bar a second time.

    I guess you have to get used to that because the solution now is using workflow. But I think this works for me pretty well.

     

    I attached two screenshots about the settings and how it look like for me when typing in the [spacebar] or keyword ' (single apostrophe/single quotation mark)

    Quick File Search Mode.png

    Spacebar Keyword with nativ file search.png

  6. 17 hours ago, vitor said:

    Are any of you comfortable enough with the terminal to try running the script directly?


    I can’t reproduce your hanging, and perhaps running directly will provide some insight. A normal output would be it showing a JSON output of your Drive files.

     

    I changed the Gdrive_path variable to the path of my Gdrive Folder.

     

    The script takes a lot of time... Maybe we should add a timeout somewhere...

     

    But after 10 or 20 minutes I got a long output with all of my files. I give you an excerpt of that:

     

    {"uid":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/bootstrap.css","type":"file","title":"bootstrap.css","subtitle":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/bootstrap.css","icon":{"path":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/bootstrap.css","type":"fileicon"},"arg":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/bootstrap.css"},
    {"uid":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/sourcemap.map","type":"file","title":"sourcemap.map","subtitle":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/sourcemap.map","icon":{"path":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/sourcemap.map","type":"fileicon"},"arg":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/themes/my-evo/sourcemap.map"},
    {"uid":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails","type":"file","title":"productdetails","subtitle":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails","icon":{"path":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails","type":"fileicon"},"arg":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails"},
    {"uid":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails/stock_OLD_B11.tpl","type":"file","title":"stock_OLD_B11.tpl","subtitle":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails/stock_OLD_B11.tpl","icon":{"path":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails/stock_OLD_B11.tpl","type":"fileicon"},"arg":"/Users/henryauffahrt/Google Drive - AufBau/Shared drives/50_Kunden-Projekte/P21010_domain.net - Herr XXXXXX/Sourcecode/templates/OM-Aufbau/productdetails/stock_OLD_B11.tpl"}

     

    For data protection reasons, I changed one folder name using search and replace.

    And I've added a new line. So you can see a list of items according to UID

  7. On 8/14/2021 at 11:49 PM, vitor said:

    Let’s wait for @Henry31’s feedback before going onto next steps.

     

    Thanks @vitor for helping us here with this issue.

     

    I have the same results as @alfredpanda has reported.

     

    I change the location of the Google Drive folder

     

    # from
    Gdrive_path = Pathname.new('/Volumes/GoogleDrive/My Drive')
    
    # I chagned to:
    Gdrive_path = Pathname.new('/Users/henryauffahrt/Google Drive - AufBau')

     

    Under '/volumes/' I only find the disc of my MacBook. 

     

    Here is a screenshot with the logging console:

    1925804942_Screenshot2021-08-16at08_39_02.thumb.png.07adedce75093e5162579b6b551b7db4.png

  8. 1 hour ago, vitor said:

    I do mean the recursive listing. The goal is to figure out if despite not being indexed by Spotlight, the files can be listed via common CLI tools. The recursive flag is so you can check if only some are listed.

     

    Ah okay I understand.

     

    I will get a long list with all "streamed" folders and files, everything seems fine.

     

    1 hour ago, vitor said:

    That seems to be the same thing I said. I’ve edited the previous post so we have specific nomenclature (“Folders from Drive” and “Folders from your computer”). Can you clarify what works and doesn’t taking that into account?

     

    I "stream" files all of my files from Google Drive.

    402948932_Screenshot2021-08-11at16_55_38.thumb.png.97b6029ff3e35ef643c93a857e9bcd22.png

     

    And then make most of the folders and files "offline available".

    Mouse_Highlight_Overlay-24.thumb.png.79d71e064cc6d92262068d813ef5a213.png

     

    1 hour ago, vitor said:

    I saw in another thread (and now your screenshot) that you moved the default online sync folder. That might not be a good idea, and since it didn’t fix your problem, it might be best to put it back.

     

    That's exactly what I thought, for this reason I removed Google Drive completely once and left the folder with the default settings. This unfortunately led to the same error and resulted in no improvement.

     

  9. 8 minutes ago, vitor said:

    Seems like files in the second option would be indexable by Spotlight and Alfred, and that the issue everyone is facing is related to the first point. Is that correct?

     

    No, this is not correct.

     

    Before the Google Drive Backup, only files which are locally synced on my disk where indexable by Spotlight and Alfred, I GUESS. I'm not 100% sure how it behaves with only online files, because I usually synced all my Google Drive files.

     

    So the issue is related to local synced files, which behave like Dropbox.

     

    To the command

    ls -R

    will print out a very long list of files because it is the 'recursive' parameter. Did you mean another command?

     

    For example, If I type in

    ls -lisah

    I get the following output:

     

    549975501_Screenshot2021-08-11at14_57_22.thumb.png.54c7860f08c10cad69a04f578c00119b.png

     

    I hope this helps...

     

    Thanks a lot for any investigating, this issue is very annoying and slowest my down every day in my daily workflow...

     

  10. I got a pretty honest answer from the Google support, I would like to share with you. Hopefully for others helpful.

     

    Quote

    Thank you for contacting me back, I was checking the information with my high level department, in this specific matter my best recommendation is to wait until Google releases a new update to improve the integration with the MacOS feature. Answering your last question we do not recommend to use the previous versions because the executable files for the previous versions are no longer available. Since the previous versions are deprecated, there are no updates for those, that means you could face incompatibility issues with the Google Drive web UI. we provided a feedback to our engineering team, in order to verify this particular situation with the new version. Keep in mind that sometimes the new versions take some time to be compatible with all the features in the operating systems. Let's try and use the current workarounds you found and you can keep tracking more details about the new version using this link:
    https://workspaceupdates.googleblog.com/2021/07/google-drive-backup-and-sync-transition.html

     

    The link to the Google-Blog will explain what I explain in my last post.

     

    It seems that the only solution is to wait for an update by Gooogle.

     

    @Michal Bryxí regarding this blog post, you have time until October 1, 2021 to update. Plenty of time for Google to provide an update that solves the spotlight issue.

     

    Only solution for me is to wait, or try the new solution @Vero explained with the Google API and an Alfred API, that sounds very interesting.

  11. 14 minutes ago, Michal Bryxí said:

    One thing to note is that I'm not using "Google Drive vXX" (I don't even know where to download this one?), but "Backups and Sync from Google":

     

    Good that you mention this. Backup and Sync from Google is the old Version for Google Drive (private).

     

    If you are a Google Workspace Customer (for business purpose) you can't use "Backup and Sync from Google" instead you must use "Google File Stream".

     

    Because this is very confusing, Google did a cool step: They simplified both apps and bring it together. So "Backup and Sync from Google" and "Google File Stream" are now "Google Drive for Desktop". 

     

    In this help article it will be explained: https://support.google.com/googleone/answer/10309431 Look at the FAQ section they will explain it there.

     

    @Michal Bryxí you should definitely stick to "Backup and Sync from Google" otherwise you can not use Spotlight or Alfred search. I'm really jealous of you, because you can use it still. 

  12. Thanks a lot @Vero for the update.

    I just found a reddit post about spotlight and the new Google Drive update. Seems like many users have problems with this update:

     

    I also made one more observation. I have two Google Drive accounts. One via my Google Workspace account (Business) and one via my private Google account (Google One).

    I first thought that Alfred/Spotlight can search my private Google Drive account and only the data from Google Workspace is no longer searchable.

     

    But then I realized that after switching from version 46 to version 47 (of Google Drive) I had two folders of my private Google Drive account on the computer. One of them was not connected to Google Drive and therefore no longer synchronized.

     

    So I deleted the unsynchronized folder. After that, Spotlight/Alfred could no longer find any data. 


    That is, Spotlight only displayed something because of the duplicate folder that was not connected to Google Drive.

    I hope that the people for whom it works, do not run into the exact same error.

     

    P.S. I also informed the Google support about this problem. So far not helpful, they are blaming macOS. But I clarified that with Version 46 everything works fine.

  13. 2 hours ago, alfredpanda said:

    2) It's possible to force index Google Drive by using these instructions, however I believe it will download all files offline. It won't work with "online only" files.

    This would be enough for me for the meantime. But I get an error message when using "mdutil -s" or "mdutil -i on"

     

    This is the error message:

    Error: unknown indexing state.

     

    Any idea?

    After trying as root I get now this error message:

    Error: unable to perform operation.  (-407)
    	Error: unknown indexing state.

     

  14. I'm running in the same error @Michal Bryxí reported here. I did a detailed posting in this thread: 

    After posting there I found this thread which is maybe the better fit. 

    As I understand correctly, Alfred is using the spotlight search index correct? For me, also, spotlight is not finding the files in my Google Drive Folder. I switched from Google File Stream to Google Drive for Desktop. Here is the news from Google regarding this update: Upcoming changes to Google Drive sync clients (support.google.com)

     

    @Michal Bryxí could you explain how you manage it that spotlight is showing you the results? Did you somehow install the old Google File Stream App again?

     

    And how could I add a folder to spotlight to search for files there, like I can do it in Alfred? With a "Finder alias" or a "Symlink" ?

     

    Thanks a lot for your help in advance!

     

     

  15. 15 hours ago, stefano said:

    Since the last update of google drive it seems that is not working anymore.

    any idea?

     

    I have the same problem since the update on Monday morning.

     

    I'm running Alfred 4.3.4 [1229] on MacOS Big Sur (11.3)

     

    The Files which I want to search are offline available in the Google Drive folder, like before. I also moved the Google Drive folder to my user's home directory, to make sure the path /volume/... is not causing this issue.

     

    Now the directory is "~/Google Drive - AufBau

     

    Alfred_Preferences_and_Shared_drives.thumb.png.2064cf55ab7fea670e9203129ea0d044.png

     

    I tried the "File Search Troubleshooting" (Help>Troubleshooting>File Search Troubleshooting) with the following result

     

    Starting Diagnostics...
    
    File: '50_Kunden-Projekte'
    Path: '/Users/henryauffahrt/Google Drive - AufBau/Shared drives'
    
    -----------------------------------------------------------
    
    Check file cache database...
    
     File cache integrity is ok
    
    -----------------------------------------------------------
    
    Check if file is readable...
    
     Alfred has permissions to read this file.
    
    -----------------------------------------------------------
    
    Check if volume '/' is indexed by macOS...
    
     Indexing is enabled on this drive
    
    -----------------------------------------------------------
    
    Check direct file metadata...
    
     Direct metadata available
    
    Display Name: 50_Kunden-Projekte
     Other Names: 
    Content Type: public.folder
       Last Used: 2021-07-20 07:02:23 +0000
    
    -----------------------------------------------------------
    
    Check mdls file metadata...
    
     macOS metadata missing essential items
    
    kMDItemFSContentChangeDate = 2021-07-20 07:02:23 +0000
    kMDItemFSCreationDate      = 1970-01-01 00:00:00 +0000
    kMDItemFSCreatorCode       = ""
    kMDItemFSFinderFlags       = 1024
    kMDItemFSHasCustomIcon     = 1
    kMDItemFSInvisible         = 0
    kMDItemFSIsExtensionHidden = 0
    kMDItemFSIsStationery      = 0
    kMDItemFSLabel             = 0
    kMDItemFSName              = "50_Kunden-Projekte"
    kMDItemFSNodeCount         = 0
    kMDItemFSOwnerGroupID      = 20
    kMDItemFSOwnerUserID       = 501
    kMDItemFSSize              = 0
    kMDItemFSTypeCode          = ""
    
    -----------------------------------------------------------
    
     Troubleshooting failed

     

    What I tried to solve the problem on my own:

    Has anyone an Idea how to solve this problem? Is this a problem we should inform the Google Team about?

     

    It is very annoying since I have ALL my files in this Google Workspace / Google Drive Accounts.

     

    I appreciate any kind of help!

    Henry

×
×
  • Create New...