invalid session id/page crash

428 views
Skip to first unread message

Dexx Mandele

unread,
Feb 4, 2021, 10:53:08 PM2/4/21
to seleniu...@googlegroups.com
Hello everyone. My Jenkins pipeline started failing a couple months ago after a Chrome update, and I was hoping for some help troubleshooting the issue.

The core problem is an `invalid session id` error on start-up, which appears to be triggered by a "page crash", according to the trace logs. The plot twist is that it only shows up when I run the suite in a Docker container on Jenkins. The suite runs normally when I run it locally, and it runs normally when I run it with the same Docker script locally. It's only when I run the container in Jenkins that I get this error every time. I've tried several different Docker images, Chrome versions, ChromeDriver versions, and Selenium versions to no avail.

Please note that I am running Selenium through the selenium-standalone-service (https://webdriver.io/docs/selenium-standalone-service.html) for WebdriverIO.

Honestly I'd already be happy if someone could explain to me what's going wrong. The error message doesn't Google very well, and I'm still trying to wrap my head around the fact that a script that ran fine for months, in Jenkins, in Docker, would suddenly start to fail in such an obscure fashion after updating the Docker image.

Current set-up
Selenium version: 3.141.59
Chrome version: 87.0.4280.88
WebdriverIO version: 6.11.0
Webdriverio selenium-standalone-service version: 6.11.0


Sample Jenkins output
2021-02-04T21:03:36.333Z DEBUG @wdio/sync: Finished to run "beforeTest" hook in 0ms
[0-0] >>>> test start
2021-02-04T21:03:36.337Z INFO webdriver: COMMAND navigateTo("https://google.com/")
2021-02-04T21:03:36.337Z INFO webdriver: [POST] http://localhost:4444/wd/hub/session/1453e1a89a115982bcb336767bed9c32/url
2021-02-04T21:03:36.337Z INFO webdriver: DATA { url: 'https://google.com/' }
[0-0] 2021-02-04T21:03:37.273Z DEBUG webdriver: request failed due to response error: unknown error
2021-02-04T21:03:37.273Z INFO webdriver: Retrying 1/3
2021-02-04T21:03:37.274Z INFO webdriver: [POST] http://localhost:4444/wd/hub/session/1453e1a89a115982bcb336767bed9c32/url
2021-02-04T21:03:37.274Z INFO webdriver: DATA { url: 'https://google.com/' }
[0-0] 2021-02-04T21:03:37.273Z WARN webdriver: Request failed with status 500 due to unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
  (Session info: headless chrome=88.0.4324.146)
[0-0] 2021-02-04T21:03:37.281Z DEBUG webdriver: request failed due to response error: invalid session id
[0-0] 2021-02-04T21:03:37.281Z ERROR webdriver: Request failed with status 404 due to invalid session id: invalid session id

And here's an excerpt from running Selenium with `-log`, for what it's worth
22:40:04.462 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
22:40:04.530 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
22:40:04.849 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
22:40:04.914 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
22:40:06.492 INFO [ActiveSessionFactory.apply] - Capabilities are: {
  "browserName": "chrome",
  "goog:chromeOptions": {
    "args": [
      "--no-sandbox",
      "--headless",
      "--disable-gpu",
      "--disable-dev-shm-usage",
      "--single-process",
      "--disable-extensions"
    ]
  }
}
22:40:06.494 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
22:40:06.954 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C
22:40:06.973 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session e4922e4d6499935105dd004d8247816d (org.openqa.selenium.chrome.ChromeDriverService)
22:40:08.230 INFO [ActiveSessions$1.onStop] - Removing session e4922e4d6499935105dd004d8247816d (org.openqa.selenium.chrome.ChromeDriverService)


Thanks for taking a look!
Reply all
Reply to author
Forward
0 new messages