Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when activating Application Search #308

Closed
pauLee opened this issue Mar 6, 2020 · 33 comments
Closed

Error when activating Application Search #308

pauLee opened this issue Mar 6, 2020 · 33 comments
Labels

Comments

@pauLee
Copy link

pauLee commented Mar 6, 2020

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

@blmhemu
Copy link

blmhemu commented Mar 7, 2020

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

@pauLee
Copy link
Author

pauLee commented Mar 8, 2020

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.

@oliverschwendener
Copy link
Owner

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

image

@pauLee
Copy link
Author

pauLee commented Mar 19, 2020

The error still remains.

@oliverschwendener
Copy link
Owner

What happens if you remove all folders in the settings?

@pauLee
Copy link
Author

pauLee commented Mar 22, 2020

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.

@dkanas
Copy link

dkanas commented Apr 3, 2020

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

@pauLee
Copy link
Author

pauLee commented Apr 3, 2020

@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!

@xfirf
Copy link

xfirf commented May 6, 2020

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.

@oliverschwendener
Copy link
Owner

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

@xfirf
Copy link

xfirf commented May 6, 2020

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

@oliverschwendener
Copy link
Owner

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

@pauLee
Copy link
Author

pauLee commented May 6, 2020

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/"

@pthoelken
Copy link

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

@oliverschwendener
Copy link
Owner

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?

@xfirf
Copy link

xfirf commented Jun 5, 2020

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

@pauLee
Copy link
Author

pauLee commented Jun 5, 2020

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.

@pthoelken
Copy link

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

@oliverschwendener
Copy link
Owner

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?

@pthoelken
Copy link

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

@pauLee
Copy link
Author

pauLee commented Jun 5, 2020

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

Same for me!

@oliverschwendener
Copy link
Owner

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

@pauLee
Copy link
Author

pauLee commented Jun 5, 2020

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

Nothing.

@oliverschwendener
Copy link
Owner

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

@stefarossi
Copy link

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.

@gregsadetsky
Copy link

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!

@JanKreuzer
Copy link

Im on MacOS 10.14.6 and on Ueli 8.19.0 and in 2022 i still have the same issue

@pthoelken
Copy link

Im on MacOS 10.14.6 and on Ueli 8.19.0 and in 2022 i still have the same issue

Did you try to upgrade macOS to v12?

@JanKreuzer
Copy link

what du you mean with v12? Big Sur?

@pthoelken
Copy link

No. The latest version of macOS (Monterey) ... how old is your macbook?

@JanKreuzer
Copy link

i can not upgrade because i need 32 bit support for work and mac os Mojave is the latest mac os with 32 bit support.

@pthoelken
Copy link

Mojave is EOL by Apple. I don't think that @oliverschwendener supports here for a EOL OS version. Bad situation for you.

@JanKreuzer
Copy link

Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants