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

Selenium tests are broken #42

Open
knyghty opened this issue Aug 21, 2022 · 1 comment · May be fixed by #48
Open

Selenium tests are broken #42

knyghty opened this issue Aug 21, 2022 · 1 comment · May be fixed by #48

Comments

@knyghty
Copy link
Member

knyghty commented Aug 21, 2022

For both Chorme and Firefox it seems.

For Firefox, I get, e.g.:

======================================================================
ERROR: test_select_all_across_pages (admin_changelist.tests.SeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/unittest/suite.py", line 163, in _handleClassSetUp
    setUpClass()
  File "/tests/django/django/test/selenium.py", line 114, in setUpClass
    cls.selenium = cls.create_webdriver()
  File "/tests/django/django/test/selenium.py", line 92, in create_webdriver
    return webdriver.Remote(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 276, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 369, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 434, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. New session request timed out
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: '809a51a82548', ip: '172.18.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.16'
Driver info: driver.version: unknown
Stacktrace:
    at org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue.addToQueue (LocalNewSessionQueue.java:179)
    at org.openqa.selenium.grid.sessionqueue.NewSessionQueue.lambda$new$0 (NewSessionQueue.java:68)
    at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle (Route.java:192)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:336)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.grid.sessionqueue.NewSessionQueue.execute (NewSessionQueue.java:120)
    at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute (SpanWrappedHttpHandler.java:86)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:64)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:336)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.grid.router.Router.execute (Router.java:91)
    at org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0 (EnsureSpecCompliantResponseHeaders.java:34)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:64)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:336)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.remote.http.Route$NestedRoute.handle (Route.java:270)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:336)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:336)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:68)
    at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0 (AddWebDriverSpecHeaders.java:35)
    at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0 (ErrorFilter.java:44)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:64)
    at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0 (ErrorFilter.java:44)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:64)
    at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0 (SeleniumHandler.java:44)
    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)

And Chrome:

======================================================================
ERROR: test_select_multiple (admin_views.test_autocomplete_view.SeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/unittest/suite.py", line 163, in _handleClassSetUp
    setUpClass()
  File "/tests/django/django/test/selenium.py", line 114, in setUpClass
    cls.selenium = cls.create_webdriver()
  File "/tests/django/django/test/selenium.py", line 92, in create_webdriver
    return webdriver.Remote(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 276, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 369, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 434, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 243, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'd33366264b2d', ip: '172.18.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.16'
Driver info: driver.version: unknown
Build info: version: '4.4.0', revision: 'e5c75ed026a'
System info: host: 'd33366264b2d', ip: '172.18.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.16'
Driver info: driver.version: unknown
Stacktrace:
    at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply (DriverServiceSessionFactory.java:200)
    at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply (DriverServiceSessionFactory.java:68)
    at org.openqa.selenium.grid.node.local.SessionSlot.apply (SessionSlot.java:145)
    at org.openqa.selenium.grid.node.local.LocalNode.newSession (LocalNode.java:362)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession (LocalDistributor.java:639)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession (LocalDistributor.java:558)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest (LocalDistributor.java:812)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1 (LocalDistributor.java:773)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)

@ngnpope
Copy link
Member

ngnpope commented May 10, 2024

For anyone interested in this, I have Selenium working on the main branch of my fork.

I have a bunch of tidying up to do, but hopefully in the coming months we can get it rolled back in upstream.

@ngnpope ngnpope linked a pull request Dec 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants