Jump to content

Alfred only shows results from /System, /Applications, and ~


Recommended Posts

Hello,

 

Starting a few days ago, my Alfred setup completely broke. Alfred no longer shows results from any folders other than /System/Applications, ~/Applications, my home (~) directory, and for some reason, a lone result from /usr/local/Cellar. I figured this out by manually searching for every a-z letter (i.e. find a, find b, ...). Interestingly enough, most of what I'm trying to search on is within my home directory, but Alfred only shows the top level folders (and no results appear when I search on a known file outright).

 

I have uninstalled and reinstalled Alfred, deleted the Alfred files by following this guide, restarted (not factory reset) my Mac, forced spotlight to reindex, and added all files to "Prevent spotlight from searching..." and removed them (this was another suggestion to get spotlight to reindex). 

 

Of considerable note here, Alfred cannot find applications in Macintosh HD/Applications but it CAN find apps in Macintosh HD/System/Applications, and in ~/Applications. Also of importance, Spotlight CAN find these files, so that makes me think Alfred is the problem here. 

 

Some things that I recently did with my Mac include:

 

Within the past month

  • Installed a Windows 10 and Ubuntu 18.04 instance in Parallels (Alfred STILL worked after/during this)
  • Installed MacOS 10.15.2 security update

 

Within the past week (around the time problems started)

  • Installed RStudio which required the installation of Xcode command line tools ( I was surprised to find I didn't have this installed, but alas, I upgraded my Mac a few months ago and haven't had the need for in until now)
  • My Parallels Ubuntu had this weird issue where Shared Network didn't want to work. I had to run it in bridged mode, then it just went back to normal on its own.

 

Any ideas here?

 

Edit: Forgot to mention, I also ran the "Clean Drive" utility in parallels toolbox. It cleared out a bunch of crap, mostly old backups that I didn't want on the native drive anyway.

Edited by RobRoyce
Link to comment

Following up for posterity. It turns out I accidentally deleted xcode when running the Parallels disk cleaner. I think at the time I thought it would just remove the app, and not the cmd line tools. I was wrong. So i went ahead and did a full reinstall of xcode and cmd-line tools, and Alfred has been working fine since then (had to reboot and reindex). I'll update if the symptoms return, but I think its good now.

Link to comment

@RobRoyce I've read through your thread, and it's a little tricky to establish where you're at now.

 

Could you please confirm:

  • Which version of Alfred are you using? If you're in Catalina, you should ensure you're using the latest Alfred 4 update (currently 4.0.8)
  • Are you running macOS in Parallels or is it your primary install?
  • What is your search scope set to? Do you need to reset it?

Running things like "Clean Drive" could very well be removing essential files from your Mac, as well as seemingly unnecessary files.

 

To troubleshoot this further, please download the Alfred Metadata Tool here:

https://cachefly.alfredapp.com/tools/AlfredMetadataTool_v1.1.zip

 

Install this, and drag in apps that Alfred doesn't find, such as Safari. Please paste the output of the Metadata Tool in your reply so that we can take a look at how complete it is.

 

Next, please go to Alfred's Help tab, click the "Diagnostics" button, and email the file to our info@ email address so that I can take a look. (Please link to this thread in your email to help me trace back the conversation so far) :) 

 

Cheers,
Vero

Link to comment

Sorry, I should have added all of that info.

 

MacOS: Catalina 10.15.2

Alfred: 4.0.7 as of the first post, but just updated to 4.0.8 and the problem persists.

Parallels: 15.1.2 with Ubuntu and Windows images.

 

I am running Alfred on my core MacOS build, and not within Parallels. I only mentioned Parallels because of "Clean Drive" and possible known issues with that.

 

Search scope is set to default, with both `macOS Applications folder` and `Folders in Home` enabled. Also tried explicitly adding folders which knowingly contain file's I typically search on.

 

 

 

========================================================================================================================

Metadata Extraction

 

/Applications/Safari.app

Internal File Metadata
======================

 Display Name: Safari
    Alt Names: 
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2019-12-15 17:39:47 +0000

Raw mdls File Metadata
======================

kMDItemFSContentChangeDate = 2019-12-15 17:39:47 +0000
kMDItemFSCreationDate      = 2019-09-28 03:14:32 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Safari.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 0
kMDItemFSOwnerUserID       = 0
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""
 

 

 

/Applications/iTerm.app

Internal File Metadata
======================

 Display Name: iTerm
    Alt Names: 
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2019-11-18 17:01:39 +0000

Raw mdls File Metadata
======================

kMDItemFSContentChangeDate = 2019-11-18 17:01:39 +0000
kMDItemFSCreationDate      = 2019-11-18 01:42:26 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "iTerm.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""
 

 

 

/Applications/Emacs.app

Internal File Metadata
======================

 Display Name: Emacs
    Alt Names: 
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2019-09-02 07:00:54 +0000

Raw mdls File Metadata
======================

kMDItemFSContentChangeDate = 2019-09-02 07:00:54 +0000
kMDItemFSCreationDate      = 2019-09-02 07:00:54 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Emacs.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 20
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""
 

 

 

 

 

========================================================================================================================

Metadata Remark

Interestingly enough, there are some applications in the same folder as those above that do not appear in Spotlight or Alfred, such as:

 

/Applications/Anki.app

Internal File Metadata
======================

 Display Name: Anki
    Alt Names: 
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2019-08-17 09:41:55 +0000

Raw mdls File Metadata
======================

kMDItemFSContentChangeDate = 2019-08-17 09:41:55 +0000
kMDItemFSCreationDate      = 2019-08-17 09:41:55 +0000
kMDItemFSCreatorCode       = ""
kMDItemFSFinderFlags       = 0
kMDItemFSHasCustomIcon     = 0
kMDItemFSInvisible         = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery      = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Anki.app"
kMDItemFSNodeCount         = 1
kMDItemFSOwnerGroupID      = 80
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 1
kMDItemFSTypeCode          = ""
 

 

I tried checking permission flags, but there's no discernible pattern. Some of the apps that Alfred can't find but Spotlight can have pattern drwxr-xr-x, while others have drwxrwxr-x. Note that I only chose a small subset of apps that worked in spotlight but not in Alfred.

Link to comment

@RobRoyce As suspected, all metadata is missing for your apps; There's nothing in there to identify them as applications, so they're not being returned in results.

 

Spotlight is likely using an old cache, and would eventually refresh it, resulting in the same lack of results as you're seeing in Alfred.

 

Here's an example of what metadata you should expect to see for Safari (it's actually much longer than this, but I've just taken the top section, as that's what's most relevant)

 

Quote

 

/Applications/Safari.app

Internal File Metadata
======================

 Display Name: Safari
    Alt Names: Safari.app
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2020-01-15 11:02:52 +0000

Raw mdls File Metadata
======================

_kMDItemOwnerUserID            = 0
kMDItemAlternateNames          = (
    "Safari.app"
)
kMDItemAppStoreCategory        = "Productivity"
kMDItemAppStoreCategoryType    = "public.app-category.productivity"
kMDItemCFBundleIdentifier      = "com.apple.Safari"
kMDItemContentCreationDate     = 2015-06-22 20:25:25 +0000
kMDItemContentModificationDate = 2018-07-16 14:42:25 +0000
kMDItemContentType             = "com.apple.application-bundle"
kMDItemContentTypeTree         = (
    "com.apple.application-bundle",
    "com.apple.application",
    "public.executable",
    "com.apple.localizable-name-bundle",
    "com.apple.bundle",
    "public.directory",
    "public.item",
    "com.apple.package"
)

 

 

As you can see, there's a full ContentTypeTree to tell us what the file is, and allows apps like Alfred to decide when and how to return it in results.

 

Your next step will be to rebuild your Mac's index fully, which you can do from Alfred's Advanced preferences by clicking the "Rebuild macOS Metadata".

  • Ensure that you check the box to delete the Spotlight-V100
  • Do not run other apps like Onyx, drive cleaners or other things that might meddle with your index. Just a straight up rebuilding should do the job.
  • When Terminal appears, follow the instructions and keep a close eye for any error messages relating to your index.

After you complete the rebuild, type "reload" into Alfred to refresh the cache. You can also check that the apps' metadata is back to normal by dragging Safari to the Metadata tool again.

 

Let me know how you get on. :)

 

Cheers,
Vero

Link to comment
  • 5 weeks later...

Hello! I am experiencing the same issue, the apps are showing up with no metadata.

I've done a full clear including the deleting of the Spotlight-V100. I've not installed Onyx.

 

Following a full clear and no metadata present, what is the next step? I understand this doesn't sit under Alfred's remit, as its the underlying spotlight functionality that has failed, but what would you recommend next..or is a full reinstall my only option?

 

Thanks,

 

Dan.

 

Link to comment

Hello!

 

I have finally been able to rectify this on my Catalina machine by disabling System Integrity Protection (please note this is dangerous, and is not recommended, but was the only way I could fix it) then running the following commands:
 

sudo mdutil -a -i off

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

sudo mdutil -a -i on

 

I had tried most of the normal fixes, but this was the only one that worked.

Link to comment
On 2/18/2020 at 8:58 PM, Alfie said:

 

So … to recap … If Spotlight can find an application that's sitting on an attached non-System volume and Alfred cannot find the same application, whose fault is it and what is the fix?

 

Are you searching using Spotlight or Finder? Finder uses a different, lower level search than Spotlight and Alfred. 

 

If Spotlight can find the files, it will be possible to configure Alfred to also find them.

Link to comment
On 2/21/2020 at 7:18 AM, Vero said:

 

Are you searching using Spotlight or Finder? Finder uses a different, lower level search than Spotlight and Alfred. 

 

If Spotlight can find the files, it will be possible to configure Alfred to also find them.

 

 

Thanks!

 

As noted, I was comparing results of Spotlight search (Cmd-Space on my machine) to results of Alfred search (which I invoke via "Alfred Hotkey").

 

From your reply I'm guessing that Alfred should be able to find an application that's sitting on an attached non-System volume.

 

How do I configure it to do so?

 

Maybe relevant: In Alfred Preferences, under File Search > Advanced, my home folder is set to the standard Unix tilde.

 

Probably not relevant: In Alfred Preferences I also have "Quick File Search" mode enabled but I rarely use it.

 

 

Link to comment
On 2/21/2020 at 6:56 AM, ApertureMountain said:

@Alfie can you run the Metadata tool (https://cachefly.alfredapp.com/tools/AlfredMetadataTool_v1.1.zip) and show us what it reports for Safari?

 

Side point: If you have Parallels installed, the "Energy Saver" function within the Parallels Tools disables spotlight, and can sometimes fail to come back on - This was the problem I was having.

 

 

Thanks!

 

1. Why Safari? It lives on my System volume and shows up BOTH in my Spotlight search AND in my Alfred search -- no problem there. Are you just using it as a test case of some sort? In any event, what the utility reports is appended. I see nothing untoward or revealing. Let me know if you do.

 

2. I do use Parallels occasionally, but not on the Mac in question. (Nevertheless, I'm glad you solved the problem you were having.)

 

 

APPENDED from AlfredMedataTool:

 

/Applications/Safari.app

Internal File Metadata
======================

 Display Name: Safari
    Alt Names: Safari.app
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2020-02-18 01:40:17 +0000

Raw mdls File Metadata
======================

_kMDItemDisplayNameWithExtensions  = "Safari.app"
kMDItemAlternateNames              = (
    "Safari.app"
)
kMDItemAppStoreCategory            = "Productivity"
kMDItemAppStoreCategoryType        = "public.app-category.productivity"
kMDItemCFBundleIdentifier          = "com.apple.Safari"
kMDItemContentCreationDate         = 2020-01-23 18:29:53 +0000
kMDItemContentCreationDate_Ranking = 2020-01-23 00:00:00 +0000
kMDItemContentModificationDate     = 2020-02-05 12:17:38 +0000
kMDItemContentType                 = "com.apple.application-bundle"
kMDItemContentTypeTree             = (
    "com.apple.application-bundle",
    "com.apple.localizable-name-bundle",
    "com.apple.application-bundle",
    "public.directory",
    "public.executable",
    "com.apple.application",
    "public.item",
    "com.apple.package",
    "com.apple.bundle"
)
kMDItemDateAdded                   = 2020-02-05 12:15:19 +0000
kMDItemDateAdded_Ranking           = 2020-02-05 00:00:00 +0000
kMDItemDisplayName                 = "Safari"
kMDItemExecutableArchitectures     = (
    "x86_64"
)
kMDItemFSContentChangeDate         = 2020-02-05 12:17:38 +0000
kMDItemFSCreationDate              = 2020-01-23 18:29:53 +0000
kMDItemFSCreatorCode               = ""
kMDItemFSFinderFlags               = 0
kMDItemFSHasCustomIcon             = (null)
kMDItemFSInvisible                 = 0
kMDItemFSIsExtensionHidden         = 1
kMDItemFSIsStationery              = (null)
kMDItemFSLabel                     = 0
kMDItemFSName                      = "Safari.app"
kMDItemFSNodeCount                 = 1
kMDItemFSOwnerGroupID              = 0
kMDItemFSOwnerUserID               = 0
kMDItemFSSize                      = 26309192
kMDItemFSTypeCode                  = ""
kMDItemInterestingDate_Ranking     = 2020-02-18 00:00:00 +0000
kMDItemKind                        = "Application"
kMDItemLanguages                   = (
    de,
    he,
    ar,
    el,
    ja,
    en,
    uk,
    "es_419",
    "zh_CN",
    es,
    da,
    it,
    sk,
    "pt_PT",
    ms,
    sv,
    cs,
    ko,
    Base,
    no,
    hu,
    tr,
    pl,
    "zh_TW",
    vi,
    ru,
    fr,
    fi,
    id,
    nl,
    th,
    pt,
    ro,
    hr,
    hi,
    ca
)
kMDItemLastUsedDate                = 2020-02-18 01:40:17 +0000
kMDItemLastUsedDate_Ranking        = 2020-02-18 00:00:00 +0000
kMDItemLogicalSize                 = 26309192
kMDItemPhysicalSize                = 21012480
kMDItemUseCount                    = 5
kMDItemUsedDates                   = (
    "2020-02-05 05:00:00 +0000",
    "2020-02-11 05:00:00 +0000",
    "2020-02-17 05:00:00 +0000"
)
kMDItemVersion                     = "13.0.5"

 

/EOF

 

 

 

 

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