[safaridriver] Safari crashes when visiting URL under test

Navigating to the URL https://www.libertymutual.com through safaridriver causes Safari to crash with an EXC_BAD_ACCESS exception type. This does not happen when navigating to the page on Safari alone and does not happen with other browsers (i.e. chromedriver or geckodriver). This is happening on my machine running macOS Ventura, but is also an issue on machines running Monterey.

The steps to reproduce are simple:

  1. Start safaridriver (i.e. usr/bin/safardriver -p <port>)
  2. Launch a new Safari session through safaridriver with all default capabilities
  3. Send a request to safardriver to navigate to https://www.libertymutual.com

This results in Safari crashing every time, although a crash dialog is not shown each time (I don’t know why that would be the case).

The WebDriver diagnostic logs seem to indicate a 500 error returned from the server, while the crash report indicates an invalid memory access. Both are attached.

Any thoughts on what could cause this issue?

Sequence of commands for the above:

> /usr/bin/safaridriver -p <port>
> curl -X POST --data '{"capabilities":{}}' -v http://localhost:<port>/session

Creating a new session outputs a sessionId, which we can then use to execute the url command with:

curl -X POST --data '{"url": "https://www.libertymutual.com"}' http://localhost:<port>/session/<sessionId>/url

The same error seems to be reported here: https://developer.apple.com/forums/thread/709225

We believe it is triggered by a combination of the "Cross-Origin-Opener-Policy (COOP) header" experimental being enabled in Safari and web response containing a "Cross-Origin-Opener-Policy" header.

Hi, I am also having same issue with one of our company website. Did you manage to get around this? Thanks

Facing same issue. Any update on this?

[safaridriver] Safari crashes when visiting URL under test
 
 
Q