Jump to content

Alfred cannot find Google Drive files in folders Shared with me and added as a shortcut to My Drive


Recommended Posts

Hi,

 

Thanks again for Alfred. I won't repeat my previous post but here is another problem related to remote storage.

 

I have an up-to-date Google Drive app, an account that was switched to the File Provider API (Google Drive stores data in `~/Library/CloudStorage/`) and `~/Library/CloudStorage/` is added to Alfred search path.

 

I can find files from My Drive mirrored to my computer (of course: those are just regular files).

 

When a folder is shared with me through Google Drive and I add it to My Drive, it shows as an alias in My Drive. The alias points to `~/Library/CloudStorage/GoogleDrive-myemail@gmail.com/.shortcut-targets-by-id/something-something` so it is in Alfred' search path.

 

When such a folder is streamed (i.e dynamically fetched from the server), as shown by the cloud icon next to file names

image.thumb.png.295c569c0b1eb9e50ba22e393af9197f.png

 

Spotlight finds the file but shows it with the Google Drive icon, not the expected (PDF in this case) icon. But Alfred does not display anything:

image.thumb.png.43019552b09a8e6663a8fa0879e8735d.png

 

image.thumb.png.01821e7b3a0b3abae583fbf1f3100bbe.png

 

And the troubleshooting output is

Starting Diagnostics...

File: 'MSCA_DN_Handbook_2022_final_.pdf'
Path: '/Users/jiho/Library/CloudStorage/GoogleDrive-myemail@gmail.com/.shortcut-targets-by-id/1D8UL4F_CKgMQtuKagU5E4AlODJPjylZH/ML4Plankton_2022_shared'

-----------------------------------------------------------

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: MSCA_DN_Handbook_2022_final_.pdf
 Other Names: 
Content Type: com.adobe.pdf
   Last Used: 2022-09-26 08:36:22 +0000

-----------------------------------------------------------

Check mdls file metadata...

 macOS metadata missing essential items

kMDItemFSContentChangeDate = 2022-09-26 08:36:22 +0000
kMDItemFSCreationDate      = 2022-09-27 18:50:35 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "MSCA_DN_Handbook_2022_final_.pdf"
kMDItemFSNodeCount         = 1337947
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 1337947
kMDItemFSTypeCode          = ""

-----------------------------------------------------------

 Troubleshooting failed

 

(Although I am not sure how relevant this is, since starting the troubleshooting possibly triggers the download of the file.)

 

 

Even when the files are synchronised to my computer, as shown by the lack of cloud icon and the green tick instead

image.thumb.png.fcd84488ac3ed0ad34da1e7e3ac8f45d.png

the behaviour is the same (surprisingly: I would have at least expected Spotlight to show the correct icon for the file):

1363577459_Screenshot2022-10-09at00_01_40.thumb.png.f3e7506061e779900c9b026681f541e4.png

76754693_Screenshot2022-10-09at00_01_47.thumb.png.8aba24e92a309152b51be6eb4ce9ef4f.png

 

And the file troubleshooting output is:

Starting Diagnostics...

File: '6_mesocosms.png'
Path: '/Users/jiho/Library/CloudStorage/GoogleDrive-myemail@gmail.com/.shortcut-targets-by-id/1ckL9_Xr8t1mtpSypdjIbgKgSZKrjTUn7/dessins'

-----------------------------------------------------------

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: 6_mesocosms.png
 Other Names: 
Content Type: public.png
   Last Used: 2020-01-29 14:23:19 +0000

-----------------------------------------------------------

Check mdls file metadata...

 macOS metadata missing essential items

kMDItemFSContentChangeDate = 2020-01-29 14:23:19 +0000
kMDItemFSCreationDate      = 2020-01-29 14:20:41 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "6_mesocosms.png"
kMDItemFSNodeCount         = 24215027
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 24215027
kMDItemFSTypeCode          = ""

-----------------------------------------------------------

 Troubleshooting failed

 

So my questions are:

- do you know why synchronised files are not treated as the ones in My Drive and seen as local files?

- how can I make Alfred aware of these files that Spotlight displays with a Google Drive icon?

 

Thanks in advance!

 

Edited by jiho
Remove extra attachments
Link to comment

Hi vitor,

 

Thanks, I knew about this. Now, however, Google Drive is transitioning to the File Provider API (my account has recently been switched) and this allows Spotlight to find the files with no extra trick (although the results look strange, as explained above). My question here is how to get the same results in Alfred, which uses the Spotlight index.

 

But thanks again anyhow.

Link to comment
1 hour ago, jiho said:

this allows Spotlight to find the files with no extra trick (although the results look strange, as explained above)

 

The strange results are what makes the extra trick still necessary. Google is using a special API to make the results show up in Spotlight, they’re not exactly indexed, which why they’re also slower to show up.

Link to comment
  • 2 weeks later...
21 minutes ago, brank87 said:

Having the same issue. Google Drives are already indexed by Spotlight, but not by Alfred. 

 

Google Drive isn't really indexed by macOS, it uses a different mechanism / workaround to return results to macOS. 

 

This is why we recommend the Google Drive workflow, as it continues to work reliably, regardless of what shenanigans Google get up to when releasing new versions of Google Drive :) 

 

 

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