Jump to content

Spotlight/Alfred no longer finding apps


Recommended Posts

I've asked this in the Apple Forums with no response, so I thought I'd ask here in case someone could shed some light on it.

 

The problem actually started with newer apps being installed not coming up in Alfred search results. So, I went into Preferences and cleared the Application Cache, followed by Rebuild MacOS Metadata. This kicked off Spotlight indexing again, but when it finished I could no longer see any results for local applications, folders or files. All I get back are results from the Workflows and Features.

 

I then checked the same in Spotlight, and got the same issue (no apps, etc being found, only bookmark links, Siri suggestions, etc).

 

I've been racking my brain to find out why this occurred, and am totally lost now, after trying everything I can to get the blasted thing to work.

 

I have tried the following so far:

  • Added/removed the hard drive from the Privacy settings in Spotlight System Preferences.
  • Added/removed *just* the applications folder from the same to see if a specific folder might work (everything here is actually ticked normally).
  • Removing all the items and re-adding from the 'Search Results' tab in Spotlight System Preferences.
  • Stopped the mdutil service and deleted the /.Spotlight-V100 folder.
  • As above and booted into Safe Mode and back to normal mode.
  • As above followed by CMD-OPTION-P-R to reset the PRAM.
  • sudo mdutil -i off
    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist (had to turn off system integrity protection to get it to allow this).
    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    sudo mdutil -i on
  • Somebody also suggested deleting /.metadata_never_index but this folder doesn't exist on my drive.
  • Run Onyx to clean things up.
  • And numerous other 'fixes' I've found scouring the internet (I can no longer remember, I've tried so many now!)

 

In each case, the Spotlight index to starts to rebuild, but never seems to return the apps, etc. It *does* appear to be indexing the main drive though, as sudo mdutil -sa reports, as shown in bold below:

 

/:

    Indexing enabled.

/Volumes/DocBrown:

     Indexing and searching disabled.

/Volumes/DocBrown/Backups.backupdb:

      Indexing enabled.

/Volumes/Marvin:

      Indexing and searching disabled.

/Volumes/Moriarty:

      Indexing and searching disabled.

/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Colossus/2017-11- 29-094813/MacOS:

      Index is read-only.

/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Colossus/2017-11- 29-221804/MacOS:

      Error: unknown indexing state.

/private/var/vm:

      Indexing and searching disabled.

 

Totally confused now, as I've never come across this before. Usually, a simple Spotlight rebuild does the trick. So any help would be most appreciated!

 

This is on MacOS High Sierra 10.13.1. FYI, I have 330GB of space left on my SSD, so it's not a space issue.

Link to comment

Hi dfay,

 

I did try that before, via Onyx and the terminal, but it didn't work.

 

However, after you suggested it, I tried it again - Although initially I got the same result as before, I then tried the following variation:
 

sudo mdutil -i off
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
sudo mdutil -i on

 

I then went into Alfred and Clicked on Rebuild macOS Metadata, ticking the 'Delete /.Spotlight-V100' for good measure. It now looks like it's rebuilding the index, including the apps. So, many thanks for your suggestion!

 

One issue now though is that half my apps have lost their icons. Will check this in the morning... It's a bit late for my little brain. :) 

 

Update: 

Removing the finder plist file from ~/Library/Preferences, followed by a reboot fixed the latter problem.

 

All's well now :) Many thanks for your help, @dfay!

 

 

Edited by Tarique Naseem
Update
Link to comment
  • 8 months later...

I have the same issue now after having a problem on my mac and restoring from a clone and reinstalling High Sierra again on top.

Spotlight does not show apps, which leads to Alfred not showing them also.

 

Done all the above, rebuild launch services, recreated spotlight index using various methods.

 

Nothing helps!

 

Using LaunchBar now unfortunately

Link to comment

@manfredell Welcome to the forum. 

 

You say that you rebuild the Spotlight, but could you please do so from Alfred's preferences, so that you can check the "Delete /.Spotlight-V100" checkbox when it appears, which ensures that a more thorough reindex occurs to remove any possible corruption.

 

Once you're in Terminal, please take a look at any error messages macOS may be giving you about your index. You should see "indexing enabled" if everything is well. :) You then need to leave the index to rebuild for up to an hour, so time to go grab a cup of coffee. Once it's done, take a look at Spotlight first to see if your files can be found.

 

Finally, do you use any third-party tools like Onyx or anything else that could be interfering with the normal operation of your Mac's index? 

 

You can download the Alfred metadata tool and drag a file you can't find in Spotlight or Alfred, to see what kind of metadata exists for the file:

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

 

If you can please paste the results in your reply, we can take a look at whether the metadata for your files is complete.

 

Cheers,
Vero

Link to comment

I've done this from within Alfred, with this chekbox checked. Apps are not shown in spotlight no matter what.

 

Used the tool and tried one App:

 

/Applications/Spark.app

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

 Display Name: Spark
    Alt Names: Spark.app
    File Type: dyn.age80c6du
     Comments: 
     Keywords: 
    Last Used: 2018-08-31 07:22:22 +0000

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

_kMDItemDisplayNameWithExtensions      = "Spark.app"
kMDItemAlternateNames                  = (
    "Spark.app"
)
kMDItemContentCreationDate             = 2018-08-17 11:19:35 +0000
kMDItemContentCreationDate_Ranking     = 2018-08-17 00:00:00 +0000
kMDItemContentModificationDate         = 2018-08-24 16:31:03 +0000
kMDItemContentType                     = "dyn.age80c6du"
kMDItemDateAdded                       = 2018-08-30 11:32:23 +0000
kMDItemDateAdded_Ranking               = 2018-08-30 00:00:00 +0000
kMDItemDisplayName                     = "Spark"
kMDItemFSContentChangeDate             = 2018-08-24 16:31:03 +0000
kMDItemFSCreationDate                  = 2018-08-17 11:19:35 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 1
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "Spark.app"
kMDItemFSNodeCount                     = 1
kMDItemFSOwnerGroupID                  = 0
kMDItemFSOwnerUserID                   = 0
kMDItemFSSize                          = (null)
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2018-08-31 00:00:00 +0000
kMDItemInterestingDate_RankingRepaired = 1
kMDItemKind                            = "Package"
kMDItemLastUsedDate                    = 2018-08-31 07:22:22 +0000
kMDItemLastUsedDate_Ranking            = 2018-08-31 00:00:00 +0000
kMDItemUseCount                        = 1
kMDItemUsedDates                       = (
    "2018-08-30 23:00:00 +0000"
)
 

Link to comment
30 minutes ago, manfredell said:

Alt Names: Spark.app
    File Type: dyn.age80c6du

[...]

kMDItemKind = "Package"

 

That bit looks extremely wrong. An application (bundle) should have they type com.apple.application-bundle and kind Application. A dyn.* type means the OS has no idea what kind of file that it.

Link to comment

It was OK until yesterday. For a few days i was asked my password upon login, which was strange.

Tried to install the latest Combo Update and this is when the shit hit the fan.

The update did not install as the mac hung on shutdown. Actually now it did this all the time.

 

Erased the disk and restored from a CarbonCopy clone. Then reinstalled High Sierra on top.

 

It is working now but it has this spotlight issue.

Link to comment

@manfredell As @deanishe said, the file type is wrong, so Alfred and Spotlight can't establish what type your files are and whether to include them in the index.

 

Based on the issues you've had with macOS, this is likely to be a deeper issue with indexing and permissions on your Mac. It may be worth doing a fresh install of macOS on your Mac, as you may find that the ramifications of a difficult reinstall will continue to be an issue in apps other than Alfred and Spotlight over time.

 

Cheers,
Vero

Link to comment

You're definitely right there.

 

I had one final straw: a backup using QRECALL which can create bootable restores. Worked and I'm up and running again.

 

Using the same app as before I now get:

 

/Applications/Spark.app

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

 Display Name: Spark
    Alt Names: Spark.app
    File Type: com.apple.application-bundle
     Comments: 
     Keywords: 
    Last Used: 2018-08-31 12:46:56 +0000

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

_kMDItemDisplayNameWithExtensions       = "Spark.app"
kMDItemAlternateNames                   = (
    "Spark.app"
)
kMDItemAppStoreAdamID                   = "1176895641"
kMDItemAppStoreCategory                 = "Productivity"
kMDItemAppStoreCategoryType             = "public.app-category.productivity"
kMDItemAppStoreHasReceipt               = 1
kMDItemAppStoreInstallerVersionID       = "828291413"
kMDItemAppStoreIsAppleSigned            = 1
kMDItemAppStoreParentalControls         = "4+"
kMDItemAppStorePurchaseDate             = 2018-08-24 16:30:50 +0000
kMDItemAppStoreReceiptIsMachineLicensed = 0
kMDItemAppStoreReceiptIsRevoked         = 0
kMDItemAppStoreReceiptIsVPPLicensed     = 0
kMDItemAppStoreReceiptType              = "Production"
kMDItemCFBundleIdentifier               = "com.readdle.smartemail-Mac"
kMDItemContentCreationDate              = 2018-08-17 11:19:35 +0000
kMDItemContentCreationDate_Ranking      = 2018-08-17 00:00:00 +0000
kMDItemContentModificationDate          = 2018-08-24 16:31:03 +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"
)
kMDItemCopyright                        = "Copyright © 2016 Readdle. All rights reserved."
kMDItemDateAdded                        = 2018-08-31 11:25:21 +0000
kMDItemDateAdded_Ranking                = 2018-08-31 00:00:00 +0000
kMDItemDisplayName                      = "Spark"
kMDItemExecutableArchitectures          = (
    "x86_64"
)
kMDItemFSContentChangeDate              = 2018-08-24 16:31:03 +0000
kMDItemFSCreationDate                   = 2018-08-17 11:19:35 +0000
kMDItemFSCreatorCode                    = ""
kMDItemFSFinderFlags                    = 0
kMDItemFSHasCustomIcon                  = (null)
kMDItemFSInvisible                      = 0
kMDItemFSIsExtensionHidden              = 1
kMDItemFSIsStationery                   = (null)
kMDItemFSLabel                          = 0
kMDItemFSName                           = "Spark.app"
kMDItemFSNodeCount                      = 1
kMDItemFSOwnerGroupID                   = 0
kMDItemFSOwnerUserID                    = 0
kMDItemFSSize                           = 109378836
kMDItemFSTypeCode                       = ""
kMDItemInterestingDate_Ranking          = 2018-08-31 00:00:00 +0000
kMDItemKind                             = "Application"
kMDItemLanguages                        = (
    de,
    "zh-Hans",
    ja,
    en,
    es,
    it,
    Base,
    "pt-BR",
    ru,
    fr
)
kMDItemLastUsedDate                     = 2018-08-31 12:46:56 +0000
kMDItemLastUsedDate_Ranking             = 2018-08-31 00:00:00 +0000
kMDItemLogicalSize                      = 109378836
kMDItemPhysicalSize                     = 47591424
kMDItemUseCount                         = 3
kMDItemUsedDates                        = (
    "2018-08-30 23:00:00 +0000"
)
kMDItemVersion                          = "2.0.10"
 

Link to comment
  • 4 weeks later...

I've been struggling with what appear to be symptoms of the same problem for several weeks – all my application bundles mysteriously were somehow reset to type "dyn.age80c6du" –  and this discussion is the only one on the 'net that I've found that appears to identity the cause of my symptoms. I've used Alfred Metadata Tool to discover that ALL of my apps are set to this type, not to "com.apple.application-bundle" as they should be; I've no idea how this happened.

 

2017 MacBook Pro, macOS 10.13.6. Reinstalling macOS from the Recovery HD, nuking and rebuilding the Spotlight index with Alfred, rebuilding permissions with Terminal, etc. hasn't helped. I would greatly welcome any advice about what to try next – some arcane terminal command that will return my applications to their correct file type? My computer misbehaves in all manner of crazy ways, hanging apps, refusing to shut down, corrupting Time Machine backups, etc. 

 

I'm not a registered Alfred user though it's an impressive application. I will very happily buy the Powerpack a couple of times over if someone can help me get out of this mess.

Link to comment

Hi Terry,

 

Spotlight isn't responsible for filetypes, LaunchServices is.

 

You can try resetting the LaunchServices database by running this command in Terminal:

 

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed -r

Link to comment

Thanks. I tried that. No change: all applications are still of type "dyn.age80c6du", Alfred and Spotlight can't find them and I'm still unable to restart my computer without a hard shutdown. I had tried earlier to rebuild the Launch Services database with this command – 

 

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

 

Is the syntax of the command you suggested better for this? I believe that I picked up the syntax I used from an Apple tech support page several years ago. 

 

TH

Link to comment

Well, a reinstallation of macOS, and a subsequent rebuilding of the LaunchServices database from the Terminal didn't correct this weird problem; all of my applications are still of file type "dyn.agec6du". I tried deleted a couple of App Store applications and reinstalling them. They were reinstalled also of type "dyn.agec6du". That suggests to me that some flag somewhere is set in such a way that my system doesn't recognize an application as an application-bundle. The applications will run – well, until something, maybe background housekeeping? something having to do with quitting the applications? – will cause the system to lock up. I'm hoping that someone here knows of a terminal command, or a file that I can delete or repair deep in the system that will reset this flag.

Link to comment
45 minutes ago, Terry Harpold said:

That suggests to me that some flag somewhere is set in such a way that my system doesn't recognize an application as an application-bundle

 

"dyn.agec6du" is not random. It means "file extension = app". I don't know why your system has forgotten about "com.apple.application-bundle", but until it remembers, assigning "dyn.agec6du" to .app files is the expected result.

 

Did you perform a clean installation or just overwrite your existing OS?

Link to comment

Overwrote the existing OS, via a reinstallation from the Recovery HD. Am worried about a clean installation; not sure if I have truly secure backups of everything else: one of the symptoms of this problem has been corrupted Time Machine backups and I'm not convinced that all of my backed-up data is secure. I have Carbon Copy Cloner backups but, again, I'm worried, as my backup rotation of those went through several cycles after I suspect this problem existed. Maybe the problem is only this flag for applications, and a clean installation and restoring of my data would be OK? An then I could wipe all the Time Machine backups and start fresh. But we're in the middle of the semester, I have grant proposals due, letter deadlines for job candidates, journal articles due. Twelve to fourteen hour days every day. There's never a good time to do a clean installation but now is a *really* terrible time to lose a day to that. My hope is that getting the system to remember the correct application file type is less cataclysmic than that. ?

 

On a side note: have run hardware checks on the laptop, with DriveDX, Apple's hardware diagnostics, the Time Machine is working fine for other computers in the household, etc. Disk Utility always reports this laptop as without problems.  I'm convinced that the application file type problem is the telling symptom of whatever happened here. Just have to figure it out.

Link to comment

Have you tried creating a new user account? If that has the same problem, the issue is likely with the system, not your data. If it works, use that account till you have time to sort out your backups and do a proper reinstallation.

 

Also, if you're doing a lot of important work right now, then you really should make sure you have some working backup system in place.

Link to comment

Tried creating a new user account. All apps there are also of type dyn.agec6du. Once I determined that, I didn't stick around long in the new account, as it seems likely that the problem is at a system level. Understand about the need for reliable backups, have been a faithful backer-upper since my first Mac in 1984. I thought I had such a system in place – Time Machine, diligent weekly CCC backups to rotating media, Arq backing data up to Amazon Glacier every AM – until my system started going haywire and the risk that my backups might be already corrupted began to emerge. My data probably *is* OK. It will be possible to pull down backups from Glacier, or to resurrect them from Time Machine, but that will be costly and time-consuming. I face the prospect of probably having to reinstall many individual applications, deal with publishers about registrations, etc. That's a multi-day misadventure. My guess is that what has happened if pretty arcane –  though at least one other person has has this problem, thus this thread – but it *feels* like a switch somewhere just needs to be flipped, if I can find it.

 

Am hoping that a full-on OS reinstall – which I would do prior to moving to Mojave anyway – will not have to made NOW. I'm still trying to wrap my head around the idea that the OS can get confused in this way and that there may be nothing short of a complete reinstall that can fix it.

Link to comment
1 minute ago, Terry Harpold said:

 I face the prospect of probably having to reinstall many individual applications, deal with publishers about registrations, etc. That's a multi-day misadventure

 

Normally, it takes a few hours. Once you do a fresh install, it will ask you if you'd like to restore applications and user data from a Time Machine backup or other disk. The only common issues are old apps that aren't compatible with the new OS version, which won't be a problem in your case because you're reinstalling the same version.

Link to comment

I had the same problem described above, with File Type set to dyn.age80c6du.

 

Managed to fix it by:

  • Trying all the suggestions mentioned above (which might have helped, I'm not sure)
  • Following the instructions here: https://discussions.apple.com/thread/7421012 (again, not sure if needed)
  • Running all the Onyx maintenance operations

After doing these three things, dyn.age80c6du was set back to com.apple.application-bundle across all my apps.

 

Hope this helps someone.

Edited by pixelvisions
Link to comment

I ended up taking the tougher path. Made a full Time Machine backup to an external drive, booted into the Recovery HD volume, erased the boot volume, reinstalled High Sierra (so, a clean install), then restored all my applications and data. (Important here is the use of an external drive for the restore, not our house Time Capsule. Time Machine restores via wifi are OK for retrieving the odd file but they are, in my experience, unreliable for complete reinstalls.) That took several worrisome hours (700+ GB of data to copy over) but after rebooting, a few account setup tasks, everything seems to be working as it should. Still a few glitches with software that need serial numbers and the like. But the dyn.age80c6du problem is definitely corrected and my system appears stable (no weird crashes and lockups as before.) Still no idea how this happened or what in fact the clean install effectively repaired. 

 

Thanks to those who offered suggestions. So grateful for the leads this discussion gave me that, as forecast, I've purchased the Alfred Power Pack. Still learning all that I can do with Alfred but overall pleased with features of the application. 

Link to comment
  • 2 years later...

I'm having same issue... Alfred not finding apps, so useless as a launcher.     This all began after upgrade to Catalina (which was a clean install)

Interestingly, though, for me, it's only the MacOS built-in apps  (photos, garageband, music, maps, etc.) that aren't found.  Any other apps I've installed (either through the app store show up just fine.  

Any suggestions how to get them reindexed or "typed" properly?

 

 

Link to comment

@Gordon Firemark Which version of Alfred are you using? And which version of macOS? 

 

Have you taken a look at the File Troubleshooting tool? Ensuring you're using Alfred 4.2.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. This will help you establish what might be happening on your Mac.

 

 

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