Ueli: Error when activating Application Search

Created on 6 Mar 2020  路  26Comments  路  Source: oliverschwendener/ueli

I can not launch any application with Ueli and I get an error when activating or modifying the Application search.

The error:
{ "cmd": "mdfind "kind:apps" | egrep "^\/Applications"", "code": 1, "killed": false, "level": "error", "service": "user-service", "signal": null, "timestamp": "2020-03-06T11:36:49.611Z" }
Bildschirmfoto 2020-03-06 um 12 38 20

I'am using Ueli version 8.5.3 on the latest Mac OS 10.15.3
debug.log

bug

Most helpful comment

@xfirf Did you try adding /System/Applications to the application folders in the settings?

All 26 comments

The bug : You probably might have disabled indexing which this app is using.
https://www.technipages.com/macos-sierra-enable-disable-spotlight

Solution : Try running sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Thank you for that idea but this wasn't the problem. The spotlight-index isn't disabled. I also tried to rebuild the index. Spotlight itself works very good.

What happens if you reset the application search settings to default?

image

The error still remains.

What happens if you remove all folders in the settings?

The error disappears when I delete the last folder path. But it doesn't matter which path I remove last.
And the error does not occur if I disable and enable the plugin when all folders are deleted.

@oliverschwendener I might have found the issue:

I'm running mac OS 10.15.3 and running mdfind kind:apps or mdfind "kind:apps" in the terminal returns nothing, but when I run mdfind kMDItemContentTypeTree=com.apple.application-bundle it seems to return a full list of apps.

@oliverschwendener I might have found the issue:

I'm running mac OS 10.15.3 and running mdfind kind:apps or mdfind "kind:apps" in the terminal returns nothing, but when I run mdfind kMDItemContentTypeTree=com.apple.application-bundle it seems to return a full list of apps.

Yes, same for me!

I麓ve just added the mentioned command in application-searcher.ts in line 39
executeCommandWithOutput(mdfind kMDItemContentTypeTree=com.apple.application-bundle | egrep "${folderRegex}")
that improves the search but still does not show all applications. Outlook is working now but Mail (Apple Mail) is still missing.

Maybe the folderRegex has to be updated too.

@xfirf Did you try adding /System/Applications to the application folders in the settings?

@xfirf Did you try adding /System/Applications to the application folders in the settings?

Ah. Now it麓s working as intended. (with the changed line mentioned above)
Thank you.

@pauLee You still aren't able to find all applictions?

Yes, unfortunately the situation is still the same. I can't find any apps.

But I get another error:
Error: Command failed: mdfind "kind:apps" | egrep "^/Applications|^/System/Library/CoreServices|^/Users/tom/Applications|^/System/Applications/"

When will this fix merged to public and released? The error is thill there on my macOS.
#372

Before I consider #372 to really fix this problem I want to understand why & when the issue occurs. Unfortunately I can't find a pleasing documentation on how to use mdfind correctly.

For me it seems that mdfind "kind:apps" works just fine on macOS 10.14.x. Are you guys (those who experience this issue) using macOS 10.15.x?

Before I consider #372 to really fix this problem I want to understand why & when the issue occurs. Unfortunately I can't find a pleasing documentation on how to use mdfind correctly.

For me it seems that mdfind "kind:apps" works just fine on macOS 10.14.x. Are you guys (those who experience this issue) using macOS 10.15.x?

Yes, I麓m on OSX 10.15.x

Before I consider #372 to really fix this problem I want to understand why & when the issue occurs. Unfortunately I can't find a pleasing documentation on how to use mdfind correctly.

For me it seems that mdfind "kind:apps" works just fine on macOS 10.14.x. Are you guys (those who experience this issue) using macOS 10.15.x?

Yes, I'am on Mac OS 10.15.x too.

Yes, I'am on Mac OS 10.15.x too.

So to me it looks like these are the correct ways to retreive apps:

  • macOS 10.14.x and older: mdfind "kind:apps"
  • macOS 10.15 and newer: mdfind kMDItemContentTypeTree=com.apple.application-bundle

Can you guys confirm this?

mdfind kMDItemContentTypeTree=com.apple.application-bundle
works for me in macOS 10.15.5
mdfind "kind:apps"
didn't work

mdfind kMDItemContentTypeTree=com.apple.application-bundle
works for me in macOS 10.15.5
mdfind "kind:apps"
didn't work

Same for me!

What are you guys getting when executing this: mdfind "kind:preferences" ?

What are you guys getting when executing this: mdfind "kind:preferences" ?

Nothing.

Then this needs to be updated too. But let's create a separate issue for that.

I'm encountering this error on 10.13.6. mdfind "kind:apps" returns nothing, while mdfind kMDItemContentTypeTree=com.apple.application-bundle works as expected and returns a huge list of apps.

I doubt anybody will have the same issue, but I was also having the "mdfind" errors under 10.15. In my case, this is because in System Preferences, under Spotlight, in the "Privacy" tab, I had setup Spotlight to not index a list of directories which ended up containing the applications directory I wanted to have indexed by ueli.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moses-bowman picture moses-bowman  路  3Comments

chrislachance picture chrislachance  路  5Comments

xXKeyleXx picture xXKeyleXx  路  4Comments

pbuw picture pbuw  路  5Comments

walter6469 picture walter6469  路  6Comments