Jump to content

Alfred stopped finding files on Google Drive File Stream


Recommended Posts

I use Google Drive File Stream at work so sync files between my Mac and Google drive and I used to be able to [spacebar]file_name and anything with that name would come up. That's no longer the case and Alfred is only finding local files. At first I thought maybe the files on the Google Drive folder needed to be available offline but that didn't work either. And yes, I have added Google Drive to the search scope.

 

 

Has anybody run into this problem? Did anything chance with either Alfred or Google Drive that's causing this issue?

Screen Shot 2020-02-25 at 2.27.35 PM.png

Screen Shot 2020-02-25 at 2.31.06 PM.png

Link to comment
17 minutes ago, omorillon said:

Has anybody run into this problem?

 

Google Drive File Stream is a constant source of problems, tbh. It's not a real filesystem, and it's up to GDFS to keep the OS's metadata index (which Spotlight and Alfred both use) informed of what's in the volume.

Link to comment
  • 4 weeks later...
  • 2 months later...

@Terminal @Pearcen Doing an mdls on these files or using the Alfred metadata tool (https://cachefly.alfredapp.com/tools/AlfredMetadataTool_v1.1.zip) should give more insight into whether these files even have any relevant metadata associated to them. 

 

As Dean suggests, GDFS isn't a real file system. Google haven't put a high priority on making it work reliably with Spotlight and macOS, unfortunately. 

Link to comment
On 2/25/2020 at 4:59 PM, deanishe said:

 

Google Drive File Stream is a constant source of problems, tbh. It's not a real filesystem, and it's up to GDFS to keep the OS's metadata index (which Spotlight and Alfred both use) informed of what's in the volume.

Deanishe,

 

File Stream is constantly giving my team problems too. Can you a recommended another cloud storage solution which is reliable and works better with Spotlight and Alfred?

Link to comment

@RajunCajun The key feature of the cloud storage solution you choose needs to be that files are stored locally and always available on your Mac, not just as virtual files that are actually stored online. 

 

For example, Dropbox* keeps all your files locally on your Mac, which means that there's a tangible file for macOS to reliably include in its index.

 

[* I'm referring to Dropbox in its vanilla form, I do believe they also now have a feature where you can choose to only store files online and keep just a reference locally on your Mac.]

Link to comment
  • 3 months later...

@vero

I know it's been a while, but I haven't been here for a bit. Here is an mdls of a file in 'My Drive' path: /Volumes/GoogleDrive/My Drive

 

 My Drive mdls General\ notes.txt
_kMDItemDisplayNameWithExtensions      = "General notes.txt"
kMDItemContentCreationDate             = 2020-06-24 01:51:30 +0000
kMDItemContentCreationDate_Ranking     = 2020-06-24 00:00:00 +0000
kMDItemContentModificationDate         = 2020-08-28 00:08:08 +0000
kMDItemContentModificationDate_Ranking = 2020-08-28 00:00:00 +0000
kMDItemContentType                     = "public.plain-text"
kMDItemContentTypeTree                 = (
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemDisplayName                     = "General notes.txt"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2020-08-28 00:08:08 +0000
kMDItemFSCreationDate                  = 2020-06-24 01:51:30 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "General notes.txt"
kMDItemFSNodeCount                     = (null)
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 502
kMDItemFSSize                          = 5433
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2020-08-17 00:00:00 +0000
kMDItemKind                            = "Plain Text Document"
kMDItemLastUsedDate                    = 2020-08-17 01:59:02 +0000
kMDItemLastUsedDate_Ranking            = 2020-08-17 00:00:00 +0000
kMDItemLogicalSize                     = 5433
kMDItemPhysicalSize                    = 8192
kMDItemUseCount                        = 10
kMDItemUsedDates                       = (
    "2020-07-08 16:00:00 +0000",
    "2020-08-16 16:00:00 +0000"
)

 

Link to comment

@Pearcen Since the post above, we've added a File Search Troubleshooting tool to Alfred.

 

Ensuring you're using Alfred 4.1.1, go to Alfred's preferences > Help > Troubleshooting and run the File Search Troubleshooting, dragging in some of the files you can't locate. This will give you more information on whether the metadata for these files is complete, and if they're correctly included in Alfred's index. 

 

I would recommend trying moving a file off GDFS and to your Desktop for a moment to establish whether it's found. If it is found when it's anywhere but on GDFS, it puts the issue squarely in Google's camp in making files properly indexable.

 

Cheers,
Vero

Link to comment

I have the same problem as people describing above. The result after the troubleshooting tool ran is:

 

Quote

Starting Diagnostics...

File: 'Sportsting.gsheet'
Path: '/Users/michal/Google Drive/Sport'

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

Check file cache database...

File cache integrity is ok

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

Check if file is readable...

Alfred has permissions to read this file.

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

Check file is in search scope...

File exists within Alfred's default search scope

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

Check if volume '/' is indexed by macOS...

Indexing is enabled on this drive

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

Check direct file metadata...

Direct metadata available

Display Name: Sportsting.gsheet
 Other Names: 
Content Type: com.google.gsheet
   Last Used: 2020-04-10 16:49:53 +0000

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

Check mdls file metadata...

macOS metadata missing essential items

kMDItemFSContentChangeDate = 2020-04-10 16:49:53 +0000
kMDItemFSCreationDate      = 2020-04-10 16:49:53 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Sportsting.gsheet"
kMDItemFSNodeCount         = 180
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 180
kMDItemFSTypeCode          = ""

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

Troubleshooting failed
 

 

Anything I can do to fix this?

Link to comment

@Michal Bryxí Are Google Spreadsheets real files or do they just take you to the Google Sheets in your browser?

 

If you can choose a real file (such as the example of a text file as @Pearcen used) and you drag it to your Desktop, wait a moment, then drag that to the File Troubleshooting tool, what metadata do you see? And what happens if you try to do the same with your .gsheet file? 

 

I think in your case, it could be a combo of 1. GDFS not allowing Spotlight to index files, and 2. .gsheet potentially not being a file at all. A little more investigating as suggested above will give you more insight into that.

 

Cheers,
Vero

Link to comment
5 hours ago, Vero said:

@Michal Bryxí Are Google Spreadsheets real files or do they just take you to the Google Sheets in your browser?

 

If you can choose a real file (such as the example of a text file as @Pearcen used) and you drag it to your Desktop, wait a moment, then drag that to the File Troubleshooting tool, what metadata do you see? And what happens if you try to do the same with your .gsheet file? 

 

I think in your case, it could be a combo of 1. GDFS not allowing Spotlight to index files, and 2. .gsheet potentially not being a file at all. A little more investigating as suggested above will give you more insight into that.

 

Cheers,
Vero

 

Hello Vero, Google Spreadsheets are "gdoc" files and they are just links to a drive.google.com URL inside of chrome. They don't act as the actual file, and thus one can not search inside of them. A solution for this is to export the document as a DOCX (or XLS), and then upload it again and keeping it a DOCX (google now supports this, before they automatically converted the file to google drive's format). After that, a .docx file would be synced on your computer, and this file can be edited both in Google Drive via browser and locally through word, and it syncs very well.

 

I also post this in case it works for anyone having issues with GDFS and it's search:

 

The fact that GFS "mounts" is very inconvenient. Alfred can indeed index files by name (as can spotlight) but I am having issues with searching for content inside the files, for instance, phrases inside a PDF. And this is both from spotlight and from alfred (although alfred uses spotlight's index, so it's the same). This was a deal breaker for me, the ability to search within the files I feel it's extremely important.

 

The only solution I found was not to use Google Drive File Stream and switch to Google's Backup and Sync. The main difference (that I can see) is that it doesn't offer real time view on Office's products when someone is editing the file on drive.google.com. This isn't a deal breaker for me, I use it mostly as a personal tool. As a note: I don't know how Backup and Sync manages having multiple drives, I don't know if it supports it (I don't use them). Other than that, Backup and Sync actually creates a folder on your Mac, with all content stored locally (as Dropbox or iCloud do). 

 

This might help anyone, so here's what I did. In case anyone wants more info, here's a comparison between both tools: https://support.google.com/drive/answer/7638428?hl=en

 

Cheers!

 

Link to comment
  • 6 months later...
On 10/10/2020 at 12:17 PM, Vero said:

@Michal Bryxí Are Google Spreadsheets real files or do they just take you to the Google Sheets in your browser?

 

All of them. Links, files, folders. Alfred can't discover any of them:

774849536_Screenshot2021-05-07at11_13_30.thumb.png.151f560a416a62e96220a612e1f6cb7a.png

 

Curiously enough exactly one folder from the whole gdrive is there:

1284941544_Screenshot2021-05-07at11_09_04.thumb.png.b71963b3a4e00190a74909cce704a151.png

Link to comment

@Michal Bryxí If you use Alfred's built-in Troubleshooting tool and drag in some of your Google Drive files in, what does the output show? 

 

https://www.alfredapp.com/help/troubleshooting/indexing/

 

If the files aren't passing troubleshooting, they're not being indexed by Spotlight, which will be the first step. Google Drive don't officially support macOS indexing, so your mileage may vary with this, depending on your specific Google Drive settings and whether the files are stored locally on your Mac.

 

Cheers,
Vero

Link to comment

@Vero I get this. Tried to enable everything in Spotlight, but the same result.

 

Starting Diagnostics...

File: 'Sportsting.gsheet'
Path: '/Users/michal/Google Drive/Sport'

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

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: Sportsting.gsheet
 Other Names: 
Content Type: com.google.gsheet
   Last Used: 2021-05-03 18:53:02 +0000

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

Check mdls file metadata...

 macOS metadata missing essential items

kMDItemFSContentChangeDate = 2021-05-03 18:53:02 +0000
kMDItemFSCreationDate      = 2020-04-10 16:49:53 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Sportsting.gsheet"
kMDItemFSNodeCount         = 180
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 180
kMDItemFSTypeCode          = ""

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

 Troubleshooting failed

 

Link to comment

@Michal Bryxí The troubleshooting you provided shows that there is missing metadata, therefore macOS is not properly indexing this volume.

 

Is Spotlight finding this file? If so, does Alfred's file search mode find the file (using the spacebar prefix, or open keyword).

Link to comment
Quote

Is Spotlight finding this file?

Yes:

443445344_Screenshot2021-05-08at18_06_24.thumb.png.f053cf40c38958a9d0d1e39f0e7df326.png

 

Quote

If so, does Alfred's file search mode find the file (using the spacebar prefix, or open keyword).

Also yes:

1375005104_Screenshot2021-05-08at18_06_08.thumb.png.f84bc371aa9bc33c2fad556f5323fe0c.png

Ok, maybe I'm just doing something silly. Other (non g-drive files) appear in Alfred even without the spacebar prefix. I can work with the spacebar prefix, but would expect it to just work even without it. Can I set it up somehow?

Link to comment

@Michal Bryxí have you added com.google.gsheet to Alfred's default results? You can do this in Alfred's Features > Default Results > Advanced.

 

Having said that, I find that It's best to keep Alfred's default results as focused as possible, and use the file search mode for searching files. This is particularly important when you start using more features and workflows within Alfred, and will prevent the results from becoming noisy with files.

Link to comment
  • 2 weeks later...
  • 2 months later...

I'm running in the same error @Michal Bryxí reported here. I did a detailed posting in this thread: 

After posting there I found this thread which is maybe the better fit. 

As I understand correctly, Alfred is using the spotlight search index correct? For me, also, spotlight is not finding the files in my Google Drive Folder. I switched from Google File Stream to Google Drive for Desktop. Here is the news from Google regarding this update: Upcoming changes to Google Drive sync clients (support.google.com)

 

@Michal Bryxí could you explain how you manage it that spotlight is showing you the results? Did you somehow install the old Google File Stream App again?

 

And how could I add a folder to spotlight to search for files there, like I can do it in Alfred? With a "Finder alias" or a "Symlink" ?

 

Thanks a lot for your help in advance!

 

 

Link to comment

I don't think there's a real solution to this problem right now.

 

1) It's possible to get this workflow to work using these instructions, however this workflow will open all files in the browser (fine for Google Docs/Sheets etc, but sometimes you might want the file to open in finder).

 

2) It's possible to force index Google Drive by using these instructions, however I believe it will download all files offline. It won't work with "online only" files.

 

I've tried to open a ticket with Google via their Google Workspace support (and I encourage anyone else that pays for GSuite / Google Workspace to do the same!) So far, not very helpful.

Edited by alfredpanda
Link to comment

Hi all, it appears that an update to Google Drive a few days ago has caused Spotlight and macOS to stop indexing the files. Some users seem to have had quick and efficient success in finding files again by telling macOS to reindex their Google Drive, while others don't appear to have been able to.

 

Google is very opaque about what's happening under the hood with Google Drive. It could be that a workflow that directly interacts with the Google Drive API can finally put these issues to bed once and for all, and this is something we're going to look into. :) 

 

We'll pop some updates on the forum once we've investigated further.

 

Cheers,
Vero

Link to comment

Thanks a lot @Vero for the update.

I just found a reddit post about spotlight and the new Google Drive update. Seems like many users have problems with this update:

 

I also made one more observation. I have two Google Drive accounts. One via my Google Workspace account (Business) and one via my private Google account (Google One).

I first thought that Alfred/Spotlight can search my private Google Drive account and only the data from Google Workspace is no longer searchable.

 

But then I realized that after switching from version 46 to version 47 (of Google Drive) I had two folders of my private Google Drive account on the computer. One of them was not connected to Google Drive and therefore no longer synchronized.

 

So I deleted the unsynchronized folder. After that, Spotlight/Alfred could no longer find any data. 


That is, Spotlight only displayed something because of the duplicate folder that was not connected to Google Drive.

I hope that the people for whom it works, do not run into the exact same error.

 

P.S. I also informed the Google support about this problem. So far not helpful, they are blaming macOS. But I clarified that with Version 46 everything works fine.

Edited by Henry31
add P.S.
Link to comment
14 minutes ago, Michal Bryxí said:

One thing to note is that I'm not using "Google Drive vXX" (I don't even know where to download this one?), but "Backups and Sync from Google":

 

Good that you mention this. Backup and Sync from Google is the old Version for Google Drive (private).

 

If you are a Google Workspace Customer (for business purpose) you can't use "Backup and Sync from Google" instead you must use "Google File Stream".

 

Because this is very confusing, Google did a cool step: They simplified both apps and bring it together. So "Backup and Sync from Google" and "Google File Stream" are now "Google Drive for Desktop". 

 

In this help article it will be explained: https://support.google.com/googleone/answer/10309431 Look at the FAQ section they will explain it there.

 

@Michal Bryxí you should definitely stick to "Backup and Sync from Google" otherwise you can not use Spotlight or Alfred search. I'm really jealous of you, because you can use it still. 

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