Remove Duplicate Messages script

I have many duplicate messages that I imported in EagleFiler.
I used “Remove Duplicate Messages” script but for long mailboxes (several thousands of emails) the script is aborting (too long delay).
Maybe it is linked to a specific config of my Mac, but maybe not …
Any idea ?
thés

How large (in MB) is the mailbox that you selected? How long did it take before the script aborted? It should wait at least 60 minutes. You can increase the time by changing the first “60” in the line below.

with timeout of 60 * 60 seconds
    do shell script _script
end timeout

similar issue
i’m having this issue too.

about a 70MB mailbox, 18k messages

i increased the timeout to 360000 seconds just to be super safe but its timing out way before that. is there some kinda system default timeout that’s getting triggered somehow?

error message i got was “error “AppleEvent timed out.” number -1712”

That’s strange, since it’s not a very big mailbox. Could you send me the script you’re using so that I can check it? If you run it from Script Editor, which line of the script does it report the error at?

Thanks for sending that information. The fact that Script Editor is selecting the “display alert” line seems to indicate that it timed out showing you an error message, after finishing the actual work of removing duplicates. What happens if you stay at the Mac while the script is running? Hopefully you will be able to see the error that’s reported. It should also be opening the error log in the Console app. Is that happening?