vitor Posted April 22, 2022 Author Share Posted April 22, 2022 (edited) Updates: Check for Full Disk Access in diagnostics. Changed a few messages. gd can trigger cache rebuild when none exists. Automatic cache builds are turned on by default. Can be turned off by changing the auto_refresh Workflow Environment Variable to 0. This supersedes the previous :gdlaunchd. Edited April 22, 2022 by vitor Link to comment
markus985 Posted April 29, 2022 Share Posted April 29, 2022 Hi there, not a Powerpack user yet, but just learned about the workflow to fix the Google Drive / Stream / Spotlight issue. Will I be able to search folders and open them in Finder? Or will they be opened in Google Drive web? Thanks Markus Link to comment
vitor Posted April 29, 2022 Author Share Posted April 29, 2022 Welcome @markus985, When asking about an existing Workflow, it’s best to use its own thread. Making a new thread, while it seems like it’ll give your problem visibility, fragments the discussion and makes it less likely the author and users of the workflow (the people who can help) will see it. I’ve moved your post into the correct thread. To answer your question, the Workflow does both. By default it opens in the Finder, but you can ⇧↵ to open on the web instead. Link to comment
jgacitua Posted May 6, 2022 Share Posted May 6, 2022 Hi! How can I see the google drive folders on the General Actions? For example to move a file to a GD folder. Link to comment
vitor Posted May 7, 2022 Author Share Posted May 7, 2022 Welcome @jgacitua, A Workflow is needed for Google Drive because Spotlight doesn’t index it, so those directories won’t show up just by typing. But if you start with a / (forward slash) you may be able to navigate into them. Or it there’s a directory you frequently copy into, you can make a Workflow from a File Action Triggers to a Run Script Action with default settings and Script mv "${1}" '/PATH/TO/TARGET/DIRECTORY/HERE' (mind the quotes). Link to comment
jgacitua Posted May 7, 2022 Share Posted May 7, 2022 Thanks @vitor for your quick answer! The workflow you created is really helpful, thank you for your work and putting it out there. Taking it a step further maybe. I wanted to be sure my question was understood. The plan is seeing Google Drive folders on the Universal Actions window, when choosing move to or copy to for example. Is it in your plans to create a workflow for that? Link to comment
vitor Posted May 7, 2022 Author Share Posted May 7, 2022 3 hours ago, jgacitua said: The workflow you created is really helpful, thank you for your work and putting it out there. Thank you for the kind words. 3 hours ago, jgacitua said: I wanted to be sure my question was understood. The plan is seeing Google Drive folders on the Universal Actions window, when choosing move to or copy to for example. Yep, I understood what you meant. My answer still applies. 3 hours ago, jgacitua said: Is it in your plans to create a workflow for that? But your request got me thinking. While a Workflow can’t override those Copy and Move actions (which is by design, and a good thing), we can add new ones geared specifically to move and copy to Google Drive folders. Here’s a version which does just that. I’ve tested it and it seems to be working well, but do you want to give it a spin before I make the release official? jgacitua 1 Link to comment
jgacitua Posted May 9, 2022 Share Posted May 9, 2022 @vitor it seems to be working pretty well! Link to comment
vitor Posted May 9, 2022 Author Share Posted May 9, 2022 @jgacitua Great, thank you for testing! Just made the release official. Link to comment
Lucky Posted May 10, 2022 Share Posted May 10, 2022 (edited) Thanks for this workflow, @vitor! I had been clinging on to my Drive Mirror folder since it was still indexed by Spotlight, but I can now finally consider return to the promised land of File Streaming. For others in a similar situation, it seems the default (or default back then) path for the Google Drive Mirror folder was in /Users/[youruser]/Google Drive (with a space). Although I don't know if changing from Mirror to Stream, which I suspect will change the path to /Volumes/GoogleDrive (since it's the workflow default), would also move or discard the Mirror directory completely. Edited May 10, 2022 by Lucky Link to comment
Henri Posted May 12, 2022 Share Posted May 12, 2022 Hello @vitor, I purchased Alfred just a week or two ago to be able to search through Google Drive. However, I can't get the workflow for Google Drive Search running so far. I am a novice using Alfred. This is my system: See attachment partial screen. And this is the Debugging Info: [14:25:14.063] Google Drive[Script Filter] Script with argv 'factsheet' finished [14:25:14.064] Google Drive[Script Filter] {"items":[{"title":"Build cache","subtitle":"It will take a few minutes to finish, depending on how many files you have.","arg":"build_cache"}]} [14:25:15.937] Google Drive[Script Filter] Processing complete [14:25:15.951] Google Drive[Script Filter] Passing output 'build_cache' to Conditional [14:25:15.952] Google Drive[Conditional] Processing complete [14:25:15.953] Google Drive[Conditional] Passing output 'build_cache' to Run Script [14:25:15.953] Google Drive[Run Script] Processing complete [14:25:15.954] Google Drive[Run Script] Passing output '' to Run Script [14:25:16.266] ERROR: Google Drive[Run Script] Google Drive path does not exist! [14:25:16.267] Google Drive[Run Script] Processing complete [14:25:16.284] Google Drive[Run Script] Passing output 'PATH_ERROR' to Run Script [14:25:16.285] Google Drive[Run Script] Passing output 'PATH_ERROR' to Conditional [14:25:16.286] Google Drive[Conditional] Processing complete [14:25:16.287] Google Drive[Conditional] Passing output 'PATH_ERROR' to Post Notification [14:25:16.287] Google Drive[Post Notification] Processing complete [14:25:16.288] Google Drive[Post Notification] Passing output 'PATH_ERROR' to Play Sound Obviously the path to Google Drive has not been setup correctly or the user rights are not up to par. H-Mbp20 /Volumes % ls GoogleDrive-107294463187826979929 Macintosh HD H-Mbp20 /Volumes % cd GoogleDrive-107294463187826979929 hvc@Henks-Mbp20 GoogleDrive-107294463187826979929 % ls ls: .: Operation not permitted Could you please help me out? Best regards, H Link to comment
vitor Posted May 12, 2022 Author Share Posted May 12, 2022 Welcome @Henri, Please see the second post on this thread. It teaches you how to properly set the correct Google Drive path and how to provide the necessary information for debugging (I need the output of !gddiagnostic). 8 minutes ago, Henri said: hvc@Henks-Mbp20 GoogleDrive-107294463187826979929 % ls ls: .: Operation not permitted You probably haven’t given your Terminal Full Disk Access, under System Preferences → Security & Privacy → Privacy → Full Disk Access. Alfred will need it too, to access the directory. Link to comment
Oli Posted May 13, 2022 Share Posted May 13, 2022 Hi there! I seem to be getting a sync of my personal drive, but not my shared drives - is this to be expected/normal behaviour, or is something not working right? The shared drives are available locally, and my Google drive location is set to the parent folder which contains my personal drive and shared drives. Link to comment
vitor Posted May 13, 2022 Author Share Posted May 13, 2022 Welcome @Oli, Set the google_drive_path Workflow Environment Variable to whichever path contains your drives. The top post details it and the second one expands on it. Link to comment
hb1 Posted May 17, 2022 Share Posted May 17, 2022 Still love this workflow, unfortunately, it stopped working for me recently. Tried a couple of different drive paths from the original (including another drive account) and did the usual (restart Google Drive), unfortunately nothing worked. Please let me know if you need any other information than the below. Hi, Holden. ### Workflow version 2022.11 ### Alfred version 4.6.5 ### macOS version 12.3.1 ### Architecture i386 ### Workflow environment variables Dict { ignore_list = result_limit = 50 auto_refresh = 1 google_drive_path = /Volumes/GoogleDrive } ### Full Disk Access Granted ### Google drive paths Exists: /Volumes/GoogleDrive 47033 paths ### Cache dir cache.db ### Cache file 16777221 71658950 -rw-r--r-- 1 holden staff 0 10579968 "May 17 15:28:50 2022" "May 17 15:28:46 2022" "May 17 15:28:46 2022" "May 17 15:26:26 2022" 4096 22656 0 /Users/holden/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 Link to comment
vitor Posted May 17, 2022 Author Share Posted May 17, 2022 1 minute ago, hb1 said: it stopped working What exactly does that mean? What are you doing and what is happening (including debugger output)? Link to comment
hb1 Posted May 17, 2022 Share Posted May 17, 2022 49 minutes ago, vitor said: What exactly does that mean? What are you doing and what is happening (including debugger output)? Nothing is returning in the UI. Looking at the debugger, it appears it is finding the files? (I am just copying a snippet here because the log is very long) [16:30:08.144] Google Drive[Script Filter] Queuing argument 'commerce plan' [16:30:08.279] Google Drive[Script Filter] Queuing argument 'commerce plann' [16:30:08.481] Google Drive[Script Filter] Script with argv 'commerce plann' finished [16:30:08.481] Google Drive[Script Filter] Hi, Holden. {"items":[{"uid":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","type":"file","title":"Commerce Planning v2.key","subtitle":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","icon":{"path":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","type":"fileicon"},"arg":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key"}, In the middle of it it does return this error, [16:30:08.496] ERROR: Google Drive[Script Filter] JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0. in JSON: Hi, Holden. and then continues with a list {"items":[{"uid":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","type":"file","title":"Commerce Planning v2.key","subtitle":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","icon":{"path":"/Volumes/GoogleDrive/My Drive/Working/Commerce Planning v2.key","type":"fileicon"} Link to comment
vitor Posted May 17, 2022 Author Share Posted May 17, 2022 Start by running :gdrebuildcache and wait for the notification saying it’s done. If that doesn’t fix it, I’ll need a video or it happening with the debugger open. Link to comment
hb1 Posted May 18, 2022 Share Posted May 18, 2022 22 hours ago, vitor said: Start by running :gdrebuildcache and wait for the notification saying it’s done. If that doesn’t fix it, I’ll need a video or it happening with the debugger open. Uploaded a video here: https://vimeo.com/711367672 This was after a cache rebuild (I hovered over the notification). Link to comment
vitor Posted May 19, 2022 Author Share Posted May 19, 2022 Wait, “Hi, Holden.” is really part of the output? That is really weird. Does that mean anything to you? Do you have any file or folder with that in the name? Link to comment
hb1 Posted May 19, 2022 Share Posted May 19, 2022 10 hours ago, vitor said: Wait, “Hi, Holden.” is really part of the output? That is really weird. Does that mean anything to you? Do you have any file or folder with that in the name? Ah, yeah - that’s just a zsh profile setting I did a couple years ago to have terminal greet me when I open it. Link to comment
vitor Posted May 19, 2022 Author Share Posted May 19, 2022 11 minutes ago, hb1 said: that’s just a zsh profile setting It’s what’s messing the output. In which file did you set it up, and what’s the code? Link to comment
hb1 Posted May 19, 2022 Share Posted May 19, 2022 58 minutes ago, vitor said: It’s what’s messing the output. In which file did you set it up, and what’s the code? Ah, it been set like what for a while and the workflow was fine. Do you need me to change/delete it for the debugger output? It's just .zshrc and .bash_profile in zhsrc to customize the shell prompt export PS1=">> " and in .bash_profile echo "Hi, Holden." export PATH=$PATH:/Users/holden/.npm-packages/bin Link to comment
vitor Posted May 19, 2022 Author Share Posted May 19, 2022 3 hours ago, hb1 said: Do you need me to change/delete it for the debugger output? If you delete it, the Workflow will likely start working again. But try just rebooting, first. Please let me know the results, because even if it’s fixed by rebooting or removing, it’ll be a clue. Link to comment
jgacitua Posted May 23, 2022 Share Posted May 23, 2022 @vitor when I move files using the new universal actions functionality, it seems to act as a "copy" instead of a "move". The original files are still there in the initial location. Does that reproduce on your end 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