PDF matching rule stopped working

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

PDF matching rule stopped working Wed May 13, 2020 11:17 am • by lucaberta
Hi,

I have a rule which has been working flawlessly for years on my MacBook Pro with 10.13.6 and the latest Hazel 4.4.4.

By going into preview mode I could see that the “Author“ field which has been used to match a specific credit card statement stopped working all of a sudden.

What's strange is that the PDF still includes the same Author, and even by once again copying the string from the PDF file not being matched, the rule still wouldn't recognize the correct Author like it always did.

I am at a loss. I can do as much debugging as needed, but the many tests I have done with that PDF and the preview mode are not encouraging.

Any hint?

Thanks,

Luca
lucaberta
 
Posts: 9
Joined: Tue Aug 05, 2014 6:09 am
Location: Lausanne, Switzerland

Re: PDF matching rule stopped working Thu May 14, 2020 9:57 am • by Mr_Noodle
Select the file in Finder and do "Get Info". Do you see the author listed in the "More Info" section? If not, then it would mean Spotlight is not indexing the file. You would need to diagnose your Spotlight installation to see why it isn't doing so.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: PDF matching rule stopped working Tue May 26, 2020 8:51 am • by lucaberta
Mr_Noodle wrote:Select the file in Finder and do "Get Info". Do you see the author listed in the "More Info" section? If not, then it would mean Spotlight is not indexing the file. You would need to diagnose your Spotlight installation to see why it isn't doing so.

Hi Paul,

Yes, I can see all the metadata fine.

Meanwhile, I have updated the machine and it now runs Catalina 10.15.4. And I do have a new issue now, with rules not firing.

I have done more debugging and it turns out that I get a lot of “Could not import text data for file“ and “Could not retrieve metadata for file“ errors.

If I perform a show rule status this is what I get:
Image

I have tried rebuilding the Spotlight index, but this did not fix the issue.

Is there anything that I can to further debug the issue?

Many thanks,

Luca
lucaberta
 
Posts: 9
Joined: Tue Aug 05, 2014 6:09 am
Location: Lausanne, Switzerland

Re: PDF matching rule stopped working Tue May 26, 2020 9:56 am • by Mr_Noodle
Are you sure it's finished indexing? Especially after an OS upgrade, it can take a long time (hours to a day or so).
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: PDF matching rule stopped working Tue May 26, 2020 10:13 am • by lucaberta
Mr_Noodle wrote:Are you sure it's finished indexing? Especially after an OS upgrade, it can take a long time (hours to a day or so).

that I am not sure about.

Is there a way to tell, maybe from the CLI?

At any rate, I have tried a Spotlight search for a file in the same Downloads directory where the rule gives those errors, and the file is found by Spotlight. mdls shows correctly all the metadata.

I am really starting to wonder what my next step would be. I really need that Hazel rule to fire...

Thanks,

Luca
lucaberta
 
Posts: 9
Joined: Tue Aug 05, 2014 6:09 am
Location: Lausanne, Switzerland

Re: PDF matching rule stopped working Wed May 27, 2020 5:10 am • by lucaberta
Quick update on the status, if anyone runs into similar problems.

I let my MacBook Pro running Catalina run for more than 24 hours, and I was pretty sure that the Spotlight indexing would be OK after resetting it completely from the command line with the command:

Code: Select all
sudo mdutil -E /


I was still getting the errors mentioned above, still.

I then exported the rules, deleted the Downloads folder in Hazel, readded it and applied the same rules, and while I have still received many errors, the file I was looking forward to trigger a rule this time triggered the rule, was renamed and moved where it should have been.

Still, the other files in the Downloads folder were showing the error. Bizarre.

I ended up putting all the files in a new temporary Downloads folder, and created a new empty Downloads folder, let's see what happens in the future.

At least I got partial resolution to the issue!

Many thanks,

Luca
lucaberta
 
Posts: 9
Joined: Tue Aug 05, 2014 6:09 am
Location: Lausanne, Switzerland


Return to Support