Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox Browser is Crashing frequently for both latest and previous version #397

Closed
jbontech opened this issue Feb 22, 2017 · 38 comments
Closed

Comments

@jbontech
Copy link

Meta -

Image(s): selenium/node-firefox
Docker Version: 1.12.6
OS: RHEL 7

Expected Behavior -

we are running selenium test scripts for our internal application testing, we start looking to feasibility of run nodes in the docker containers instead of VMs, we configured and we running the test cases in normal case everything working, we try to execute series it should give the result with a screenshrtst.

Actual Behavior -

Instead of that browser tab is crashing again and again, we tried with old version of firefox also but still,
browser tab getting crashed.
Uploading firefox_crashing.png…

So we diced to check with Debug image, please find the attachment for screen shot.

Error logs of the node:

For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: '83f5c427733e', ip: '172.17.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.22.2.el7.x86_64', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, marionette=true, firefoxOptions={args=[], profile=UEsDBBQACAgIAGxVVUoAAAAAAAAAAAAAAAAHAAAAdXNlci5qc51WTW/bMAy971cMOW3AKqTretlOXdcBA4Z1aFDsKMgSbauRJU0fcfPvR/mjSRNHbndKbJMS+fj4yOjBUeugfLconGnxiXhWQvdf6oo0TLXMAQHNCgVi8eFtyZSH91/exJ2nYAFtrHEhudTAVKj7Z4JGG8ln/DWE1rg1qUOwxNbS19uz9Nky788U6CrU6Pjx8vK52xiwAybwR0AAHkB8l86HK4yFK0C34OJhuKbBvB4pr51pgHrupA3URU2DbJLLxXL6osAKTxAOfauvlfEwnc1oLUyrlWEC79KsSsDWpv1Tg14hWgmpaXeLQdng02W0MYKpGexhE4xRnoBzxnGjvVH7cB+n72WljUbUGmgKcKvu0edz8eC9RKtgkAsOfETcSgyUcsd8nfdVUq+JsaApPAZwmqlUzFczqExlvYt6+rIWCuHkBp8Z54DljBoz90gHysEFP4nEU6Wkt4ptQdycL1e/DDInlfbTtDG+Erf6j9RYX3++JBIvMvd3P9FjwQoTw+dCMb1eHHOuT4gypeiDRzBSnLKH/ji2RysRbrQlbS0DKOkDHvA3SneKCYkGaxnI0E0j6zC5xIUsAIphYbAB8lTzibfRkhq7xuLZtAXFUwdFl0q6OEg5VVt3rCHRYoGBaIS23N6jyat1JNrUSjfZ8IBHJ8MWmaIA/xEfnOSBGicrqak1SvJtnqoaWmw7MuSTqeazQPuTSXq5ikUju1b53b286sj4Mt2cPCab8VN3DoVJRUHLE+q160NMs+34e9yIpizRDs6YtZ4g+0xLiy0VULKowrScjLBzbwf+TEd7zIcs20Y6I/dRqYLbkl4ZO/uPc7bZo0dEbu5/XpELwnZFOk7vgW1YPyGyonpYirFH8jw6jtvBQzfEspf0NE3H5/PcQ5zFYL71SrDiSIIkOufLUxran0o1C/hIYQN6RkH3JuMtMmw2nEIZvu407UWF8sAcrwfazE3dhvTkJiI2Nls0JPmLqPiMLwYBclJMC+qRBh2Kz8X05tOL9dnYfciiEGdG8mB7QlmGFWd+t9kbnL4b67vBiQoUO6nOIpeYNR3EXuuYftJ1K9APfd1vKSeXs2Fk0U6sBMKoK5rkf4YkNeC05DXw9bder772X14/zQgTQqaI2cwgmNyZ/3dXVqaq0sthictK/14vdRlfozRitxZSJfZpWdVBnRh2e67jjf+jbHRsBNLgWtgRcZFWSQcHGO02mbR5IrFxf5xZZXZ9r0ofbb8B7JaMf1BLBwh1hce1pQMAALUMAABQSwECFAAUAAgICABsVVVKdYXHtaUDAAC1DAAABwAAAAAAAAAAAAAAAAAAAAAAdXNlci5qc1BLBQYAAAAAAQABADUAAADaAwAAAAA=}, appBuildId=20161208153507, version=, platform=LINUX, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=509, browserVersion=50.1.0, platformVersion=3.10.0-327.22.2.el7.x86_64, XULappId={ec8030f7-c20a-464f-9b0e-13a3a9e97384}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=linux, firefox_profile=UEsDBBQACAgIAPiCVUoAAAAAAAAAA...}]
Session ID: fab6dfaf-6b3b-42d0-bb2e-9adfcd2955ed
*** Element info: {Using=xpath, value=//span[@id="lblSession"]}
10:50:00.605 INFO - Executing: [find element: By.xpath: //span[@id="lblSession"]])
10:50:01.260 INFO - Done: [find element: By.xpath: //span[@id="lblSession"]]
10:50:01.556 INFO - Executing: [get element attribute: 23 [[FirefoxDriver: firefox on LINUX (fab6dfaf-6b3b-42d0-bb2e-9adfcd2955ed)] -> xpath: //span[@id="lblSession"]], textContent])
10:50:02.420 INFO - Done: [get element attribute: 23 [[FirefoxDriver: firefox on LINUX (fab6dfaf-6b3b-42d0-bb2e-9adfcd2955ed)] -> xpath: //span[@id="lblSession"]], textContent]
10:50:02.742 INFO - Executing: [get element attribute: 23 [[FirefoxDriver: firefox on LINUX (fab6dfaf-6b3b-42d0-bb2e-9adfcd2955ed)] -> xpath: //span[@id="lblSession"]], textContent])
[Parent 509] WARNING: pipe error (37): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 320
[Parent 509] WARNING: pipe error: Broken pipe: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 684
[Parent 509] WARNING: pipe error (45): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 320
[Parent 509] WARNING: pipe error (44): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 320

###!!! [Parent][MessageChannel] Error: (msgtype=0x2E007D,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
@cvakiitho
Copy link
Contributor

I believe it is connected to this underlying geckodriver issue:
mozilla/geckodriver#285

@cladera
Copy link

cladera commented Feb 28, 2017

I think we may be encountering the same error.

We run CI builds using a custom docker image which starts from StandaloneFirefox node.

Our firefox tests builds fail randomly because firefox crashes and (in our case) karma disconnects from the browser.

We are facing this issue since Firefox v51.0.

@pierre-jenchen
Copy link

As pointed out before it seems to be an issue with the geckodriver. I could solve it by using an older firefox image.

@cvakiitho
Copy link
Contributor

@pierre-jenchen Do you know when releases are made? I read somewhere that FF 52 should possibly fix this issue.

@pierre-jenchen
Copy link

Last week according to https://wiki.mozilla.org/RapidRelease/Calendar .

@cvakiitho
Copy link
Contributor

Yeah I know, but when will be new docker selenium release.

@pierre-jenchen
Copy link

I have no clue. Sorry.

@ghost
Copy link

ghost commented Mar 21, 2017

@pierre-jenchen @cvakiitho @oliyavan

It seems that the issue is related to some missing dependencies for the version of Firefox lower than the 52 such as what @awilkins says in the issue #415

On my side I have fixed it for Firefox 52 - 51.0.1 using a custom image that can be found here

I am working on a proper solution for issuing a PR for fixing this issue.

On another hand, my machines are working properly as soon as you don't have to use basic authentication. If so it crashes quite often.

I have tried to limit the amount of crash using a specific profile but it doesn't seem to be efficient. When trying on a real browser it works. Any clue?

@cvakiitho
Copy link
Contributor

Finally got some time to test it out, it didn't help in our case.

For me, it is probably execute script that crashes firefox, no idea why there are some chromium files in log:

firefox_5  | 11:29:19.578 INFO - Executing: [execute script: return something, []])
firefox_5  | 11:29:19.864 INFO - Done: [execute script: return something, []]
firefox_5  | 11:29:19.916 INFO - Executing: [find elements: By.xpath: //div[@id='canvas']//div[contains(@id,'busyIndicator')]])
firefox_5  | 11:29:19.950 INFO - Done: [find elements: By.xpath: //div[@id='canvas']//div[contains(@id,'busyIndicator')]]
firefox_5  | 11:29:19.999 INFO - Executing: [is displayed: 4 [[FirefoxDriver: firefox on ANY (9e6e41e7-8001-4d3e-9dac-fc56379556f1)] -> xpath: //div[@id='canvas']//div[contains(@id,'busyIndicator')]]])
firefox_5  | 11:29:20.096 INFO - Done: [is displayed: 4 [[FirefoxDriver: firefox on ANY (9e6e41e7-8001-4d3e-9dac-fc56379556f1)] -> xpath: //div[@id='canvas']//div[contains(@id,'busyIndicator')]]]
firefox_5  | 11:29:20.352 INFO - Executing: [find elements: By.xpath: //div[@id='canvas']//div[contains(@id,'busyIndicator')]])
firefox_5  | [Parent 75] WARNING: pipe error (54): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
firefox_5  | [Parent 75] WARNING: pipe error: Broken pipe: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 685
firefox_5  | [Parent 75] WARNING: pipe error: Broken pipe: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 685
firefox_5  | [Parent 75] WARNING: pipe error (48): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
firefox_5  | [Parent 75] WARNING: pipe error (45): Connection reset by peer: file /builds/slave/m-rel-l64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322
firefox_5  |
firefox_5  | ###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
firefox_5  |
firefox_5  |
firefox_5  | ###!!! [Parent][MessageChannel] Error: (msgtype=0x400003,name=PCompositorBridge::Msg_DidComposite) Channel error: cannot send/recv

@ghost
Copy link

ghost commented Mar 23, 2017

@cvakiitho : it doesn't work with the 52.0 or 51.0.1? I still have some crash on my side but it looks like being thrown because of the error happening on my site.

A solution might be to play with the profile for avoiding such a crash

@cvakiitho
Copy link
Contributor

cvakiitho commented Mar 23, 2017

@JackTheRipper 52 I used your image.

@ghost
Copy link

ghost commented Mar 23, 2017

@cvakiitho could you provide a full stack trace with a URL for performing tests on my side?

@ghost
Copy link

ghost commented Mar 23, 2017

My tests are passing on both versions as soon as I am not using basic authentication

@cvakiitho
Copy link
Contributor

@JackTheRipper
Ouch, my bad, we have basic http auth in our app as well.
I missed it because it is quite huge test suite, with big setup/teardown.

@ghost
Copy link

ghost commented Mar 23, 2017

@cvakiitho normally it should be fixed by upgrading the base image to the selenium webdriver v3.3+
(#420) and upgrading the GeckoDriver to the version 0.15.0

@ghost
Copy link

ghost commented Mar 23, 2017

@cvakiitho I have just tried out with the Geckodriver 0.15.0 and the webdriver v3.3.1. No crashes.
But the authentication modal is triggered in any case xD

(the trick without '/' at the end of the URL doesn't work anymore --')

@ddavison
Copy link
Member

sounds like this is a geckodriver issue?

@ghost
Copy link

ghost commented Mar 23, 2017

@ddavison Following what we said yesterday and what I have experienced today I am going to perform the following tests:

  • Firefox 52 - Webdriver 3.1 - Gecko Driver 0.14 (without my modifications from the pr 148)

  • Firefox 51.0.1 - Webdriver 3.1 - Gecko Driver 0.14 (without my modifications from the pr 148)

  • Firefox 52 - Webdriver 3.1 - Gecko Driver 0.14 (with my modifications from the pr 148)

  • Firefox 51.0.1 - Webdriver 3.1 - Gecko Driver 0.14 (with my modifications from the pr 148)

I don't think that the issue is only related to the Gecko Driver.

But before arguing, let's wait for the result of my tests.

ETA: Sunday 26th of March

@ghost
Copy link

ghost commented Mar 26, 2017

@ddavison : please find the tests and their result with and without my PR: https://gist.github.com/jackTheRipper/af09b57f7308b6f0c9983ed19615405c

Here is tested the version 51.0.1 (the main issue). The tests for the 52 aren't relevant since my if doesn't add packages for this version and higher.

@ghost
Copy link

ghost commented Mar 29, 2017

@cvakiitho : we found the trick for the basic authentication.

Trying to run the test against https://username:[email protected]/ fails.

However if you request the same domain name by targeting your entry file (e.g.: https://username:[email protected]/index.html) it works.

So yes this bug for the basic authentication is related to the Geckodriver such as what @ddavison said.

But the issue with the Firefox version lower than 52 has nothing to see with the Geckodriver (see my gist).

@brandomr
Copy link

brandomr commented Apr 4, 2017

Any update on this? I'm experiencing this issue with the latest docker image and am not sure if there is a solution based on @JackTheRipper 's testing.

@ghost
Copy link

ghost commented Apr 4, 2017

Hi @brandomr my testings (available in the gist I shared earlier) are showing that with my PR it works :)

Feel free to give it a try. Let me know if you have an issue (if you could provide the logs it would be lovely).

@brandomr
Copy link

brandomr commented Apr 4, 2017

@JackTheRipper great I'll give it a shot. Thanks!

@brandomr
Copy link

brandomr commented Apr 4, 2017

@JackTheRipper I built from your PR but still get crashes with standalone-firefox. Is it just fixed for node-firefox?

@ghost
Copy link

ghost commented Apr 5, 2017

@brandomr : I am using currently this node: https://hub.docker.com/r/travix/selenium-node-firefox/

I don't have any issues with my testing environment for now.

@brandomr
Copy link

brandomr commented Apr 5, 2017

Ok, I'll give that a shot. Thanks!

@cvakiitho
Copy link
Contributor

@JackTheRipper I personally have the issue even on your image.

I thought it has something to do with our network ( corp proxy, dns,...), but https://github.com/elgalu/docker-selenium image is working fine.

@cvakiitho
Copy link
Contributor

cvakiitho commented May 5, 2017

Taking back my previous statement, I was just lucky with some tests.

However, i built 54 beta firefox in this image : https://hub.docker.com/r/cvakiitho/docker-selenium/
And so far ( 50+ tests) it works without issue, so feel free to use it.

@peterstory
Copy link

I had this issue, and the fix was to do the same shared-memory mapping that this project's README recommends for Chrome. The README should be updated to recommend the same practice for Firefox!
mozilla/geckodriver#285

services:
  firefox:
    image: "selenium/node-firefox-debug:3.3"
    environment:
      HUB_PORT_4444_TCP_ADDR: selenium-hub
      HUB_PORT_4444_TCP_PORT: 4444
      HUB_ENV_no_proxy:
    volumes:
      - "/dev/shm:/dev/shm"

@cvakiitho
Copy link
Contributor

cvakiitho commented May 12, 2017

As suggested later in geckodriver bug shm-size 2g is better, so I created PR:
#485

@amirplanet
Copy link

@cvakiitho I actually used your image (cvakiitho/docker-selenium) until now and it worked like a charm, no crashes. However this image disappeared today?

I found cvakiitho/firefox instead, however it is broken:

2017-09-19T13:49:57.740540000Z /opt/bin/entry_point.sh: line 4: /opt/bin/generate_config: No such file or directory 2017-09-19T13:49:58.033121000Z Exception in thread "main" java.lang.IllegalStateException: Not a JSON Object: null 2017-09-19T13:49:58.033397000Z at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90) 2017-09-19T13:49:58.033620000Z at org.openqa.grid.common.JSONConfigurationUtils.loadJSON(JSONConfigurationUtils.java:79) 2017-09-19T13:49:58.033916000Z at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:421) 2017-09-19T13:49:58.034126000Z at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:271) 2017-09-19T13:49:58.034339000Z at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155) 2017-09-19T13:49:58.034562000Z at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)

@cvakiitho
Copy link
Contributor

cvakiitho commented Sep 19, 2017

@amirplanet Ouch, I deleted it today during a cleanup - because after the merge of a PR I made I just used normal selenium/node-firefox:3.4.0 .

docker run -d -p 4444:4444 --shm-size 2g selenium/standalone-firefox:3.4.0

or in docker-compose

firefox:
  image: selenium/node-firefox:3.4.0
  links: [hub]
  shm_size: 2g

@amirplanet
Copy link

@cvakiitho cool I will try that.
Are you going to keep cvakiitho/firefox? So far only cvakiitho/firefox:3.5.3 works, latest is broken with the error code I pasted above

@cvakiitho
Copy link
Contributor

@amirplanet cvakiitho/firefox:3.5.3 is actually FROM selenium/node-base:3.4.0-chromium

see why I need to do a cleanup? :) , but I'll keep it if you want it :)

cvakiitho/firefox:latest will be nightly channel after docker hub starts building my queue :
#470

@amirplanet
Copy link

@cvakiitho regarding what you wrote: 'docker run -d -p 4444:4444 --shm-size 2g selenium/standalone-firefox:3.4.0, or in docker-compose'

My problem is that I'm using a Kubernetes env, and still didn't find a proper way to specify shm_size in Kubernetes yaml files. Any idea?

@amirplanet
Copy link

Please, if possible, also keep cvakiitho/firefox:3.5.3 since it's the only one that seems to be working for me. Thanks!

@diemol
Copy link
Member

diemol commented Dec 17, 2017

Hi all,

This issue should not be happening anymore with the latest releases, right? Does anyone still have the issue?

@amirplanet, check here a workaround for the shm thing in k8s, you would need to mount the volume to achieve that.

@diemol diemol removed the I-firefox label Dec 17, 2017
@diemol
Copy link
Member

diemol commented Jan 13, 2018

Hi all,

We didn't get more feedback on this, so I'll close the issue. Seems that things are more stable in the recent releases.

If someone still has this same issue with the latest release, please comment with enough info so we can reproduce it and find a way to solve it. Thanks!

@diemol diemol closed this as completed Jan 13, 2018
@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants