Page 1 of 2

Weird behavior with Hazel, browser-dependent

PostPosted: Thu Feb 20, 2025 5:11 pm
by sfritz313
Over the last couple weeks I've suddenly noticed really odd behavior from Hazel when downloading very specific types of files, under specific circumstances. Basically, I have Hazel watching my Downloads folder, and does the following:

1. Newly downloaded files get marked as "New" and tagged blue.
2. Archives are decompressed.
3. If the resulting folder contains music files, add them to Music.
4. If the files are anything else, just ignore them.
5. Empty folders get trashed, files older than a couple weeks are marked as "Old" with red.

Here's where things get weird: lately if I download something with Firefox, based on what I can see in the logs, Hazel will acknowledge the archive's existence but then silently fail to do anything with it. Occasionally the files get tagged as "New" but other than that, nothing.

If I drag the archive out of the Downloads folder and then back into the Downloads folder, Hazel will work perfectly and unzip/move files/delete empty folders like always.

If I use Safari, everything seems to work perfectly and immediately. (I don't have Chrome so I can't test that.)

The real weirdness is that this only seems to affect archives containing music files. Anything else works perfectly- archives of text files open just fine, images, other data, just fine... only archived music files choke for some reason. Like I said, the logs show that Hazel makes note of the new archives, but then just fails silently. If I do a preview of the rules, everything matches, so I know the rules should work fine... and they were working as far as I can tell until maybe a few weeks ago.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Fri Feb 21, 2025 9:55 am
by Mr_Noodle
Turn on debug logging as described here: https://www.noodlesoft.com/kb/hazel-debug-mode/

After that, send updated logs which should have more info.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Fri Feb 21, 2025 12:26 pm
by sfritz313
OK, downloaded a single music file, then a zip of music from Firefox- the single file was processed, the zip is still sitting in my Downloads folder untouched.

Hazel.log

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Mon Feb 24, 2025 9:37 am
by Mr_Noodle
Logs say the file is busy. Some other app has that file open so you will need to find that and close it there.

EDIT: Actually, I see two similarly named files. Can you turn on debug logging and described here and post new logs? https://www.noodlesoft.com/kb/hazel-debug-mode/

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Mon Feb 24, 2025 4:22 pm
by sfritz313
Huh- that WAS the debug log. I turned on Debug mode, went to Help -> View Logs and saved the log file. Is there a different way to do it? edit- sorry, I saw you said "NEW" logs. I'll download some thing and try again.

Also, for what it's worth, there are no duplicate-named items in my Download folder. At the very least, similarly-named items have a number appended to the filename. And in the case of these archives, I'm not sure why they would be "open" by any other app- they were just downloaded and Hazel is the only app that should be affecting them.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Mon Feb 24, 2025 5:29 pm
by sfritz313
OK so here's a log of Firefox downloading an archive of music (Various Artists - Antihistamine 2024 (HT108).zip):

Hazel(2).log

and for comparison I then downloaded a similar file with Safari (Various Artists - Antihistamine 2023 (HT098).zip):

Hazel(3).log

...not only did Hazel immediately detect, unzip, and move the files from the Safari download, it appeared to completely ignore the Firefox download.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Tue Feb 25, 2025 9:30 am
by Mr_Noodle
Logs are showing that the zip file is corrupted. I suspect this is because the file is being processed before it is fully downloaded.

Is this happening in Firefox's default download folder?

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Tue Feb 25, 2025 9:52 am
by sfritz313
Yes, it's just the standard MacOS Downloads folder.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Wed Feb 26, 2025 11:03 am
by Mr_Noodle
Not the macOS download folder. The one actually set in Firefox.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Thu Feb 27, 2025 3:07 pm
by sfritz313
Yes, I've never changed it. It downloads to the MacOS Downloads folder.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Fri Feb 28, 2025 11:30 am
by Mr_Noodle
Can you try setting it explicitly and seeing if that changes anything?

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Mon Mar 03, 2025 1:04 pm
by sfritz313
OK- explicitly re-set it to "Downloads", tried again, still nothing:

Hazel(4).log

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Tue Mar 04, 2025 9:36 am
by Mr_Noodle
Can you tell me the name of a specific file that exhibits the problem?

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Wed Mar 05, 2025 6:46 pm
by sfritz313
in that particular log file, the archive titled "The Black Dog - Further Vexations (Remastered).zip" downloaded on 3/3/25 exhibited that behavior.

Specifically, in the log file I see:

2025-03-03 12:02:23.671 hazelworker[83226] The Black Dog - Further Vexations (Remastered).zip: Rule Unarchive Downloads matched.

…and yet, that rule doesn't execute at all. The zip file just… sits there.

Re: Weird behavior with Hazel, browser-dependent

PostPosted: Thu Mar 06, 2025 9:17 am
by Mr_Noodle
Again, it's saying that it's not a proper zip file. When this happens, have you tried opening the zip yourself manually?

Can you tell me what the "Newly Added Items" rule does? Does it just tag it or do something else? What if you disable that rule?