Jump to content

Alfred file search issues on macOS 10.13 High Sierra [Apple Bugs Fixed + Improvements in 3.6 b893 pre-release]


Andrew

Recommended Posts

UPDATE NOTE:

The macOS bug report for (1) below has been closed by Apple, so this should now be fixed if you update to macOS 10.13.2. This should also improve the behaviour for (2) without the need for the beta build below.

 

Users are also reporting that Apple's fix has also fixed (3).

 


 

This thread is a consolidation of other threads on the forum to try and group this issue, and get feedback in a single place.

 

There have been a handful of users reporting file search issues on macOS 10.13 High Sierra. While this isn't a widespread issue, and I've been unable to reproduce these issues, I am actively trying to get to the bottom of the issues to nip them in the bud.

 

Note: I have also raised some bug reports to Apple to get the underlying issues fixed.

 


 

1. Metadata API crash [Rare]:

 

There have been a couple of instances where the Apple metadata API has crashed on its own thread which has caused Alfred to quit unexpectedly. This only happens for specific typed queries or characters into Alfred. It looks like the API is modifying an object after releasing it while collecting results.

 

Workaround:

 

A full reindex of the metadata (using the Rebuild Metadata shortcut in Alfred's Advanced preferences, selecting to delete the /.Spotlight-V100 folder) seems to temporarily resolve the issue.

 

A more robust workaround seems to be clearing out Alfred's Features > Default Results > Search Scope, including unchecking the "Include folders in Home" option, and only adding back the absolutely necessary folders. This may be avoiding files which are upsetting the metadata API.

 

Fix:

 

I'm in the process of moving the metadata querying to an XPC service to run as an Alfred plugin. This means that if the metadata engine crashes, only the plugin will crash (then restart automatically), and Alfred will continue to operate. This essentially downgrades this issue from a crash to "certain typed queries don't return results".

 

I've also reported this to Apple for a proper fix, using the crash logs provided by a couple of Alfred users.

 


 

2. Metadata API temporary hang [Rare]:

 

There have been a couple of instances where a call on the Apple metadata API has been temporarily blocked (while possibly waiting on resources). As results are processed on Alfred's event thread, this is causing Alfred to hang temporarily. It seems to manifest more prominently when a Mac has been cold booted, and clear up after a few minutes.

 

Workaround:

 

Same as workaround for (1) above. Also see Fix (with caveat):

 

Fix:

 

I've moved the metadata query to its own sequential operation queue. This means that the results are processed away from Alfred's main thread before being passed back to the main thread. When a hang occurs, this will temporarily block Alfred from receiving further file results until it unblocks, but this won't now stop you from using Alfred.

 

Grab the beta build below to try this out!

 


 

3. Metadata matching and result ordering [Infrequent]:

 

This has been reported a little more on the forum, and seems to be an issue with how the Apple Metadata API is returning the default results to Alfred for specific queries. Before 10.13, results were correctly returned to Alfred with the more recent ones first, and this continues to be the case for the majority of users. Once results are within Alfred, Alfred uses his own knowledge to sort the most relevant ones to the top based on your usage.

 

As Alfred only requests a finite number of results, if more recent files aren't being returned by default, naturally, Alfred doesn't show them as he doesn't even know they are matched for the typed query, and this is why users are only seeing these files when a more specific query is typed.

 

Fix:

 

I've updated the way Alfred crafts queries to the metadata API to ensure that the most relevant files are always returned. This should provide an overall improvement to Alfred's default results. Early benchmarks show that this has a negligible effect on file search results performance, but on slower Macs, or Macs with malfunctioning metadata, there may be a small performance hit.

 

Grab the beta build below to try this out!

 


 

BETA BUILD...

 

Please only take this beta build if you are experiencing these issues, as it's an internal development build, and hasn't been generally tested yet.

 

Note: This build is no longer needed with macOS 10.13.2 which includes bug fixes to their metadata API.

Also, please update to the 3.6 pre-release which contains file search behavioural improvements

 

You can go back to the previous build at any point by downloading it from our website.


Cheers,

Andrew

Link to comment
Share on other sites

  • Andrew unpinned this topic

@Andrew, thanks for working on this so quickly.

 

I have the 3rd issue from your post.

 

I have since reverted back to Yosemite, but moved my High Sierra system to external drive. I've rebooted to High Sierra and installed the beta build. After a few quick tests I can confirm that it works. You're fast! :)

 

But I have a feeling that the performance is slower. When you start typing your query, there's a 1-2 seconds lag (it says something along the lines of Waiting for search results...). The stable build doesn't have that lag.

Edited by bjelakrez
Link to comment
Share on other sites

Note added December 14th:  After the latest MacOS update (10.13.2), everything now works like before.  The problem was therefore definitely with the initial High Sierra versions.  Thanks again for a great tool!

 

 

 

I've had some of those issues ever since I upgraded to High Sierra.  Contacted this forum on November 16th and was told to Clear Application Cache and rebuild macOSMetadata (checking Delete /.Spotlight-V100), but unfortunately it still did not work as before.  I frequently use directory "2017" and all of a sudden Alfred would not find it (but that was the first one at the top of the list before).  I just tried the latest (beta) version of Alfred, and now Open File does not seem to be available at all.  I've been using the shortcut as before (Alt-Space, then Space).  I've rebuilt again the macOS Metadata, but to no avail.  I do see that spotlight finds the "2017" directory, but unfortunately that doesn't seem to affect Alfred.  Included are a screenshot of Spotlight (with a search on "2017"), as well as a screenshot of Alfred (same search, on "2017").

 

I suppose the problem lies somewhere in the spotlight database or its access, since the problem started with the OS update...

 

I really appreciate Alfred, it's been an incredible tool for me!  Thanks a lot for that great piece of software!

2017-12-01_13-04-29.jpg

2017-12-01_08-40-14.jpg

Edited by FGM
New info
Link to comment
Share on other sites

  • Andrew changed the title to Alfred file search issues on macOS 10.13 High Sierra [Apple Bugs Fixed + Improvements in 3.6 b893 pre-release]

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