vitor Posted February 10, 2023 Author Share Posted February 10, 2023 (edited) What exactly do you get in the debugger when running :gdrebuildcache? And what do you get if you run find "GOOGLE DRIVE PATH HERE" | wc -l | tr -d ' \n' in a Terminal? Edited February 10, 2023 by vitor Link to comment
FlowVideo Posted February 12, 2023 Share Posted February 12, 2023 Help! Alfred 5 won't rebuild cache on my Google Drive anymore, and when I search for items in there no thumbnails and I can't click on anything. Can't run :gdrebuildcache as it just says "Be Patient!" When I run !gddiagnostic, I get nothing copied to my clipboard. Screenshot of my device attached, running MacOS 13.1 (22C65) Link to comment
vitor Posted February 12, 2023 Author Share Posted February 12, 2023 Welcome @FlowVideo, first make sure you’re on the right version. Then make sure your Google Drive really is pointing at the right place, because Google has been changing that. Then restart and try the diagnostic command gain, and be patient with it. How many files do you have in Google Drive? Alternatively, you may now be able to access the Google Drive files without the workflow, so try that too. Link to comment
FlowVideo Posted February 12, 2023 Share Posted February 12, 2023 I turned on my computer from sleep and saw about 5 dialog boxes showing me that the diagnostics had been copied to the clipboard (many hours later), and apparently also the gd cache had rebuilt since I'm now able to use it again! Below I paste the diagnostics: ### Workflow version 2022.23 ### Alfred version 5.0.6 ### macOS version 13.1 ### Architecture i386 ### Preferences Dict { google_drive_path = ~/Library/CloudStorage/*****@*****.tld/My Drive } ### Full Disk Access Granted ### Google drive path Exists: /Users/justinwedes/Library/CloudStorage/*****@*****.tld/My Drive 261327 paths ### Cache dir Files NOT present ### Cache file Does NOT exist ### Temporary cache Does NOT exist ### Build progress NOT running ### Launchd job Loaded: - 0 com.alfredapp.vitor.googledrive Installed Link to comment
dam75 Posted February 13, 2023 Share Posted February 13, 2023 On 2/10/2023 at 6:52 PM, vitor said: What exactly do you get in the debugger when running :gdrebuildcache? And what do you get if you run find "GOOGLE DRIVE PATH HERE" | wc -l | tr -d ' \n' in a Terminal? Hi @vitor debugger output of :gdrebuildcache: [10:35:31.289] Logging Started... [10:35:36.786] Google Drive[Keyword] Processing complete [10:35:36.789] Google Drive[Keyword] Passing output '' to Run Script [10:35:36.869] Google Drive[Run Script] Processing complete [10:35:36.874] Google Drive[Run Script] Passing output '' to Run Script And the find command never responds (until I ^C it), which is the reason why I removed it from the !gddiagnostics script ^^ IMHO, the problem is not on your side, but on Google one : their new way to store files may be buggy? To be noticed : I have a huge drive (more than 200TB of files, with a lot of small files shared to me ... could it be that I reached an hidden limitation? Seems that @FlowVideo has got the exact same problem, as the symptoms are very similar. I wish I could go back to an older version of GDrive 🙄 Thanks a lot for your time! Link to comment
vitor Posted February 13, 2023 Author Share Posted February 13, 2023 3 hours ago, dam75 said: To be noticed : I have a huge drive (more than 200TB of files, with a lot of small files shared to me ... could it be that I reached an hidden limitation? If you have deep nesting, you may have reached the maximum path length. But it seems more likely that the command hasn’t stalled, it’s just taking a long time because you have so many files. Try with the regular indexing, without the workflow. Link to comment
dam75 Posted February 14, 2023 Share Posted February 14, 2023 On 2/13/2023 at 2:27 PM, vitor said: If you have deep nesting, you may have reached the maximum path length. But it seems more likely that the command hasn’t stalled, it’s just taking a long time because you have so many files. Maybe, but the weird thing is that with the old version of Google Drive, it worked perfectly ... and I prefer a lot your workflow to the native search ^^ Anyway, many thanks for your work and your time, it's precious! vitor 1 Link to comment
vitor Posted February 25, 2023 Author Share Posted February 25, 2023 Updated to 2023.4.Removed keyword to force rebuild cache. Now available with fn↩Fixed paths in diagnostic.Made launchd agent self-clean when trigger not found. To get this if you already have the workflow:Disable Periodic Refresh in configuration.Save.Use the workflow to open a file or reveal it in Finder.Enable Periodic Refresh.Save.Note the above is not a requirement. The old agent was already pretty efficient so even leaving it there won’t make a noticeable difference. Link to comment
attaboyBrad Posted February 27, 2023 Share Posted February 27, 2023 On 2/24/2023 at 4:09 PM, vitor said: Removed keyword to force rebuild cache. Now available with fn↩ In case anybody else is confused, it's necessary to enter a query or partial query after the keyword before invoking this command. For instance, 'gd [something]' and then pressing fn+↩ will work. If you don't type something after 'gd', nothing will happen when you press fn+↩. Maybe this will be obvious to others, but it wasn't for me. Link to comment
jlgtx Posted March 29, 2023 Share Posted March 29, 2023 (edited) I'm trying to get Google Drive indexing to work for me. I'm on macOS 13.3. Example case: I have thousands of song files in various formats (text, PDF, PowerPoint, etc.) in a folder structure. If I do a Spotlight search on a local copy of that folder structure for a word, let's say "wondrous," I get 185 hits from filenames and file contents. If I do a Spotlight search on that same folder structure in the Google Drive folder, I get zero hits -- even though that folder is tagged as "available offline" in Google Drive settings. If I login to Google Drive in a web browser and do the same search, I get 112 hits. If I use "gd wondrous" in Alfred (5.0.6 with Google Drive workflow v2023.6), I get 20 hits. ### Workflow version 2023.6 ### Alfred version 5.0.6 ### macOS version 13.3 ### Architecture arm64 ### Preferences Dict { google_drive_path = ~/Library/CloudStorage/GoogleDrive-jon@cardioquip.com } ### Full Disk Access Granted ### Google drive path Exists: /Users/jon/Library/CloudStorage/GoogleDrive-jon@cardioquip.com 165764 paths ### Cache dir cache.db ### Cache file 16777232 183443887 -rw-r--r-- 1 jon staff 0 42512384 "Mar 29 13:29:28 2023" "Mar 29 13:28:07 2023" "Mar 29 13:28:07 2023" "Mar 29 13:26:53 2023" 4096 84008 0 /Users/jon/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.googledrive/cache.db ### Temporary cache Does NOT exist ### Build progress NOT running ### Launchd job Loaded: - 0 com.alfredapp.vitor.googledrive Installed Edited March 29, 2023 by jlgtx Link to comment
vitor Posted March 30, 2023 Author Share Posted March 30, 2023 @jlgtx The workflow only indexes the names if files, not the contents. That would lead to an enormous cache. To have them be indexed by Spotlight (and thus Alfred’s regular search), it depends on your version of Google Drive and a bit of luck. See the first paragraph in the second post. Link to comment
vquest Posted April 10, 2023 Share Posted April 10, 2023 Excellent and very useful workflow. Thank you. I've set it to a Photo management app that I use called Stockpile so that I can search for photos inside the app (it works with Apple Photos too, but because Photos gives them numbered titles it's impossible to know what to search for). I'm wondering if there's a way to create further search options that go beyond just the name of the file? I've been learning the terminal and unix commands and looking into how to write scripts, but it's beyond me for now. I'd like to be able to search by User Tag as well as by title if that's possible. Link to comment
jgla Posted April 21, 2023 Share Posted April 21, 2023 This started with my new mac, I am on v2023.4, some files are simply not found, and also sometimes when found hitting return will not open them. I tried to rebuild the cache and nothing happens. Any help appreciated. On 13.2.1 on Apple M2 Max. running !gddiagnostic which says the results will be copied to the clipboard doesn't seem to do anything. Thanks. Link to comment
vitor Posted April 21, 2023 Author Share Posted April 21, 2023 1 minute ago, jgla said: running !gddiagnostic which says the results will be copied to the clipboard doesn't seem to do anything. It copies information to your clipboard. Paste it here. Without that information it is impossible to proceed. If nothing is copied, check the debugger. But before all that, update the workflow. You’re two versions behind. Link to comment
vitor Posted April 21, 2023 Author Share Posted April 21, 2023 In Alfred Preferences: right-click → Update from Alfred Gallery. Or reinstall from the page. Link to comment
jgla Posted April 22, 2023 Share Posted April 22, 2023 I updated the workflow, here is the diagnostic (it worked now), but search issue unresolved Link to comment
Stephen_C Posted April 22, 2023 Share Posted April 22, 2023 (edited) The significant problem appears to be that you've not given Alfred permission to use full disk access (System Settings → Privacy & Security then click on Full Disk Access). Edit: Go to Alfred Preferences → General and click on Request Permissions…. Stephen Edited April 22, 2023 by Stephen_C vitor 1 Link to comment
jgla Posted April 22, 2023 Share Posted April 22, 2023 In the new version of ventura, it seems that is handled differently, nothing on my machine is granted full disk access (not google drive which is working fine), can you confirm that with Ventura I need to give full disk access Link to comment
Stephen_C Posted April 22, 2023 Share Posted April 22, 2023 For Alfred, yes. I've no idea about Google Drive as I try to stay as far away as possible from anything Google. 😀 Stephen vitor 1 Link to comment
jgla Posted April 24, 2023 Share Posted April 24, 2023 I gave full access. Quit alfred, restarted the machine. Nothing different. Does not find certain files in google, and I cannot force a cache rebuild. Here is diagnostic. Link to comment
vitor Posted April 24, 2023 Author Share Posted April 24, 2023 51 minutes ago, jgla said: and I cannot force a cache rebuild. Why not? Link to comment
vitor Posted April 25, 2023 Author Share Posted April 25, 2023 You have to start a search and force a rebuild when seeing results. Then you have to wait, because rebuilds take a while, depending on how many files you have. Link to comment
jgla Posted April 26, 2023 Share Posted April 26, 2023 can you give me a screenshot I how its done, maybe I am just doing it wrong. Would I get any feedback that the cache is being rebuilt if it is in fact rebuilding? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now