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

unknown error: DevToolsActivePort file doesn't exist #184

Open
greyslater opened this issue Jan 16, 2021 · 3 comments
Open

unknown error: DevToolsActivePort file doesn't exist #184

greyslater opened this issue Jan 16, 2021 · 3 comments

Comments

@greyslater
Copy link

Can't get it running in a complete headless instance (everything up-to-date)

[WDM] - Current google-chrome version is 87.0.4280
[WDM] - Get LATEST driver version for 87.0.4280
[WDM] - Driver [/root/.wdm/drivers/chromedriver/linux64/87.0.4280.88/chromedriver] found in cache
Traceback (most recent call last):
File "/home/instagram-profilecrawl/crawl_profile.py", line 14, in
with SetupBrowserEnvironment() as browser:
File "/home/instagram-profilecrawl/util/chromedriver.py", line 37, in enter
self.browser = init_chromedriver(self.chrome_options, self.capabilities)
File "/home/instagram-profilecrawl/util/chromedriver.py", line 55, in init_chromedriver
browser = webdriver.Chrome(ChromeDriverManager().install())
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in init
RemoteWebDriver.init(
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(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.)

@timmoh
Copy link
Collaborator

timmoh commented Jan 16, 2021

use chrome/firefox like mention in the docu not the one installed by os.
Install the proper chromedriver for your operating system. Once you download it just drag and drop it into instagram-profilecrawl/assets directory.

@greyslater
Copy link
Author

use chrome/firefox like mention in the docu not the one installed by os.

can't find anything special mentioned about chrome in the documentary
I'm running on Buster with google-chrome-stable 87.0.4280

chromedriver is in assets but webdrivermanager uses cache though

@greyslater
Copy link
Author

I tried different google-chrome settings in /util/chromedriver.py

chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--remote-debugging-port=9222')

but no success

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