Jump to content

Google Drive — List File Stream contents from Google Drive


Recommended Posts

Thanks for the quick reply:

 

"ls /Volumes/GoogleDrive" results in:

 

My Drive      Shared drives

 

If I do "find" in terminal the list the entire drive contents, all goes well (thousands of files displayed) until the end:

 

/Volumes/GoogleDrive/.TemporaryItems
find: /Volumes/GoogleDrive/.TemporaryItems: Operation not permitted
/Volumes/GoogleDrive/.Trashes
find: /Volumes/GoogleDrive/.Trashes: Operation not permitted
/Volumes/GoogleDrive/.VolumeIcon.icns

 

Diagnostics output:

 

### Workflow version
2022.9

### Alfred version
4.6.3

### macOS version
12.2.1

### Architecture
i386
### Workflow environment variables
Dict {
    ignore_list = 
    result_limit = 50
    google_drive_path = /Volumes/GoogleDrive
}

### Google drive paths
Exists: /Volumes/GoogleDrive
1 paths

### Cache dir
cache.db

### Cache file
16777225 55944101 -rw-r--r-- 1 jheathco staff 0 8192 "Mar 22 12:01:54 2022" "Mar 22 12:01:54 2022" "Mar 22 12:01:54 2022" "Mar 22 12:01:54 2022" 4096 16 0 /Users/jheathco/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.launchd.googledrivecache
Installed

 

Link to comment

Rebuild cache returns immediately saying cache rebuilt, but nothing indexed...

 

### Workflow version

2022.9

 

### Alfred version

4.6.3

 

### macOS version

12.2.1

 

### Architecture

i386

### Workflow environment variables

Dict {

    ignore_list =

    result_limit = 50

    google_drive_path = /Volumes/GoogleDrive/My Drive

}

 

### Google drive paths

Exists: /Volumes/GoogleDrive/My Drive

1 paths

 

### Cache dir

cache.db

 

### Cache file

16777225 55969261 -rw-r--r-- 1 jheathco staff 0 8192 "Mar 22 17:15:30 2022" "Mar 22 17:15:30 2022" "Mar 22 17:15:30 2022" "Mar 22 17:15:30 2022" 4096 16 0 /Users/jheathco/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.launchd.googledrivecache

Installed

Edited by John H
Link to comment

As far as the system can see, there are no paths in that directory. If you do ls -R /Volumes/GoogleDrive, you’ll only find the top directories. Are you sure you can see the files in the Finder? That looks something exclusive to your Google Drive setup. You’ll have to figure out what is different/wrong with it.

Link to comment
Just now, John H said:

ls -R in /Volumes/GoogleDrive works fine and dumps thousands of listings

 

Change google_drive_path back to /Volumes/GoogleDrive and run diagnostics again.

 

But first, is Alfred listed and selected in System Preferences → Security & Privacy → Privacy → Full Disk Access?

Link to comment
Posted (edited)
17 hours ago, John H said:

Making an assumption you speak Portuguese

 

I do, yes, though that expression is Brazilian and I’m Portuguese. We would say “És o maior!” (literally “you’re the biggest”).

 

17 hours ago, John H said:

it's chugging along now.

 

Great! The clue was that ls worked for you in a Terminal but the diagnostics wasn’t finding any paths. This is a good example of why it’s useful to always send it.

Edited by vitor
Link to comment

I use the Google Drive workflow (List File Stream contents from Google Drive) and it works great.  There is an environment variable to identify the Google Drive path.  I have two Macs, one for work and one for personal, that I use Alfred on and I sync the preferences between them.  Unfortunately, in the sync process, the environment variables get overridden from my other computer and therefore the workflow fails until I change the path to the correct path which then causes the workflow on the other Mac to fail.  Is it possible to eliminate the syncing for this workflow?  Do I need to turn off preference syncing and turn it back on when I make other preference changes?  Any thoughts or suggestions would be appreciated.

Link to comment
Posted (edited)

Welcome @jcarrolo,

 

4 hours ago, jcarrolo said:

Is it possible to eliminate the syncing for this workflow?

 

No, you cannot do it on a per-Workflow basis.

 

4 hours ago, jcarrolo said:

Do I need to turn off preference syncing and turn it back on when I make other preference changes?

 

That’s one option, but there may be better ones. What exactly are the paths you use on each machine?

Edited by vitor
Link to comment

Thanks for the reply.  Here are the paths that I use:

 

Mac 1

/Volumes/GoogleDrive-112737553631035858984

/Volumes/GoogleDrive-103236156896470715725

 

Mac 2

/Volumes/GoogleDrive

 

Also, not sure if this is relevant but /Volumes/GoogleDrive-112737553631035858984 on Mac 1 is the same Google Drive account as /Volumes/GoogleDrive on Drive 2 but obviously is named differently because I have two accounts on that computer.

 

Obrigado

Link to comment

@jcarrolo It is possible to modify the Workflow to fit your use-case, but that requires removing checks which are important for diagnostics. As such, and because your case is so far unique, I can instead give you instructions on how to modify it just enough for your particular situation. Private message incoming.

Link to comment
21 hours ago, vitor said:

Welcome @onemanrock,

 

 

I can try, but you need to provide the required information and tell me exactly what is wrong. You haven’t described any issue.

Hi Vitor, 

 

Many thanks for your reply.

I apologize for not having followed the rules correctly, and I attach the log below:

 

### Workflow version
2022.9

### Alfred version
4.6.4

### macOS version
12.3

### Architecture
arm64
### Workflow environment variables
Dict {
    ignore_list = 
    result_limit = 50
    google_drive_path = /Volumes/GoogleDrive
}

### Google drive paths
Exists: /Volumes/GoogleDrive
21315 paths

### Cache dir
cache.db

### Cache file
16777233 22685337 -rw-r--r-- 1 giuseppe staff 0 3477504 "Mar 23 18:12:31 2022" "Mar 23 18:12:31 2022" "Mar 23 18:12:31 2022" "Mar 23 18:12:05 2022" 4096 8320 0 /Users/giuseppe/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/cache.db

### Temporary cache
Does NOT exist

### Build progress
NOT running

### Launchd job
NOT loaded
NOT installed

 

 

I did run the :gdlaunchd.

 

Any help would be immensely great.

 

Thanks,

Joe

Link to comment
15 hours ago, vitor said:

 

Do it again, with the debugger open, and post the output.

[08:46:00.597] Logging Started...

[08:46:34.860] Google Drive[Script Filter] Queuing argument ''

[08:46:34.944] Google Drive[Script Filter] Script with argv '' finished

[08:46:34.949] Google Drive[Script Filter] {"items": [

      {

        "title": "Install Google Drive launchd service",

        "subtitle": "Periodically rebuilds the cache",

        "arg": "install"

      },

    ]}

[08:46:36.376] Google Drive[Script Filter] Processing complete

[08:46:36.377] Google Drive[Script Filter] Passing output 'install' to Run Script

[08:46:36.649] Google Drive[External] Processing complete

[08:46:36.652] Google Drive[External] Passing output '' to Delay

[08:46:47.659] Google Drive[Delay] Processing complete

[08:46:47.665] Google Drive[Delay] Passing output '' to Arg and Vars

[08:46:47.666] Google Drive[Arg and Vars] Processing complete

[08:46:47.666] Google Drive[Arg and Vars] Passing output '' to Run Script

Link to comment
11 minutes ago, vitor said:

@onemanrock Can you search now? If not, I’ll need the diagnostics again.

I can't search.

 

Attached the diagnostic running :gdlaunchd again:

 

[12:08:50.665] Logging Started...

[12:09:20.500] Google Drive[Script Filter] Queuing argument ''

[12:09:20.523] Google Drive[Script Filter] Script with argv '' finished

[12:09:20.526] Google Drive[Script Filter] {"items": [

      {

        "title": "Remove Google Drive launchd service",

        "subtitle": "Stops periodically rebuilding the cache",

    "arg": "uninstall"

      }

    ]}

[12:09:21.601] Google Drive[Script Filter] Processing complete

[12:09:21.602] Google Drive[Script Filter] Passing output 'uninstall' to Run Script

 

Link to comment
Posted (edited)

That’s the debugger, not the diagnostic (!gddiagnostic). But now you’ve disabled :gdlaunchd, so you’ll have to enable it again and wait for the cache to be rebuilt.

 

I just reread your previous posts. What exactly do you mean when you say you “can’t search”? What are you doing to search for files? What exactly are you typing into Alfred?

Edited by vitor
Link to comment
2 hours ago, vitor said:

That’s the debugger, not the diagnostic (!gddiagnostic). But now you’ve disabled :gdlaunchd, so you’ll have to enable it again and wait for the cache to be rebuilt.

 

I just reread your previous posts. What exactly do you mean when you say you “can’t search”? What are you doing to search for files? What exactly are you typing into Alfred?

 

Ok, I run :gdlaunchd again now.

 

Seems like I can search 1 of the 3 gdrives that I have running.

 

Is possible to search all 3?

 

I'm typin gd .....

 

thanks

 

 

Link to comment

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