Docker-selenium: Debug images don't support multiple space-separated options in JAVA_OPTS and SE_OPTS

Created on 18 Apr 2016  路  7Comments  路  Source: SeleniumHQ/docker-selenium

The Chrome and Firefox debug images contain an entry_point.sh with some inline execution code that reads and passes on environment variables to the xvfb-run process. This code breaks when SE_OPTS or JAVA_OPTS contains multiple configuration options separated by spaces.

It looks like this fixes the problem:

``` 33,34c33,34
< sudo -E -i -u seluser \
< $(for E in $(grep -vxFf asseluser asroot); do echo $E=$(eval echo \$$E); done) \


eval sudo -E -i -u seluser \
$(for E in $(grep -vxFf asseluser asroot); do echo $E=\"$(eval echo \$$E)\"; done) \
36c36
< xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \


xvfb-run --server-args=\"$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR\" \
```

All 7 comments

It works perfectly @ondrej 驴do you have considered to make a Pull Request to fix that?

I've also run into this problem.

appending selenium options: -trustAllSSLCertificates -timeout 180
Waiting xvfb...
-bash: 180: command not found

:(

I still got some problems using this patch with the following environment variable:

no_proxy=*.local, 169.254/16

I made a PR (#316) that handles this too.

Seem to have a related problem @stigkj
The PR only appears to have went into the standalone images, is there a reason for that ?

docker run -d -P -p 5900:5900 --expose 5590 -e HUB_PORT_4444_TCP_ADDR=X.X.X.X -e HUB_PORT_4444_TCP_PORT=4444 -e SE_OPTS='-host 1.2.3.4 -port 5590' -e 'SCREEN_WIDTH=1920' -e 'SCREEN_HEIGHT=1080' selenium/node-chrome-debug:3.0.1-aluminum

When I run the above docker logs show:

Waiting xvfb...
-bash: 1.2.3.4: command not found
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...
Waiting xvfb...

After a couple of seconds the container fails and disconnects.

+1

This was solved with #459, which was merged and released, this issue can be closed.

@diemol Thanks for following up on these

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peterstory picture peterstory  路  4Comments

Bernardoow picture Bernardoow  路  4Comments

rosskevin picture rosskevin  路  5Comments

minhnguyenvan95 picture minhnguyenvan95  路  5Comments

testphreak picture testphreak  路  3Comments