Jump to content
shuntera

Not Finding Applications

Recommended Posts

I just tried one more thing: I installed Alfred on a different machine, and it is finding all applications flawlessly. 

 

One other point that I thought of that may be different for the machine that is revealing the bug: the /Users directory is being mounted separately, whereas the root "/" directory and drive contains the /Applications directory. That is to say, everything is on the root/boot drive, except /Users and its subdirectories, which is mounted at boot time by /etc/fstab. Spotlight finds everything and is not confused, but strangely Alfred is finding some, but not all, applications in /Applications.

 

Could you tell me if ~/Library/Caches/com.runningwithcrayons.Alfred-2/filecache.alfdb exists and is being populated? I'm wondering if for some reason Alfred is having issues writing to and querying the file cache where applications are stored.

Share this post


Link to post

Could you tell me if ~/Library/Caches/com.runningwithcrayons.Alfred-2/filecache.alfdb exists and is being populated?

 

Hi, new to this thread, but same thing happening to me. Just looked for this file, and it's not there. Files listed include:

  • Cache.db
  • Cache.db-shm
  • Cache.db-wal
  • Updates/
  • Workflow Data/
  • applescript/
  • iTunes Artwork/

Share this post


Link to post

Could you tell me if ~/Library/Caches/com.runningwithcrayons.Alfred-2/filecache.alfdb exists and is being populated? I'm wondering if for some reason Alfred is having issues writing to and querying the file cache where applications are stored.

 

Ah ha. I think we're onto something. It's not there. Here is the directory contents:

> ls -la ~/Library/Caches/com.runningwithcrayons.Alfred-2/
total 2000
drwxr-xr-x    9 jajones  staff     306 Apr 24 22:02 .
drwx------+ 121 jajones  staff    4114 Apr 26 16:16 ..
-rw-r--r--    1 jajones  staff    4096 Mar 14 17:31 Cache.db
-rw-r--r--    1 jajones  staff   32768 Apr 25 08:13 Cache.db-shm
-rw-r--r--    1 jajones  staff  984712 Apr 24 22:03 Cache.db-wal
drwxr-xr-x    2 jajones  staff      68 Apr 18 09:16 Updates
drwxr-xr-x    3 jajones  staff     102 Mar 18 16:38 Workflow Data
drwxr-xr-x    2 jajones  staff      68 Apr 24 22:02 applescript
drwxr-xr-x    2 jajones  staff      68 Mar 18 16:38 extensions_tmp

Share this post


Link to post

Ah sorry, I moved this into ~/Library/Application Support/Alfred 2/ in 2.0.3... Could you check that folder instead thanks!

> ls -la ~/Library/Application\ Support/Alfred\ 2/
total 112
drwxr-xr-x   8 jajones  staff    272 Apr 30 14:08 .
drwx------+ 80 jajones  staff   2720 Apr 22 11:09 ..
drwxr-xr-x   6 jajones  staff    204 Mar 14 18:00 Alfred.alfredpreferences
drwxr-xr-x   6 jajones  staff    204 Apr 30 14:08 Databases
drwxr-xr-x   3 jajones  staff    102 Mar 18 16:38 Workflow Data
-rw-r--r--   1 jajones  staff  49152 Apr 30 09:51 filecache.alfdb
-rw-r--r--   1 jajones  staff    480 Mar 14 18:01 license.plist
-rw-r--r--@  1 jajones  staff     78 Apr 30 14:08 usage.data

 

Shoot. I thought that we had something, but it is there.

 

Update: It definitely has something to do with this file and how it is being populated. If I grep for the applications that Alfred finds, they are in there (in the SQLite DB binary), but every one that Alfred does not find is not. For example,

> grep -i 1pass ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb
Binary file /Users/jajones/Library/Application Support/Alfred 2/filecache.alfdb matches

> grep -i Byword ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb

> 

 

... and so on. Byword is found by Spotlight, but not Alfred. 1Password is found by both. This pattern seems to hold true for every application that I try.

 

When I clear the application cache and "Clear Knowledge" (the buttons in the Advanced pane), the file cache.alfdb is seemingly removed from that directory. However, the same applications are found and unfound with Alfred (despite all being found with Spotlight).

Edited by jimj

Share this post


Link to post

I finally had a chance to make the switch to v2 today, and I'm seeing the same issue. Most of my habitual application searches from v1 work no problem, but I ran into an issue where it's not finding Lightroom4. Well, it is, but it loses it - here's what I mean:

 

I'm in the habit of using "ap" to find Photoshop and "apl" or "lr" to find Lightroom. After the upgrade when I start typing those characters, if I stop at "ap" I see this:

 

alf2.png

 

But I don't want to choose Lightroom from there because I don't want it to get confused with my Photoshop shortcut habit. So I add the "l", which should narrow it right down to Lightroom but instead it loses it completely:

 

alf3.png

 

It obviously knows it's there, so why is it losing it? Just for reference, Spotlight does indeed find Lightroom with that search:

 

alf4.png

 

I knew there would be some changes moving to the new version, I didn't expect it to lose its mind... I left the preference for app matching to the recommended "Fuzzy capital letters", my first guess would be that there is a bug in v2 which stops that fuzzy matching after 2 characters - obviously that becomes an issue with applications with more than two words, as in my example above.

Share this post


Link to post

I finally had a chance to make the switch to v2 today, and I'm seeing the same issue. Most of my habitual application searches from v1 work no problem, but I ran into an issue where it's not finding Lightroom4. Well, it is, but it loses it - here's what I mean:

 

I'm in the habit of using "ap" to find Photoshop and "apl" or "lr" to find Lightroom. After the upgrade when I start typing those characters, if I stop at "ap" I see this:

 

alf2.png

 

But I don't want to choose Lightroom from there because I don't want it to get confused with my Photoshop shortcut habit. So I add the "l", which should narrow it right down to Lightroom but instead it loses it completely:

 

alf3.png

 

It obviously knows it's there, so why is it losing it? Just for reference, Spotlight does indeed find Lightroom with that search:

 

alf4.png

 

I knew there would be some changes moving to the new version, I didn't expect it to lose its mind... I left the preference for app matching to the recommended "Fuzzy capital letters", my first guess would be that there is a bug in v2 which stops that fuzzy matching after 2 characters - obviously that becomes an issue with applications with more than two words, as in my example above.

Alfred tends to bring results with few characters if and when that specific search is brought up frequently. So, try typing the whole thing say 5 times and then see if it abbreviates to what you want.

Hope this helps.

Share this post


Link to post

When I clear the application cache and "Clear Knowledge" (the buttons in the Advanced pane), the file cache.alfdb is seemingly removed from that directory. However, the same applications are found and unfound with Alfred (despite all being found with Spotlight).

 

Would you mind renaming Byword to something else (completely different) just temporarily to see if that kicks OS X into reindexing it specifically. If that works, try renaming it back to Byword.

Share this post


Link to post

I am having the exact same issue, and it's new for me - I have been using Alfred 2 for a few weeks with no problems, but I am now finding that it's Alfred is not finding applications. Any of them. I tried doing "Open With" on a file found by Alfred, and found nothing.

 

I have flushed the Application Cache in Alfred's advanced preferences - no help. About to reindex spotlight (sigh). Here is an mdls of Console.app:

 

 

mdls "/Applications/Utilities/Console.app/"
_kTimeMachineIsCreationMarker  = 1
kMDItemAlternateNames          = (
    "Console.app"
)
kMDItemAppStoreCategory        = "Utilities"
kMDItemAppStoreCategoryType    = "public.app-category.utilities"
kMDItemCFBundleIdentifier      = "com.apple.Console"
kMDItemContentCreationDate     = 2012-03-25 15:10:31 +0000
kMDItemContentModificationDate = 2013-03-15 03:54:09 +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"
)
kMDItemDateAdded               = 2012-07-27 05:17:11 +0000
kMDItemDisplayName             = "Console"
kMDItemExecutableArchitectures = (
    "x86_64"
)
kMDItemFSContentChangeDate     = 2013-03-15 03:54:09 +0000
kMDItemFSCreationDate          = 2012-03-25 15:10:31 +0000
kMDItemFSCreatorCode           = ""
kMDItemFSFinderFlags           = 0
kMDItemFSHasCustomIcon         = 0
kMDItemFSInvisible             = 0
kMDItemFSIsExtensionHidden     = 0
kMDItemFSIsStationery          = 0
kMDItemFSLabel                 = 0
kMDItemFSName                  = "Console.app"
kMDItemFSNodeCount             = 1
kMDItemFSOwnerGroupID          = 0
kMDItemFSOwnerUserID           = 0
kMDItemFSSize                  = 9670711
kMDItemFSTypeCode              = ""
kMDItemKind                    = "Application"
kMDItemLanguages               = (
    Dutch,
    English,
    French,
    German,
    Italian,
    Japanese,
    Spanish,
    ar,
    ca,
    cs,
    da,
    el,
    fi,
    he,
    hr,
    hu,
    ko,
    no,
    pl,
    pt,
    "pt_PT",
    ro,
    ru,
    sk,
    sv,
    th,
    tr,
    uk,
    "zh_CN",
    "zh_TW"
)
kMDItemLastUsedDate            = 2013-05-01 12:10:43 +0000
kMDItemLogicalSize             = 9670711
kMDItemPhysicalSize            = 11218944
kMDItemUseCount                = 155
kMDItemUsedDates               = (
    "2012-07-27 04:00:00 +0000",
    "2012-07-29 04:00:00 +0000",
    "2012-07-30 04:00:00 +0000",
    "2012-07-31 04:00:00 +0000",
    "2012-08-02 04:00:00 +0000",
    "2012-08-03 04:00:00 +0000",
    "2012-08-04 04:00:00 +0000",
    "2012-08-05 04:00:00 +0000",
    "2012-08-06 04:00:00 +0000",
    "2012-08-07 04:00:00 +0000",
    "2012-08-08 04:00:00 +0000",
    "2012-08-09 04:00:00 +0000",
    "2012-08-13 04:00:00 +0000",
    "2012-08-16 04:00:00 +0000",
    "2012-08-17 04:00:00 +0000",
    "2012-08-24 04:00:00 +0000",
    "2012-08-27 04:00:00 +0000",
    "2012-08-28 04:00:00 +0000",
    "2012-08-30 04:00:00 +0000",
    "2012-09-15 04:00:00 +0000",
    "2012-09-19 04:00:00 +0000",
    "2012-09-21 04:00:00 +0000",
    "2012-09-24 04:00:00 +0000",
    "2012-09-25 04:00:00 +0000",
    "2012-09-26 04:00:00 +0000",
    "2012-09-30 04:00:00 +0000",
    "2012-10-04 04:00:00 +0000",
    "2012-10-08 04:00:00 +0000",
    "2012-10-09 04:00:00 +0000",
    "2012-10-12 04:00:00 +0000",
    "2012-10-26 04:00:00 +0000",
    "2012-10-27 04:00:00 +0000",
    "2012-10-29 04:00:00 +0000",
    "2012-11-01 04:00:00 +0000",
    "2012-11-03 04:00:00 +0000",
    "2012-11-11 05:00:00 +0000",
    "2012-11-13 05:00:00 +0000",
    "2012-11-28 05:00:00 +0000",
    "2012-12-06 05:00:00 +0000",
    "2012-12-12 05:00:00 +0000",
    "2012-12-13 05:00:00 +0000",
    "2012-12-14 05:00:00 +0000",
    "2012-12-18 05:00:00 +0000",
    "2012-12-31 05:00:00 +0000",
    "2013-01-02 05:00:00 +0000",
    "2013-01-03 05:00:00 +0000",
    "2013-01-07 05:00:00 +0000",
    "2013-01-10 05:00:00 +0000",
    "2013-01-17 05:00:00 +0000",
    "2013-01-22 05:00:00 +0000",
    "2013-01-27 05:00:00 +0000",
    "2013-01-28 05:00:00 +0000",
    "2013-02-13 05:00:00 +0000",
    "2013-02-14 05:00:00 +0000",
    "2013-02-15 05:00:00 +0000",
    "2013-02-20 05:00:00 +0000",
    "2013-02-21 05:00:00 +0000",
    "2013-02-22 05:00:00 +0000",
    "2013-03-03 05:00:00 +0000",
    "2013-03-04 05:00:00 +0000",
    "2013-03-05 05:00:00 +0000",
    "2013-03-07 05:00:00 +0000",
    "2013-03-14 04:00:00 +0000",
    "2013-03-22 04:00:00 +0000",
    "2013-03-25 04:00:00 +0000",
    "2013-04-03 04:00:00 +0000",
    "2013-04-05 04:00:00 +0000",
    "2013-04-09 04:00:00 +0000",
    "2013-04-10 04:00:00 +0000",
    "2013-04-12 04:00:00 +0000",
    "2013-04-16 04:00:00 +0000",
    "2013-04-17 04:00:00 +0000",
    "2013-04-21 04:00:00 +0000",
    "2013-04-23 04:00:00 +0000",
    "2013-04-24 04:00:00 +0000",
    "2013-04-25 04:00:00 +0000",
    "2013-04-26 04:00:00 +0000",
    "2013-05-01 04:00:00 +0000"
)
kMDItemVersion                 = "10.8"

Share this post


Link to post

Would you mind renaming Byword to something else (completely different) just temporarily to see if that kicks OS X into reindexing it specifically. If that works, try renaming it back to Byword.

 

Done. No change in behavior. First, I ensured the same behavior: Spotlight finds Byword; Alfred2 does not. Then, I rename Byword.

> sudo mv /Applications/Byword.app /Applications/Fornonsense.app

 

Then, I give it ~10 seconds. When I then tried Spotlight, it already was able to find "fornonsense", but Alfred could not. I then issued a "reload" to Alfred. 

 

After the reload, the behavior is the same: Spotlight finds Fornonsense (and still Byword, by the way... presumably from the metadata in the app), but Alfred still cannot. I check the disk for the Alfred cache.

> ls -l ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb
ls: /Users/jajones/Library/Application Support/Alfred 2/filecache.alfdb: No such file or directory

 

The cache is absent, due to the reload of just a couple seconds before. After waiting just a few more seconds, the cache has been rebuilt.

> ls -l ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb
-rw-r--r--  1 jajones  staff  36864 May  1 11:15 /Users/jajones/Library/Application Support/Alfred 2/filecache.alfdb

 

I try again. Spotlight still finds Fornonsense (and Byword), and Alfred still does not. I also try finding other applications that are found by both Spotlight and Alfred, such as 1Password.  I grep the binary SQLite file, and still the same behavior as before.

> grep -i fornonsense ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb 

> grep -i byword ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb 

> grep -i 1pass ~/Library/Application\ Support/Alfred\ 2/filecache.alfdb 
Binary file /Users/jajones/Library/Application Support/Alfred 2/filecache.alfdb matches

Share this post


Link to post

Done. No change in behavior. First, I ensured the same behavior: Spotlight finds Byword; Alfred2 does not. Then, I rename Byword.

> sudo mv /Applications/Byword.app /Applications/Fornonsense.app

 

I have byword installed and byword is found by Spotlight and Alfred, so I'm sure it's not an issue (or nuances) with this particular app.

 

What is of interest is you doing a sudo mv, are the apps owned by a different user or are you running a non admin account or similar?

 

Instead of greping the sqlite, could you open it in sqlite and select everything from the files table to see if there is stuff in there.

Share this post


Link to post

I'm a long time V1 user.  Run it both on a Mac Pro and a Macbook Pro.  After the upgrade to V2, my Mac Pro behaved splendidly.  The Macbook Pro can no longer find numerous Applications.  

 

I've done all the normal clearing, reindexing, etc. with no luck.   Both of these computers use Dropbox sharing of settings, so they should behave the same.  These apps also show find in Spotlight.  

 

Moving the applications doesn't seem to help.  Oddly, it appears that if I delete / download / reinstall these apps fresh, they start showing up.  I'm not sure if this is helpful or not.

Edited by rcw3

Share this post


Link to post

I have byword installed and byword is found by Spotlight and Alfred, so I'm sure it's not an issue (or nuances) with this particular app.

 

Agreed. Further evidence (and confusion) of it not being Byword's fault, is the fact that the set of apps that Alfred finds and doesn't find changes every time that I do a Spotlight reindex. After every Spotlight reindex, Alfred finds (and doesn't find) some subset of all of the apps — but, that subset is different each time. Also, as I said, on a different machine, Alfred finds all of the applications perfectly.

I really do think that this may have something to do with the fact that on this machine /Users is a mounted partition in /etc/fstab. It is just so strange that any apps are found if some are not. I would expect a binary (all or none), deterministic behavior.

 

By the way, I have run disk checks, and they all come up clean.

 

What is of interest is you doing a sudo mv, are the apps owned by a different user or are you running a non admin account or similar?

 

I installed Byword from the Mac App Store, as such, it is owned by root:wheel. If I look at which apps are owned by me versus root, there is no correlation with which Alfred finds. Alfred finds many applications that are owned by root, and also can't find some apps that are owned by me (Path Finder.app is one such example). Also, I am an admin.

But, strangest of all is that Spotlight finds all of them, which is the source of knowledge that Alfred uses.

 

Instead of greping the sqlite, could you open it in sqlite and select everything from the files table to see if there is stuff in there.

 

I'd be happy to run some queries, with your instruction. I am not an expert, but just recognized that the file format is SQLite from looking at the binary disk image: the first few bytes of the file contains "SQLite format 3". Also, running strings on the file reveals many applications that it finds. In addition to being willing to run some queries to help debug, perhaps I could simply add the missing records to the database manually — you would temporarily satisfy me and get me off your back (maybe)  ;) , but the bug will remain and others will report it).

 

 

And, you want to hear something even more crazy? I just discovered that Byword is now found by Alfred! However, there are still applications that it is missing e.g., "5by5.app", "Path Finder.app", "iA Writer.app", "System Preferences.app", "Stickies.app"...

Share this post


Link to post

 And, you want to hear something even more crazy? I just discovered that Byword is now found by Alfred! However, there are still applications that it is missing e.g., "5by5.app", "Path Finder.app", "iA Writer.app", "System Preferences.app", "Stickies.app"...

 

I'd like to get to the bottom of this once and for all... is it ok for me to email you at your registered Powerpack email address? Over the next week, I'd like to create a special build with a tonne of debugging info which will tell us what is actually happening, and if OS X is even returning these apps to Alfred.

 

Cheers,

Andrew

Share this post


Link to post

I'd like to get to the bottom of this once and for all... is it ok for me to email you at your registered Powerpack email address? Over the next week, I'd like to create a special build with a tonne of debugging info which will tell us what is actually happening, and if OS X is even returning these apps to Alfred.

 

I'm game. That's my guess: that OS X is for some reason recognizing them, but not reporting them.

 

I did a reindex last night by turning off Spotlight, then manually removing all of the .Spotlight-V100 directories, then restarting Spotlight. One and a half hours later, I reloaded Alfred. Different apps found, different apps not found with Alfred, but all are found with Spotlight. 

 

Maybe this is a timing-related issue (only so much can be communicated in a limited time frame), or a space-related issue (only so much can be communicated in a single chunk)? Maybe the fact that everything gets hashed different each time ensures that the order in which the files are communicated is different each time?

 

Anyway, yes. That sounds like a good plan. 

Share this post


Link to post

I knew there would be some changes moving to the new version, I didn't expect it to lose its mind... I left the preference for app matching to the recommended "Fuzzy capital letters", my first guess would be that there is a bug in v2 which stops that fuzzy matching after 2 characters - obviously that becomes an issue with applications with more than two words, as in my example above.

 

I've added a ticket, there is a bit of logic which is causing this specific issue. I'll get it fixed in a future release :)

Share this post


Link to post

I've added a ticket, there is a bit of logic which is causing this specific issue. I'll get it fixed in a future release :)

 

Awesome, thanks! :-)

Share this post


Link to post

Just to add another "me too" to the list; exact behaviour described above (some apps found, some not, reindexing does not help, sometimes things change but always some stuff doesn't work). Count me in for the super-debug-enabled build, if you need more data.

Share this post


Link to post

Just to add another "me too" to the list; exact behaviour described above (some apps found, some not, reindexing does not help, sometimes things change but always some stuff doesn't work). Count me in for the super-debug-enabled build, if you need more data.

 

You can update to the 2.0.4 pre-release, which was released last night :) Let us know how it goes.

Share this post


Link to post

2.0.4 still doesn't seem to fix these issues for me.  Another presumably related datapoint:

 

I have a spreadsheet, Rich.numbers.  On my desktop (which works fine), Alfred finds the file instantly and has it at the top of the list after three letters.  On my laptop (the problem child), it doesn't show up, but after about 10-20 seconds (and the CPU spiking), it will finally show up.

 

Again, these two machine's Alfred settings are sync'ed via dropbox and I've done everything on the laundry list of possible resolutions.

Share this post


Link to post

2.0.4 still doesn't seem to fix these issues for me.  Another presumably related datapoint:

 

I have a spreadsheet, Rich.numbers.  On my desktop (which works fine), Alfred finds the file instantly and has it at the top of the list after three letters.  On my laptop (the problem child), it doesn't show up, but after about 10-20 seconds (and the CPU spiking), it will finally show up.

 

Again, these two machine's Alfred settings are sync'ed via dropbox and I've done everything on the laundry list of possible resolutions.

 

it sounds like your OS X's metadata index is broken... the CPU spike suggests metadata corruption.

 

Do you get the same behaviour on a second user account on your Mac?

Share this post


Link to post

I've reindexed many times.   A fresh reindex didn't make any difference.  It's not all files.  It's only some.  Some of these folders are dropbox folders and are symlinked.  Not sure if that makes a difference.  I don't have another account on this box but I can create one and check, although I won't have the vast selection of files to notice the issue.

Share this post


Link to post

I've reindexed many times.   A fresh reindex didn't make any difference.  It's not all files.  It's only some.  Some of these folders are dropbox folders and are symlinked.  Not sure if that makes a difference.  I don't have another account on this box but I can create one and check, although I won't have the vast selection of files to notice the issue.

 

If folders are symlinked, you will need to add the original source of these links into Alfred's search scope (if they are outside of Alfred's scope).

Share this post


Link to post

They should be in search scope - nested a bit deeper of course.  In this example, the file is in ~/Dropbox/Documents (which is also symlinked from ~/Documents).  It's just odd that this only happens on one computer - which is nearly identical in file structure - same symlinks and such and the Dropbox folder is identical... and Alfred should have the same settings.    

Share this post


Link to post

I used activity monitor and my spike in CPU activity must have been a fluke.  I noticed no spike.  Alfred 2 process bumps to about 4% and that's it.

Edited by rcw3

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...