Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safari headless test fails due to non-200 status code in Safari 12 #983

Closed
C-Saunders opened this issue Oct 27, 2018 · 2 comments
Closed

Comments

@C-Saunders
Copy link

(Migrated from rustwasm/wasm-pack#418)

Running cargo test --target wasm32-unknown-unknown with a fresh, unmodified clone of the repository has a failing test in Safari 12.

Running headless tests in Safari with `safaridriver`
driver status: signal: 9
error: non-200 response code: 500
{"value":{"error":"session not created","message":"Request body does not contain required parameter 'capabilities'.","stacktrace":""}}

The issue seems to be that with Safari 12, by default, supports the W3C driver protocol, rather than the Selenium JSON protocol, as described in this Apple documentation.

I made an update that gets this working that you can see in this commit, but am concerned about dropping support for Safari < 12.

Please let me know if you'd like me to open a pull request with the above change, investigate further regarding support for older versions, or any other feedback.

Thanks!

@henriiik
Copy link
Contributor

henriiik commented Oct 28, 2018

I ran into the same problem, it is also possible work around by passing the --legacy flag to safari driver.

ex.

SAFARIDRIVER_ARGS=--legacy cargo test --target wasm32-unknown-unknown

alexcrichton added a commit to alexcrichton/wasm-bindgen that referenced this issue Oct 28, 2018
They've made a few breaking changes in the most recent version, so let's
support that plus the old protocol for now!

Closes rustwasm#983
@alexcrichton
Copy link
Contributor

Thanks for the report and links @C-Saunders! Also thanks for the tip @henriiik, this all makes sense!

I've posted a fix for this at #991 to hopefully enable us to both work in legacy mode and w3c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants