alfredapp / google-drive-workflow

Alfred Workflow for Google Drive
BSD 3-Clause "New" or "Revised" License
168 stars 8 forks source link

1 day after installing I still see cache being built #15

Closed zaks closed 2 years ago

zaks commented 2 years ago

Workflow version

2021.12

Alfred version

4.6.1

macOS version

12.1

Debugger output

I get no output.

More details

I installed the worklow and run the :gdlaunchd action.

vitorgalvao commented 2 years ago

What do you get exactly, when running gd? A screenshot is fine.

Also what’s the output, in a terminal, of:

ls "${HOME}/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive"
zaks commented 2 years ago

Hi Vitor,

Thanks for coming back to me!

I attached the screenshot. ls output below:

% ls -l "${HOME}/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive" total 16 -rw-r--r-- 1 slawomirzak staff 8192 Jan 12 17:10 tmp.db

Thank you, Slawek

On Sat, Jan 15, 2022 at 7:58 PM Vítor Galvão @.***> wrote:

What do you get exactly, when running gd? A screenshot is fine.

Also what’s the output, in a terminal https://support.apple.com/en-gb/guide/terminal/apd5265185d-f365-44cb-8b09-71a0, of:

ls "${HOME}/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive"

— Reply to this email directly, view it on GitHub https://github.com/alfredapp/google-drive-workflow/issues/15#issuecomment-1013736157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALBECK72G3SKF5465GQKK3UWG7WDANCNFSM5L3LRJMQ . You are receiving this because you authored the thread.Message ID: @.***>

vitorgalvao commented 2 years ago

A likely cause of the issue is an interrupted cache build. Did you restart or shutdown your Mac midway?

Make sure you’re on version 2022.1, then restart your Mac, then run the following in a terminal:

osascript -e 'tell application id "com.runningwithcrayons.Alfred" to run trigger "googledrivelaunchd" in workflow "com.alfredapp.googledrive" with argument "uninstall"'
osascript -e 'tell application id "com.runningwithcrayons.Alfred" to run trigger "googledrivelaunchd" in workflow "com.alfredapp.googledrive" with argument "install"'

Make sure you have Alfred’s debugger open before doing so, and report back what it says.

vitorgalvao commented 2 years ago

I’ve released a bunch of updates in the meantime and added a new diagnostics command. Please update to the newest version, and if you still have a problem open a new issue and follow the new instructions.

zaks commented 2 years ago

Hi Vitor,

Thanks for the new version. The workflow behaves differently, but still not in a way I would expect it to.

No after running glaunchd to remove the cache bulder and again to install it, the cache got built very quick, but there is output.

Literally an attempt to search in the drive gets me a message saying "No cache found!". I see, that there is a tmp.db file in the directory you asked about above, but nothing else. The drive directory is in place and accessible.

I pasted the diagnostic output below. Hope this helps. Thanks!

Workflow version

2022.4

Alfred version

4.6.1

macOS version

12.1

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

tmp.db

Cache file

Does NOT exist

Temporary cache

16777234 11815756 -rw-r--r-- 1 slawomirzak staff 0 8192 "Jan 17 17:43:19 2022" "Jan 17 17:43:19 2022" "Jan 17 17:43:19 2022" "Jan 17 17:43:19 2022" 4096 16 0 /Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db

Build progress

NOT running

Launchd job

Loaded: - 0 com.alfredapp.launchd.googledrivecache Installed

vitorgalvao commented 2 years ago

Exists: /Volumes/GoogleDrive/My Drive 1 paths

That looks almost empty. Are you sure that’s the correct directory of your Google Drive?

zaks commented 2 years ago

Hi Vitor,

Oh yes - I am very sure. A lot of files and directories under that path.

% find "/Volumes/GoogleDrive/My Drive" | wc -l 140

Additional data point - I have restarted the computer and Alfred tells me, that cache rebuild is in progress for a long time now, so back to square one it seems. New diagnostics below.

Cheers, Slawek

Workflow version

2022.4

Alfred version

4.6.1

macOS version

12.1

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

tmp.db

Cache file

Does NOT exist

Temporary cache

16777234 11853590 -rw-r--r-- 1 slawomirzak staff 0 8192 "Jan 17 20:00:06 2022" "Jan 17 20:00:06 2022" "Jan 17 20:00:06 2022" "Jan 17 20:00:06 2022" 4096 16 0 /Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db

Build progress

NOT running

Launchd job

Loaded: - 0 com.alfredapp.launchd.googledrivecache Installed

vitorgalvao commented 2 years ago

% find "/Volumes/GoogleDrive/My Drive" | wc -l 140

See, that’s particularly weird because the diagnostic uses that command and is giving a different result. Also, it’s not giving the total size.

Have you edited the pasted text in any way? If not, run it with the debugger open and post what’s there.

Also, what’s the result of:

ps A | grep Alfred
stat '/Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db'
sleep 5
stat '/Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db'
vitorgalvao commented 2 years ago

Feeling confident I found and resolved the issue. Download 2022.5.

zaks commented 2 years ago

Thanks Vitor. I think there is still something missing. I get "cache rebuilt" message after running the gdcacherebuild, but there is no cache and still tmp.db file in the directory. Upgraded to 2022.6!

Diags at the bottom. As for the ones you requested previously - I did not edit anything. Command output below.

% ps A | grep Alfred

1479 ?? S 1:16.15 /Applications/Alfred 4.app/Contents/MacOS/Alfred 14542 ?? S 0:01.37 /Applications/Alfred 4.app/Contents/Preferences/Alfred Preferences.app/Contents/MacOS/Alfred Preferences /Users/slawomirzak/Downloads/Google.Drive-3.alfredworkflow

% stat '/Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db'

16777234 12107854 -rw-r--r-- 1 slawomirzak staff 0 8192 "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" 4096 16 0 /Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db % sleep 5 % stat '/Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db'

16777234 12107854 -rw-r--r-- 1 slawomirzak staff 0 8192 "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" 4096 16 0 /Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db

Workflow version

2022.6

Alfred version

4.6.1

macOS version

12.1

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

tmp.db

Cache file

Does NOT exist

Temporary cache

16777234 12107854 -rw-r--r-- 1 slawomirzak staff 0 8192 "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" "Jan 19 20:53:53 2022" 4096 16 0 /Users/slawomirzak/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.googledrive/tmp.db

Build progress

NOT running

Launchd job

Loaded: - 0 com.alfredapp.launchd.googledrivecache Installed

vitorgalvao commented 2 years ago

Exists: /Volumes/GoogleDrive/My Drive 1 paths

This continues to be the problem. You’ll have to figure out why macOS can’t find the paths in that directory. You’re the only one experiencing this so it has to be something odd in your setup.

zaks commented 2 years ago

Hi Vitor,

Indeed - it seems, that the full disk access was not granted to Alfred. Now It works just fine.

Thank you very much!