Skip to content

Commit 1d97a92

Browse files
marsjoshwlewis
andauthored
Migration guide (#12)
* Migration guide * Improve & fix typos in README Co-authored-by: Josh W Lewis <[email protected]> --------- Co-authored-by: Josh W Lewis <[email protected]>
1 parent 96a6201 commit 1d97a92

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,35 @@ In summer 2023, the Chrome development team [addressed a long-standing problem w
99
## Installation
1010

1111
> [!IMPORTANT]
12-
> If migrating from a previous Chrome-chromedriver installation, then remove any pre-existing Chrome or Chromedriver buildpacks from the app.
12+
> If migrating from a previous Chrome-chromedriver installation, then remove any pre-existing Chrome or Chromedriver buildpacks from the app. See the [migration guide](#migrating-from-separate-buildpacks).
1313
1414
```bash
1515
heroku buildpacks:add -i 1 heroku-community/chrome-for-testing
1616
```
1717

1818
Deploy the app to install Chrome for Testing. 🚀
1919

20+
## Selecting the Chrome Release Channel
21+
22+
By default, this buildpack will download the latest `Stable` release, which is provided
23+
by [Google](https://googlechromelabs.github.io/chrome-for-testing/).
24+
25+
You can control the channel of the release by setting the `GOOGLE_CHROME_CHANNEL`
26+
config variable to `Stable`, `Beta`, `Dev`, or `Canary`, and then deploy/build the app.
27+
28+
## Migrating from Separate Buildpacks
29+
30+
### Remove Existing Installations
31+
32+
When an app already uses the separate Chrome & Chromedriver buildpacks, remove them from the app, before adding this one:
33+
34+
```
35+
heroku buildpacks:remove heroku/google-chrome
36+
heroku buildpacks:remove heroku/chromedriver
37+
38+
heroku buildpacks:add -i 1 heroku-community/chrome-for-testing
39+
```
40+
2041
### Path to Installed Executables
2142

2243
After being installed by this buildpack, `chrome` & `chromedriver` are set in the `PATH` of dynos.
@@ -33,13 +54,21 @@ $ which chromedriver
3354

3455
These locations may change in future versions of this buildpack, so please allow the operating system to resolve their locations from `PATH`, if possible.
3556

36-
## Selecting the Chrome Release Channel
57+
### Changes to Command Flags
3758

38-
By default, this buildpack will download the latest `Stable` release, which is provided
39-
by [Google](https://googlechromelabs.github.io/chrome-for-testing/).
59+
The prior `heroku/google-chrome` buildpack wrapped the `chrome` command with default flags using a shim script. This is no longer implemented for `chrome` in this buildpack, to support evolving changes to the Chrome for Testing flags, such as the [--headless=new variation](https://developer.chrome.com/docs/chromium/new-headless).
4060

41-
You can control the channel of the release by setting the `GOOGLE_CHROME_CHANNEL`
42-
config variable to `Stable`, `Beta`, `Dev`, or `Canary`, and then deploy/build the app.
61+
Depending on how an app is already setup for testing with Chrome, it may not require any changes.
62+
63+
**If the app fails to start Chrome**, please ensure that the following argument flags are set wherever `chrome` is invoked:
64+
65+
* `--headless`
66+
* `--no-sandbox`
67+
68+
Some use-cases may require these flags too:
69+
70+
* `--disable-gpu`
71+
* `--remote-debugging-port=9222`
4372

4473
## Releasing a new version
4574

0 commit comments

Comments
 (0)