Commit 02153b8
Fix code.pyret.org CI: use chrome-for-testing chromedriver directly
Joe says: npm finally updated enough that we got bit by a configuration
warning I should have fixed a while ago
Claude says:
The Selenium tests were all failing with "Server terminated early with
status 1". The cause was the chromedriver binary install, not Selenium:
selenium-webdriver 3.6.0 launches chromedriver 149 and creates a W3C
session fine. That error is what Selenium reports when the `chromedrive
npm package's launcher shim can't start its real binary.
The binary wasn't installing correctly because the install relied on
`npm install chromedriver --chromedriver_filepath=...`, which npm 11 no
flags as an unknown config that "will stop working", and because the
`chromedriver` npm package is pinned to 146 while Chrome is auto-fetche
at latest-stable (149).
chrome-for-testing already ships a chromedriver matching the Chrome we
download, so use it directly:
- Workflow: unzip the chromedriver from the same release and export
CHROMEDRIVER_BINARY; drop the npm chromedriver-install step entirely.
- util.js: CHROMEDRIVER_BINARY and GOOGLE_CHROME_BINARY were mutually
exclusive (if/else if), so selecting a driver binary left Chrome's
location unset. Make them independent.
Driver and browser now always come from the same release, with no
deprecated npm flag. Verified locally with Chrome+chromedriver 149 and
selenium-webdriver 3.6.0: a real headless session loads a page.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6f77135 commit 02153b8
2 files changed
Lines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
0 commit comments