Giter Site home page Giter Site logo

Comments (6)

github-actions avatar github-actions commented on June 26, 2024

@Datarambler, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

from selenium.

github-actions avatar github-actions commented on June 26, 2024

We need more information about this issue in order to troubleshoot.

Please turn on logging and re-run your code. Information on how to adjust logs for your language can be found in our
Troubleshooting documentation.

from selenium.

Carmaiquel avatar Carmaiquel commented on June 26, 2024

I had a similiar issue.

!pip install -U selenium

import logging

logger = logging.getLogger('selenium')
logger.setLevel(logging.DEBUG)
!pytest -s -p no:logging

logging.basicConfig(level=logging.WARN)

from selenium import webdriver

driver = webdriver.Chrome()
driver.maximize_window()
url = 'https://www.carrefour.com.ar/almacen'
driver.get(url)

OUTPUT


DEBUG:selenium.webdriver.common.selenium_manager:Selenium Manager binary found at: /home/scaride/.pyenv/versions/taxifare-env/lib/python3.10/site-packages/selenium/webdriver/common/linux/selenium-manager
DEBUG:selenium.webdriver.common.selenium_manager:Executing process: /home/scaride/.pyenv/versions/taxifare-env/lib/python3.10/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --language-binding python --output json
DEBUG:selenium.webdriver.common.selenium_manager:chromedriver not found in PATH
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in PATH
DEBUG:selenium.webdriver.common.selenium_manager:chrome not found in the system
DEBUG:selenium.webdriver.common.selenium_manager:Required browser: chrome 124.0.6367.155
DEBUG:selenium.webdriver.common.selenium_manager:chrome 124.0.6367.155 already exists
DEBUG:selenium.webdriver.common.selenium_manager:chrome 124.0.6367.155 is available at /home/scaride/.cache/selenium/chrome/linux64/124.0.6367.155/chrome
DEBUG:selenium.webdriver.common.selenium_manager:Required driver: chromedriver 124.0.6367.155
DEBUG:selenium.webdriver.common.selenium_manager:chromedriver 124.0.6367.155 already in the cache
DEBUG:selenium.webdriver.common.selenium_manager:Driver path: /home/scaride/.cache/selenium/chromedriver/linux64/124.0.6367.155/chromedriver
DEBUG:selenium.webdriver.common.selenium_manager:Browser path: /home/scaride/.cache/selenium/chrome/linux64/124.0.6367.155/chrome
DEBUG:selenium.webdriver.common.service:Started executable: `/home/scaride/.cache/selenium/chromedriver/linux64/124.0.6367.155/chromedriver` in a child process with pid: 10312 using 0 to output -3
DEBUG:selenium.webdriver.remote.remote_connection:POST http://localhost:44933/session {'capabilities': {'firstMatch': [{}], 'alwaysMatch': {'browserName': 'chrome', 'pageLoadStrategy': <PageLoadStrategy.normal: 'normal'>, 'browserVersion': None, 'goog:chromeOptions': {'extensions': [], 'binary': '/home/scaride/.cache/selenium/chrome/linux64/124.0.6367.155/chrome', 'args': []}}}}
DEBUG:selenium.webdriver.remote.remote_connection:Remote response: status=500 | data={"value":{"error":"session not created","message":"session not created: Chrome failed to start: exited normally.\n  (session not created: DevToolsActivePort file doesn't exist)\n  (The process started from chrome location /home/scaride/.cache/selenium/chrome/linux64/124.0.6367.155/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)","stacktrace":"#0 0x556874a34df3 \u003Cunknown>\n#1 0x5568747234e7 \u003Cunknown>\n#2 0x556874757a66 \u003Cunknown>\n#3 0x5568747539c0 \u003Cunknown>\n#4 0x55687479c7f0 \u003Cunknown>\n#5 0x5568747901f3 \u003Cunknown>\n#6 0x55687476128a \u003Cunknown>\n#7 0x556874761c5e \u003Cunknown>\n#8 0x5568749f911b \u003Cunknown>\n#9 0x5568749fd06b \u003Cunknown>\n#10 0x5568749e5231 \u003Cunknown>\n#11 0x5568749fdbd2 \u003Cunknown>\n#12 0x5568749ca0ef \u003Cunknown>\n#13 0x556874a23f48 \u003Cunknown>\n#14 0x556874a24120 \u003Cunknown>\n#15 0x556874a33f44 \u003Cunknown>\n#16 0x7f29e1066609 start_thread\n"}} | headers=HTTPHeaderDict({'Content-Length': '966', 'Content-Type': 'application/json; charset=utf-8', 'cache-control': 'no-cache'})
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request

MORE

SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
  (session not created: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /home/scaride/.cache/selenium/chrome/linux64/124.0.6367.155/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x556874a34df3 <unknown>
#1 0x5568747234e7 <unknown>
#2 0x556874757a66 <unknown>
#3 0x5568747539c0 <unknown>
#4 0x55687479c7f0 <unknown>
#5 0x5568747901f3 <unknown>
#6 0x55687476128a <unknown>
#7 0x556874761c5e <unknown>
#8 0x5568749f911b <unknown>
#9 0x5568749fd06b <unknown>
#10 0x5568749e5231 <unknown>
#11 0x5568749fdbd2 <unknown>
#12 0x5568749ca0ef <unknown>
#13 0x556874a23f48 <unknown>
#14 0x556874a24120 <unknown>
#15 0x556874a33f44 <unknown>
#16 0x7f29e1066609 start_thread

from selenium.

AntoniHub avatar AntoniHub commented on June 26, 2024

What happened?

I have installed selenium 4.20 version on my virtual environment which has python 3.12 running and the VM is running on a Linux server. When I tried to open the Chrome browser with the webdriver, it's unable to find it.

image

Even if I try to specify the path to the chromedriver.exe via the service argument, it says "Permission issue - WebDriverException: Message: 'chromedriver.exe' executable may have wrong permissions.".

How can we reproduce the issue?

import logging

logging.getLogger('selenium')

import os

from pathlib import Path

from selenium import webdriver

from selenium.webdriver.chrome.service import Service

from selenium.webdriver.common.by import By

from selenium.webdriver.chrome.options import Options



chrome_options = Options()

chrome_options.add_argument("--no-sandbox")

chrome_options.add_argument("--headless")

chrome_options.add_argument("--disable-dev-shm-usage")



driver_path = Path.cwd()/'drivers/chromedriver.exe'

print(driver_path)



# service = Service(driver_path)

# driver = webdriver.Chrome(service=service)



driver=webdriver.Chrome()

Relevant log output

SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.

  (session not created: DevToolsActivePort file doesn't exist)

  (The process started from chrome location /data/home/xfmh5ya/.cache/selenium/chrome/linux64/124.0.6367.91/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Stacktrace:

#0 0x560da9601cb3 <unknown>

#1 0x560da92f04a7 <unknown>

#2 0x560da9324a26 <unknown>

#3 0x560da9320980 <unknown>

#4 0x560da93697b0 <unknown>

#5 0x560da935d1b3 <unknown>

#6 0x560da932e24a <unknown>

#7 0x560da932ec1e <unknown>

#8 0x560da95c5fdb <unknown>

#9 0x560da95c9f2b <unknown>

#10 0x560da95b20f1 <unknown>

#11 0x560da95caa92 <unknown>

#12 0x560da9596faf <unknown>

#13 0x560da95f0e08 <unknown>

#14 0x560da95f0fe0 <unknown>

#15 0x560da9600e04 <unknown>

#16 0x7f4f8d574ea5 start_thread

Operating System

Linux

Selenium version

4.20

What are the browser(s) and version(s) where you see this issue?

Chrome, Edge

What are the browser driver(s) and version(s) where you see this issue?

Chromedriver

Are you using Selenium Grid?

No

For Linux system you don't need put '.exe' only need:
driver_path = Path.cwd() / 'drivers' / 'chromedriver'

Besides, you can see some fix more in 'driver_path'

Also you must make sure that chromedriver have permission:
chmod +x

Finally, I think you should uncomment 'service'

from selenium.

diemol avatar diemol commented on June 26, 2024

@Carmaiquel, where does this happen? Your machine?

from selenium.

titusfortner avatar titusfortner commented on June 26, 2024

Duplicate #13749

Read the linked chromedriver bug in that issue, lots of people have had issues with this

from selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.