Selenium-UI-testing-with-AWS-Lambda-Layers icon indicating copy to clipboard operation
Selenium-UI-testing-with-AWS-Lambda-Layers copied to clipboard

unknown error: unable to discover open pages

Open Denijar opened this issue 4 years ago • 3 comments

I keep encountering this error message when I try and run in AWS Lambda:

{
  "errorMessage": "Message: 'unknown error: unable to discover open pages\\n  (Driver info: chromedriver=2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7),platform=Linux 4.14.165-102.205.amzn2.x86_64 x86_64)' ",
  "errorType": "WebDriverException",
  "stackTrace": [
    [
      "/var/task/src/lambda_function.py",
      35,
      "lambda_handler",
      "driver = webdriver.Chrome(chrome_options=chrome_options)"
    ],
    [
      "/var/task/lib/selenium/webdriver/chrome/webdriver.py",
      64,
      "__init__",
      "desired_capabilities=desired_capabilities)"
    ],
    [
      "/var/task/lib/selenium/webdriver/remote/webdriver.py",
      71,
      "__init__",
      "self.start_session(desired_capabilities, browser_profile)"
    ],
    [
      "/var/task/lib/selenium/webdriver/remote/webdriver.py",
      113,
      "start_session",
      "'desiredCapabilities': desired_capabilities,"
    ],
    [
      "/var/task/lib/selenium/webdriver/remote/webdriver.py",
      164,
      "execute",
      "self.error_handler.check_response(response)"
    ],
    [
      "/var/task/lib/selenium/webdriver/remote/errorhandler.py",
      164,
      "check_response",
      "raise exception_class(message, screen, stacktrace)"
    ]
  ]
}

I encounter this when using the version stack you have suggested: Python3.6, Selenium2.37, ChromeDriver2.37, Serverless Chrome v1.0.0-41.

I also encounter it when I use the version stack that has been discussed in this issue as being a compatible set of versions (Python3.6, Selenium3.14, ChromeDriver2.43, Serverless Chrome v1.0.0-55).

Some Googling has suggested that adding chrome_options.add_argument('--no-sandbox') is a fix but this has not worked for me.

Any suggestions?

Denijar avatar Apr 17 '20 13:04 Denijar

I have the same issue. The browser is an empty page suggesting some sort of compatibility issue, but it has no problem finding the title?

mishfish123 avatar Apr 17 '20 18:04 mishfish123

Same from here. It takes forever and there is no response.

dlpigpen avatar Oct 25 '20 06:10 dlpigpen

Did anyone able to solve this issue?

mayankb2103 avatar Apr 21 '21 13:04 mayankb2103