Give a clearer error when Safari Technology Preview isn't installed

Open Beginner friendly
#48,764 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
cli, testing-qa

Research direction

Start in tools/wpt/run.py, especially setup_kwargs where the WptrunError is raised, and trace the Safari runner setup invoked by ./wpt run safari foo. Check how the safaridriver path is determined. Done means a missing Safari Technology Preview installation produces a clear error that identifies the expected application path.

Written by the indexing model from the issue text.

Description

infra priority:backlog wpt wptrunner

By default you get something like:

gsnedders@gsnedders-margot web-platform-tests % ./wpt run safari foo 
/Volumes/gsnedders/projects/wpt/web-platform-tests/_venv3/lib/python3.9/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 3.3.6'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
Traceback (most recent call last):
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/./wpt", line 10, in <module>
    wpt.main()
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/wpt.py", line 233, in main
    rv = script(*args, **kwargs)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/run.py", line 994, in run
    setup_cls, wptrunner_kwargs = setup_wptrunner(venv, **kwargs)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/run.py", line 966, in setup_wptrunner
    setup_cls.setup(kwargs)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/run.py", line 248, in setup
    self.setup_kwargs(kwargs)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/run.py", line 740, in setup_kwargs
    raise WptrunError("Unable to locate safaridriver binary")
tools.wpt.run.WptrunError: Unable to locate safaridriver binary

This is a pretty bad user experience; it's not at all obvious what it was looking for (/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver).

Dominant language
HTML
Stars
6.2k
Forks
3.9k
Avg merge
1d 6h
Merged PRs (30d)
586

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-platform-tests/wpt

All issues in web-platform-tests/wpt

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.