Execute an AppleScript failed with script error (Not authorised Apple events to Safari)

I use my macro for year and this morning I keep having

KEYBOARD MAESTRO ENGINE 
Macro Cancelled

Execute an AppleScript failed with script error: text-
script:51:57: execution error: Not authorised
Apple events to Safari. (-1743). Macro Show

Screenshot 2021-05-30 at 10.12.09
Screenshot 2021-05-30 at 10.14.56

however Apple events to safari are enable ....

Also when I run the AppleScript using Script editor, it's work just fine, and KM is authorised in accessibility (system preference/Security and Privacy)
Weirdly this morning I have a another app (antidote HD) which keep asking me for authorisation like my system preference/Security and Privacy was reseted after yesterday MacOs update

**“Antidote 8“ wants access to control “app name“. Allowing control will provide access to documents and data in “app name“, and to perform actions within that app.**

If your macro has been working for a long time, and suddenly stops working properly, then you need to examine what has changed since it did work.

See Troubleshooting -- KM Wiki.

Not sure what do to anymore, I removed KM, downloaded a new version and install it, I went through the help assistant and everything.
same script are running perfectly fine using script editor ....
Removed and re added from system preference /Security and Privacy

Hey @lowrisk,

Did you do anything to your system recently that might have caused this?

My best guess is your accessibility permissions got broken somehow, and you need to reenable them.

Just Upgraded to Mojave and Nothing Works -- Solved! - #2 by peternlewis

-Chris

Thanks a million !
to be fair I'm very stupid I looked everywhere but in automation....
anyway that's back to normal thank you again.

1 Like