Unable to Launch Safari Driver

I am encountering an issue where we are unable to run or launch Safari Driver in our automation tests using macOS. When attempting to run safaridriver -p 8888 from the terminal, we receive the following error message:

ERROR: safaridriver could not launch because it is not configured correctly or you need to authenticate. Re-run safaridriver(1) and pass the '--enable' flag to configure and/or authenticate.  
For more information, consult the safaridriver(1) man page.

Despite running sudo safaridriver --enable as an administrator (even as root), the issue persists.

I’ve searched through various online forums and GitHub repositories but couldn’t find a working solution. Some references are:

Apple Developer Forum Thread: https://forums.developer.apple.com/forums/thread/762321

GitHub Issue: https://github.com/SeleniumHQ/selenium/issues/11381

Perhaps Selenium has official guidance on this but its seem to be an environment issue. What version of MacOS?

MacOS version is Sonoma 14.7

Unable to Launch Safari Driver
 
 
Q