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

DevToolsActivePort file doesn't exist #1

Closed
hathaway opened this issue Feb 7, 2022 · 5 comments
Closed

DevToolsActivePort file doesn't exist #1

hathaway opened this issue Feb 7, 2022 · 5 comments

Comments

@hathaway
Copy link

hathaway commented Feb 7, 2022

Hello,

Thanks for your work on this. I was considering making this docker myself but came across yours and it was exactly what I was planning to make.

I'm running into an issue when I try to run it though. It's related to the ChromeDriver.

I ran the command:

docker run --platform linux/amd64 -itd altodd/southwest-docker schedule ABCXYZ John Doe

And got the output:


Starting periodic command scheduler: cron.

Traceback (most recent call last):

  File "/headers/southwest-headers/southwest-headers.py", line 37, in <module>

    driver = webdriver.Chrome(os.getcwd() + "/chromedriver", options=chrome_options, seleniumwire_options=seleniumwire_options)

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/seleniumwire/webdriver.py", line 195, in __init__

    super().__init__(*args, **kwargs)

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 70, in __init__

    super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 93, in __init__

    RemoteWebDriver.__init__(

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 268, in __init__

    self.start_session(capabilities, browser_profile)

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 359, in start_session

    response = self.execute(Command.NEW_SESSION, parameters)

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute

    self.error_handler.check_response(response)

  File "/headers/southwest-headers/env/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response

    raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.WebDriverException: 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.)

Specifically, it seems to be caused by unknown error: DevToolsActivePort file doesn't exist which is related to running Chrome as root. It appears southwest-headers factors this in.

Did you run into this issue? Any ideas? Thanks!

@altodd
Copy link
Owner

altodd commented Feb 8, 2022 via email

@hathaway
Copy link
Author

hathaway commented Feb 8, 2022

I get the same result without that flag. I added that because it gives a warning about the platform on an M1 MacBook Pro without it. Thanks for taking a look.

@altodd
Copy link
Owner

altodd commented Feb 11, 2022

Okay, everything is looking good to me, but I am running the container on a debian based server - although in an ideal world that shouldn't matter. Are you able to just run the base debian image on your mac?

@altodd
Copy link
Owner

altodd commented Mar 11, 2022

Haven't been able to reproduce, closing

@altodd altodd closed this as completed Mar 11, 2022
@altodd
Copy link
Owner

altodd commented Mar 11, 2022

I did see you forked the repository, if you are able to figure anything out as to why it's causing the issue on your end please make a pull request/update this and I'll modify the image I have on dockerhub

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

No branches or pull requests

2 participants