Jump to content

Simple folder search not working


Recommended Posts

When I search for files and folders using a [space] first, I do get search results from my folder 'Mijn bibliotheek'

 

But, when I use my Simple Folder Search workflow [f][space] ... , no results are returned...

 

I have had results from this workflow, but for unclear reasons as described here now they are not.

 

See screenshots. Any help is appreciated.

 

20220106 folders are found with space.jpg

20220106 nothing found with simple folder search.jpg

20220106 simple folder search 1.jpg

20220106 simple folder search 2.jpg

Edited by Koen_73
Link to comment

@Koen_73 Could you drag one of the folders within the relevant search scope to the File Troubleshooting tool? Is the metadata complete?

 

Next, try removing the folder file type so that only the search scope is set in your workflow. The "open" keyword (and spacebar) opens up the search to most file types, so if it's found then but not in your workflow while looking at the same scope, could it be that folders aren't correctly being recognised as folders by macOS?

 

You mentioned in the other thread that sometimes results are found and sometimes not (which I assume you meant while using the same keyword and/or workflows). Is this still happening on your Mac? If so, there's something very strange happening to your underlying metadata, and Alfred is just the app showing you it's happening.

Link to comment

@Vero I've dragged one of the folders from 'Mijn bibliotheek' to the File Troubleshooting tool. See results below:

 

Starting Diagnostics...

File: 'David Allen - GTD Managing Projects (audio)'
Path: '/Users/koenbunders/Mijn bibliotheek'

-----------------------------------------------------------

Check file cache database...

File cache integrity is ok

-----------------------------------------------------------

Check if file is readable...

Alfred has permissions to read this file.

-----------------------------------------------------------

Check if volume '/' is indexed by macOS...

Indexing is enabled on this drive

-----------------------------------------------------------

Check direct file metadata...

Direct metadata available

Display Name: David Allen - GTD Managing Projects (audio)
 Other Names: 
Content Type: public.folder
   Last Used: 

-----------------------------------------------------------

Check mdls file metadata...

Metadata contains required items

_kMDItemDisplayNameWithExtensions      = "David Allen - GTD Managing Projects (audio)"
kMDItemContentCreationDate             = 2014-08-24 16:07:46 +0000
kMDItemContentCreationDate_Ranking     = 2014-08-24 00:00:00 +0000
kMDItemContentModificationDate         = 2021-12-05 14:10:06 +0000
kMDItemContentModificationDate_Ranking = 2021-12-05 00:00:00 +0000
kMDItemContentType                     = "public.folder"
kMDItemContentTypeTree                 = (
    "public.folder",
    "public.directory",
    "public.item"
)
kMDItemDateAdded                       = 2021-12-28 15:24:56 +0000
kMDItemDateAdded_Ranking               = 2021-12-28 00:00:00 +0000
kMDItemDisplayName                     = "David Allen - GTD Managing Projects (audio)"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2021-12-05 14:10:06 +0000
kMDItemFSCreationDate                  = 2014-08-24 16:07:46 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = 0
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = 0
kMDItemFSLabel                         = 0
kMDItemFSName                          = "David Allen - GTD Managing Projects (audio)"
kMDItemFSNodeCount                     = 13
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = 13
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2021-12-05 00:00:00 +0000
kMDItemKind                            = "Folder"

-----------------------------------------------------------

Check file is in search scope...

File exists within Alfred's default search scope

-----------------------------------------------------------

Troubleshooting passed
 

 

You also mentioned:

 

Quote

Next, try removing the folder file type so that only the search scope is set in your workflow. The "open" keyword (and spacebar) opens up the search to most file types, so if it's found then but not in your workflow while looking at the same scope, could it be that folders aren't correctly being recognised as folders by macOS?

 

I'm not sure what you mean. Could you mention the steps that I should follow to 'try removing the folder file type so that only the search scope is set in your workflow'? @Vero?

 

Quote

You mentioned in the other thread that sometimes results are found and sometimes not (which I assume you meant while using the same keyword and/or workflows). Is this still happening on your Mac? If so, there's something very strange happening to your underlying metadata, and Alfred is just the app showing you it's happening.

 

Yes, this is still happening. I think it has to do with mounting / unmounting external drives, but I haven't been able to reproduce yet.

Edited by Koen_73
Link to comment

 

Hoping to get a response to:

 

Quote

I'm not sure what you mean. Could you mention the steps that I should follow to 'try removing the folder file type so that only the search scope is set in your workflow'? @Vero?

 

And regarding the above and what @Vero mentioned below...

 

Quote

You mentioned in the other thread that sometimes results are found and sometimes not (which I assume you meant while using the same keyword and/or workflows). Is this still happening on your Mac? If so, there's something very strange happening to your underlying metadata, and Alfred is just the app showing you it's happening.

 

... I'd like to point out that Spotlight is finding these folders (and files)! So it must be Alfred, I guess?

Link to comment
1 hour ago, Koen_73 said:

... I'd like to point out that Spotlight is finding these folders (and files)! So it must be Alfred, I guess?

 

No, this issue will be caused by using the Migration Assistant, which you confirmed in the previous thread you used to transfer your setup from your previous Mac. Even though not all files were copied from another Mac, the underlying file system structure likely assumes that your user directory setup is identical to the previous Mac when it isn't. This is where the bug in macOS Monterey lies, and all we can do is offer workarounds to the issue caused by Apple.

 

Have you tried following Andrew's suggestion here? Again, it's only a workaround, and the real resolution can only come through either 1. a reinstall of your Mac, or 2. Apple fixing the issue with Migration Assistant retrospectively for users who've already used it.

 

 

Cheers,
Vero

Link to comment

Thanks @Vero. I thought I already completely reinstalled my Mac after I learned the Migration Assistent caused these issues. These are the steps I took:

 

1. Open System Preferences

2. Erase All Content And Settings (from the menu)

 

When the problem kept occurring, I reinstalled MacOS via these steps: https://support.apple.com/en-us/HT204904

 

Did I do something wrong? Please help.

 

Quote

Have you tried following Andrew's suggestion here?

Yes, I have. No solution.

Edited by Koen_73
Link to comment
  • 3 weeks later...

@Koen_73 Could you provide more information as to the current state of your Mac?

 

  • Did you do a full, fresh reinstall of your Mac from scratch? Or did you reinstall on top of the existing OS?
  • Did you migrate any settings from a previous Mac or Time Machine after that?
  • Can Spotlight and Alfred find files? Please provide specific examples including the output from the File Troubleshooter, and let us know exactly what you're typing into Alfred (including any prefixes like the "open" keyword)
  • You said in the past that results appeared and disappeared when using the same keyword. Is this still happening?

 

We can do our best to help you work out the underlying issues in your Mac's index, but keep in mind that these indexing issues are outside of Alfred so I can only guess what's happening in macOS with your specific install.

Link to comment
  • 2 weeks later...

Hi @Vero, sorry for the late reply.

 

Quote
  • Did you do a full, fresh reinstall of your Mac from scratch? Or did you reinstall on top of the existing OS?

I opened 'System Preferences' and selected the menu option 'Erase all Content and Settings'

 

Did you migrate any settings from a previous Mac or Time Machine after that?

 

No.

 

Quote
  • Can Spotlight and Alfred find files? Please provide specific examples including the output from the File Troubleshooter, and let us know exactly what you're typing into Alfred (including any prefixes like the "open" keyword)

 

At this moment both Spotlight and Alfred can find files and folders when I use the "open" keyword. But when I use the Simple Folder Search Workflow "f" space ... it is not finding the folders that I would expect (folders that do show up when I use the "open" keyword).

 

Quote
  • You said in the past that results appeared and disappeared when using the same keyword. Is this still happening?

 

It is still happening every now and then.

 

 

PS. It is interesting... I was experimenting with File Search Raycast. In Raycast you can toggle between search results on 'This Mac' or 'User (me)'. For some reason Raycast is also not finding the folders that I was expecting to find with Afred's Simple Folder Search in the 'User (me)' results, but it does find these when I toggle to 'This Mac'. Apparently, my files are still messed up...

Edited by Koen_73
Added the PS.
Link to comment
  • 2 months later...

@Koen_73 Given your earlier PS addendum saying that your files were messed up, I assumed you were taking the necessary steps to investigate further what's happening on your Mac, given your very minimal response.

 

Could you please provide your Diagnostics file, which you can get by typing "?diagnostics" into Alfred. You can then email it to our info@ address, and I'll take a look.

Link to comment

Here is just another example:

 

I have a folder called 'David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)'

 

When looking at it via the troubleshooter, I get:

 

Starting Diagnostics...

File: 'David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)'
Path: '/Users/koenbunders/Mijn bibliotheek'

-----------------------------------------------------------

Check file cache database...

File cache integrity is ok

-----------------------------------------------------------

Check if file is readable...

Alfred has permissions to read this file.

-----------------------------------------------------------

Check if volume '/' is indexed by macOS...

Indexing is enabled on this drive

-----------------------------------------------------------

Check direct file metadata...

Direct metadata available

Display Name: David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)
 Other Names: 
Content Type: public.folder
   Last Used: 

-----------------------------------------------------------

Check mdls file metadata...

Metadata contains required items

_kMDItemDisplayNameWithExtensions      = "David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)"
kMDItemContentCreationDate             = 2013-07-30 19:54:10 +0000
kMDItemContentCreationDate_Ranking     = 2013-07-30 00:00:00 +0000
kMDItemContentModificationDate         = 2021-12-10 12:06:33 +0000
kMDItemContentModificationDate_Ranking = 2021-12-10 00:00:00 +0000
kMDItemContentType                     = "public.folder"
kMDItemContentTypeTree                 = (
    "public.folder",
    "public.directory",
    "public.item"
)
kMDItemDateAdded                       = 2021-12-28 15:24:56 +0000
kMDItemDateAdded_Ranking               = 2021-12-28 00:00:00 +0000
kMDItemDisplayName                     = "David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)"
kMDItemDocumentIdentifier              = 0
kMDItemFSContentChangeDate             = 2021-12-10 12:06:33 +0000
kMDItemFSCreationDate                  = 2013-07-30 19:54:10 +0000
kMDItemFSCreatorCode                   = ""
kMDItemFSFinderFlags                   = 0
kMDItemFSHasCustomIcon                 = (null)
kMDItemFSInvisible                     = 0
kMDItemFSIsExtensionHidden             = 0
kMDItemFSIsStationery                  = (null)
kMDItemFSLabel                         = 0
kMDItemFSName                          = "David Allen - Ready for Anything; 52 Productivity Principles for Work and Life (audiobook, ebook)"
kMDItemFSNodeCount                     = 43
kMDItemFSOwnerGroupID                  = 20
kMDItemFSOwnerUserID                   = 501
kMDItemFSSize                          = (null)
kMDItemFSTypeCode                      = ""
kMDItemInterestingDate_Ranking         = 2021-12-10 00:00:00 +0000
kMDItemKind                            = "Folder"

-----------------------------------------------------------

Check file is in search scope...

File exists within Alfred's default search scope

-----------------------------------------------------------

Troubleshooting passed

 

When I do a simple folder search 'f ready for anything', I am not getting any results:

image.thumb.jpeg.22e07810de352938cc85768d526da17e.jpeg

When I do a file search via 'SPACE ready for anything' Alfred does find it:

 

image.thumb.jpeg.464196c8f4cf8ad0a42e068415ad8070.jpeg

Isn't that weird?

 

When I do a file search with Raycast I see this (maybe that helps): the folder is not found this user, but it is found on this mac:

 

image.jpeg.b624951c63b37b94a3d4019ecf6d3e98.jpeg

image.jpeg.b2580a0020a38f9bf0c4220042cb57cd.jpeg

Spotlight has no trouble finding it:

 

image.jpeg.54b3da39c13d8f4a781b29784f8b343e.jpeg

Link to comment

@Koen_73 What you're describing perfectly matches the issue here:

https://www.alfredapp.com/help/troubleshooting/indexing/monterey/

 

As per my reply from 7th January, your issue is related to the Migration Assistant bug in macOS, where macOS isn't correctly reporting your Home folder to Alfred and other apps. As such, when no scope is specified (e.g. search the whole Mac), the file is found, but as soon as your home folder IS specified, Apple's metadata index doesn't return any results.

 

Spotlight returns the results because it doesn't specify a search scope and returns results from your whole Mac, regardless of location. 

 

For the vast majority of users who've encountered this since Monterey was released, setting the search scope to / in Default Results is sufficient, but in your case, there seems to be a deeper underlying corruption or inaccuracy in what macOS believes to be your home folder. 

 

At this point, you could try creating a new user account temporarily and see what behaviour you get on that profile; Creating a new user account with no historical data transferred from another Mac may be sufficient to work around that Migration Assistant bug. 

 

Cheers,
Vero

Link to comment
17 minutes ago, Koen_73 said:

So why is Alfred finding it via 'SPACE ready for anything' but not 'f ready for anything'?

 

Using the space prefix searches the entirety of your Mac's search scope (bypassing the home folder bug) while the "f" folder search requires that macOS understands you're searching within your home folder.

 

Apologies for repeating myself but this is a bug in Apple's software in establishing your home folder correctly after moving from one Mac to another. Until that underlying issue is resolved, you'll keep seeing these issues in any app that relies on data being provided by macOS.

 

In your case, reinstalling from fresh and ensuring you do not then use the Migration Assistant to transfer your data to the freshly installed Mac may be the only way to get past it.

Link to comment
  • 2 weeks later...
On 5/5/2022 at 12:50 PM, Vero said:

In your case, reinstalling from fresh and ensuring you do not then use the Migration Assistant to transfer your data to the freshly installed Mac may be the only way to get past it.

 

I asked this before, hope to find an answer. What is the proper way to 'reinstall from fresh'? I tried this before and that didn't help. Maybe I didn't use the correct method.

 

Here is what I did to reinstall from fresh: 

- Created a backup of data on external disk

- Open System Preferences

- Open System Preferences menu

- Select 'Erase All Content and Settings'

- Copy back my data from the external disk

- Reinstall Alfred

- Set up Simple Folder search

- Test again 

 

As mentioned, this didn't resolve the issue. Should I try something else?

Edited by Koen_73
Link to comment
  • 8 months later...

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