Commit 3ba850f
committed
Fix Chrome beta support for NodeChrome
The Dockerfile says Chrome beta is supported:
> can specify versions by CHROME_VERSION;
> e.g. google-chrome-stable=53.0.2785.101-1
> google-chrome-beta=53.0.2785.92-1
But when actually building an image with e.g.
`--build-arg CHROME_VERSION=google-chrome-beta=62.0.3202.29-1`, then a couple
of problems appear. Firstly, the version field in `/opt/selenium/config.json`
will not be populated, because `/opt/google/chrome/chrome` does not exist.
Secondly and even more importantly, the node simply won't work. I assume it's
because `chrome_launcher.sh` tries to execute the nonexistent
`/opt/google/chrome/chrome`, but I haven't confirmed for sure.
This change fixes both of those issues by actually wrapping the existing
executable, instead of replacing it. I have locally tested it by with latest
versions (not specifying any build arguments) and with the latest Chrome beta
version. Both work.
As can be seen from current [Chromium source][1], the wrapping code that was
used in chrome_launcher.sh has changed considerably. This change avoids
duplicating that code here and so makes it impossible for this to get out of
date. In addition, this will work with different Chrome versions which might
have different code in the wrapper.
[1]: https://cs.chromium.org/chromium/src/chrome/installer/linux/common/wrapper1 parent 3fb76ba commit 3ba850f
File tree
4 files changed
+20
-93
lines changed- NodeChrome
4 files changed
+20
-93
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 49 | | |
49 | 50 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments