Hi, I have the same issue:
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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1100-aws x86_64)
Can you help me please?
Hello, I have the same error. 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 / chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver = 2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac), platform = Linux 4.4.0-1100-aws x86_64)
What is the reason for this?
Our system does not support Chrome by default, it's something that we have to switch on for you. I've done that now, and as a next step, you'll need to upgrade Selenium for your account -- for example, if you're using Python 3.7, run this in Bash:
pip3.7 install --user --upgrade selenium
...and then you can run Selenium with Chrome using code like this:
chrome_options=webdriver.ChromeOptions()chrome_options.add_argument("--headless")chrome_options.add_argument("--disable-gpu")browser=webdriver.Chrome(options=chrome_options)try:browser.get("https://www.google.com")print("Page title was '{}'".format(browser.title))finally:browser.quit()
I believe I've got a similar problem....
Here's my error: (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1100-aws x86_64)
I'm a new user, and intend to use Selenium and ChromeDriver. Based on the above, can you do the same for my account.
Thanks, ds4573
please enable chrome for me. thank you
I have the following error while running my application
WebDriverException at /new_search
Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
i followed previous post steps but still showing the same error.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
so. i have done this work (previous steps), but i still have unknown error: Chrome failed to start: crashed
(unknown error: unable to discover open pages)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1100-aws x86_64)
Hello, I have the same error. 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 / chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver = 2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac), platform = Linux 4.4.0-1100-aws x86_64) , can you enable the new version for me please?
Sure! I've switched on the new virtualization system for you, so if you follow the steps from my previous post then that will get Chrome working for you.
Wow! You guys have a lightning fast support, I'm super positively impressed! Thanks a lot
@Tsurubaso -- what problems are you seeing? The feature is switched on for your account, so as long as you've upgraded Selenium (see this post) it should all work fine.
@yall -- no problem! Glad to help.
Your account will also need its system image to be changed in order to support Chromedriver. Your files and data will be unchanged, but it will change the point releases of Python (eg. 3.7.0 to 3.7.5), which might break any virtualenvs you have -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.
If you're happy for us to switch you over despite that, then let us know.
выдает вот такую ошибку, с чем это может быть связано?
File "/home/0310sawbuy0310/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 86, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable may have wrong permissions. Please see https://sites.google.com/a/chromiu
m.org/chromedriver/home
Hi, i have a question, i am gonna use aroud 100-150 processes with multiprocessing,1 process include new initialization with webdriver. It means i'll have 150 processes with 150 different opened windows(webdrivers). How can i use this script on your servers and is it posible? And another question if it would be posible so i'll need to send 150 requests(driver.get("some site")) to only 1 site,how i understand i'll need to use proxies,right? And which driver can u recommended me, firefox or chrome,which work better on your servers with proxies etc. Thanks in advance.
A couple things to look out for:
if you are free user, you can only access our whitelisted sites over http/https.
depending on how memory intensive this is, it may run up against memory limits and be killed
see this, the standard recommended solution, which is firefox, but also see this which will require us to switch it on for you, which is Chromium
You can see the features that each account has on your account page and you can also use the "Customise your plan" to choose a specific set of features. The features you need will depend on your code.
Each process can use 3G of memory and there is no real way to measure your use except by experimenting to see when your processes get killed. You are much more likely to run into our process limit, which is 128 processes per user per server.
Hey ill try to use selenium and chromedriver and chromium on a linux ec2 machine and get always thsi error.
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/chromedriver is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Can you please help me too?
Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
Hey i am receiving this error, is there anything i can do?
Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
Hey i am receiving this error, is there anything i can do?
Hey sorry i opened a new terminal and i ran the code again and i am getting this error
selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: -11
is there anything i can do?
Okay i went to the terminal again and i got the same error as last time
selenium.common.exceptions.WebDriverException: Message: unknown error: failed to start a thread for the new session
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
from os.path import sep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options as Firefox_Options
from selenium.webdriver.chrome.options import Options as Chrome_Options
from instapy_chromedriver import binary_path
from selenium.webdriver import Remote
from webdriverdownloader import GeckoDriverDownloader
import InstaPy modules
from .util import interruption_handler
from .util import highlight_print
from .util import emergency_exit
from .util import get_current_url
from .util import check_authorization
from .util import web_address_navigator
from .file_manager import use_assets
from .settings import Settings
from .time_util import sleep
import exceptions
from selenium.common.exceptions import WebDriverException
from selenium.common.exceptions import UnexpectedAlertPresentException
def get_geckodriver():
# prefer using geckodriver from path
gecko_path = shutil.which("geckodriver") or shutil.which("geckodriver.exe")
if gecko_path:
return gecko_path
asset_path=use_assets()gdd=GeckoDriverDownloader(asset_path,asset_path)# skips download if already downloadedsym_path=gdd.download_and_install()[1]returnsym_path
files = ["manifest.json", "content.js", "arrive.js"]
with zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEFLATED, False) as zipf:
for file in files:
zipf.write(ext_path + sep + file, file)
return zip_file
def set_selenium_local_session(
proxy_address,
proxy_port,
proxy_username,
proxy_password,
headless_browser,
browser_profile_path,
disable_image_load,
page_delay,
geckodriver_path,
browser_executable_path,
logfolder,
logger,
geckodriver_log_level,
"""Starts local session for a selenium server.
Default case scenario."""
browser=Noneerr_msg=""# set Firefox Agent to mobile agentuser_agent=("Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 ""(KHTML, like Gecko) FxiOS/18.1 Mobile/16B92 Safari/605.1.15"# keep user_agentSettings.user_agent=user_agentchrome_options=Chrome_Options()chrome_options.add_argument('--headless')chrome_options.add_argument('--no-sandbox')chrome_options.add_argument("--disable-gpu")browser=webdriver.Chrome(options=chrome_options)ifheadless_browser:chrome_options.add_argument("-headless")ifbrowser_profile_pathisnotNone:chrome_profile=webdriver.ChromeProfile(browser_profile_path)else:driver=webdriver.Chrome()ifbrowser_executable_pathisnotNone:chrome_options.binary=browser_executable_path# set "info" by default# set "trace" for debubging, Development onlychrome_options.log.level=geckodriver_log_level# set English languagechrome_profile.set_preference("intl.accept_languages","en-US")chrome_profile.set_preference("general.useragent.override",user_agent)ifdisable_image_load:# permissions.default.image = 2: Disable images load,# this setting can improve pageload & save bandwidthchrome_profile.set_preference("permissions.default.image",2)ifproxy_addressandproxy_port:chrome_profile.set_preference("network.proxy.type",1)chrome_profile.set_preference("network.proxy.http",proxy_address)chrome_profile.set_preference("network.proxy.http_port",int(proxy_port))chrome_profile.set_preference("network.proxy.ssl",proxy_address)chrome_profile.set_preference("network.proxy.ssl_port",int(proxy_port))# mute audio while watching storieschrome_profile.set_preference("media.volume_scale","0.0")# prevent Hide Selenium Extension: errorchrome_profile.set_preference("dom.webdriver.enabled",False)chrome_profile.set_preference("useAutomationExtension",False)chrome_profile.set_preference("general.platform.override","iPhone")chrome_profile.update_preferences()# geckodriver log in specific user logfoldergeckodriver_log="{}geckodriver.log".format(logfolder)# prefer user path before downloaded onedriver_path=geckodriver_pathorget_geckodriver()browser=webdriver.Chrome(chrome_profile=chrome_profile,executable_path=driver_path,log_path=geckodriver_log,options=chrome_options,# add extenions to hide seleniumbrowser.install_addon(create_chrome_extension(),temporary=True)# converts to custom browser# browser = convert_selenium_browser(browser)# authenticate with popup alert windowifproxy_usernameandproxy_password:proxy_authentication(browser,logger,proxy_username,proxy_password)browser.implicitly_wait(page_delay)# set mobile viewport (iPhone X)try:browser.set_window_size(375,812)exceptUnexpectedAlertPresentExceptionasexc:logger.exception("Unexpected alert on resizing web browser!\n\t""{}".format(str(exc).encode("utf-8"))close_browser(browser,False,logger)returnbrowser,"Unexpected alert on browser resize"message="Session started!"highlight_print("browser",message,"initialization","info",logger)returnbrowser,err_msg
# FIXME: https://github.com/SeleniumHQ/selenium/issues/7239
# this feauture is not working anymore due to the Selenium bug report above
logger.warn(
"Proxy Authentication is not working anymore due to the Selenium bug "
"report: https://github.com/SeleniumHQ/selenium/issues/7239"
# sleep(1) is enough, sleep(2) is to make sure we
# give time to the popup windows
sleep(2)
alert_popup = browser.switch_to_alert()
alert_popup.send_keys(
"{username}{tab}{password}{tab}".format(
username=proxy_username, tab=Keys.TAB, password=proxy_password
alert_popup.accept()
except Exception:
logger.warn("Unable to proxy authenticate")
def close_browser(browser, threaded_session, logger):
with interruption_handler(threaded=threaded_session):
# delete cookies
browser.delete_all_cookies()
except Exception as exc:
if isinstance(exc, WebDriverException):
logger.exception(
"Error occurred while deleting cookies "
"from web browser!\n\t{}".format(str(exc).encode("utf-8"))
#closewebbrowsertry:
browser.quit()exceptExceptionasexc:
ifisinstance(exc,WebDriverException):
logger.exception("Error occurred while ""closing web browser!\n\t{}".format(str(exc).encode("utf-8"))
def retry(max_retry_count=3, start_page=None):
Decorator which refreshes the page and tries to execute the function again.
Use it like that: @retry() => the '()' are important because its a decorator
with params.
def real_decorator(org_func):
def wrapper(*args, **kwargs):
browser = None
_start_page = start_page
# try to find instance of a browser in the arguments
# all webdriver classes (chrome, firefox, ...) inherit from Remote class
for arg in args:
if not isinstance(arg, Remote):
continue
browser = arg
break
else:
for _, value in kwargs.items():
if not isinstance(value, Remote):
continue
browser = value
break
if not browser:
print("not able to find browser in parameters!")
return org_func(*args, **kwargs)
if max_retry_count == 0:
print("max retry count is set to 0, this function is useless right now")
return org_func(*args, **kwargs)
# get current page if none is given
if not start_page:
_start_page = browser.current_url
rv = None
retry_count = 0
while True:
rv = org_func(*args, **kwargs)
break
except Exception as e:
# TODO: maybe handle only certain exceptions here
retry_count += 1
# if above max retries => throw original exception
if retry_count > max_retry_count:
raise e
rv = None
# refresh page
browser.get(_start_page)
return rv
return wrapper
return real_decorator
class custom_browser(Remote):
""" Custom browser instance for manupulation later on """
deffind_element_by_xpath(self,*args,**kwargs):""" example usage of hooking into built in functions """rv=super(custom_browser,self).find_element_by_xpath(*args,**kwargs)returnrvdefwait_for_valid_connection(self,username,logger):counter=0whileTrueandcounter<10:sirens_wailing,emergency_state=emergency_exit(self,username,logger)ifsirens_wailingandemergency_state=="not connected":logger.warning("there is no valid connection")counter+=1sleep(60)else:breakdefwait_for_valid_authorization(self,username,logger):#savecurrentpagecurrent_url=get_current_url(self)#stuckoninvalidauthauth_method="activity counts"counter=0whileTrueandcounter<10:login_state=check_authorization(self,username,auth_method,logger)iflogin_stateisFalse:logger.warning("not logged in")counter+=1sleep(60)else:break#returntooriginalpageweb_address_navigator(self,current_url)
def convert_selenium_browser(driver):
""" Changed the class to our custom class """
driver.class = custom_browser
return driver
This is the code is in browser.py file
@yonataliasu13 we have turned on that virtualization for you- any new consoles you start will be able to run chrome.
@dewey you already have that virtualization turned on. I see that you pasted a lot of code a couple replies up. Could you try doing this, and using this simple code instead to see if it runs?
Hello! I have such error :
unknown error: Chrome failed to start: crashed
(unknown error: DevToolsActMessageivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux
5.4.0-1020-aws x86_64)
I think that possibly chrome was not closed in the previous running. Can you check it for me, please? And how I can check it and fix? Chrome is available for my account
At the moment we have an old version of firefox available on the system, and it misbehaves. That's why we recommend chrome and suggest the activation of experimental features required to run it (it's already done for you). As far as I know, nothing (apart from the general flakiness of the installed firefox) prevents you from running both.
Hi, I restarted all consoles, verified selenium was upgraded to the latest, and tried the sample code in the post from April 13, 2020 to verify but am still getting the classic error when trying to run chromedriver:
"(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)"
Is it possible my account wasn't enabled?
@jhollier It is enabled for you. How do you configure your webdriver?
That examle code works:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)
browser.get("https://www.google.com")
print("Page title was '{}'".format(browser.title))
finally:
browser.quit()
You should also upgrade selenium with something like:
pip3.7 install --user --upgrade selenium
I have received this error while attempting to use Selenium and chromedriver, could my account by changed for the new virtualization as well?:
Hi can you please configure my account to also be used with Chrome Selenium? I am getting the following:
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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
Hello, I got the following error message.
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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
Could you help me to use Chrome for my account as well?
Hey support, I got the same error too, please enable chromedriver or virtualization (whatever it takes) for my account as well plz
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/chromium-browser i
s no longer running, so ChromeDriver is assuming that Chrome has crashe
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d
2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
PLEASE ENABLE CHROME FOR ME
Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1020-aws x86_64)
Can you please enabled it for me as well ?
Hi, I am facing the same problem and receiving this message
Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist
he process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome h
as crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.4.0-1029-aws x86_64
Can you please enable the selenium driver for me.
Thank you so much for all your help.
Hi @rashidanwar0146. We're currently in the process of enabling the new virtualization system for all accounts on PythonAnywhere, which unfortunately may take a week or two to complete. We'll let you know when that has been done for your account; I've made a note to make sure that you're in one of the next batches to be moved over to it.
@reza16, @fabio8178 -- did you update Selenium as advised above?
For example, if you're using Python 3.7, run this in Bash:
pip3.7 install --user --upgrade selenium
...and then you can run Selenium with Chrome using code like this:
chrome_options=webdriver.ChromeOptions()chrome_options.add_argument("--headless")chrome_options.add_argument("--disable-gpu")browser=webdriver.Chrome(options=chrome_options)try:browser.get("https://www.google.com")print("Page title was '{}'".format(browser.title))finally:browser.quit()
Hi. I'm trying to get selenium to work, and can't seem to figure it out. Totally novice question, but when I run a python script that calls chrome, I get this error:
I can't figure out a) what version of chromedriver I need, and b) where to put it? I tried putting it where the python file is and a few others areas, and nothing seems to work. Any ideas?
I'm a new user, and intend to use Selenium and ChromeDriver. Based on the above, can you do the same for my account and enable chrome for me
Thanks!
I am running glastonury and all packages are installed. when i try the example above I get the following error. Any ideas?
File "<stdin>", line 1, in <module>
File "/home/tweetologist/mysite/Qatune/myscrape.py", line 27, in scrape
browser = webdriver.Chrome(options=chrome_options)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in init
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/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: crashed.
(chrome not reachable)
(The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
result=''
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)
result =browser.get("https://www.google.com")
print("Page title was '{}'".format(browser.title))
finally:
browser.quit()
return result
It stopped working a few minutes ago with the following error. The cleanup/quit is in the code so memory should not be an issue but getting the error below:
Can you please turn chrome on for my account. I've already subscribed to the Hacker account. I can't seem to run my .ipynb scripts.
Thank you very much!
Respectfully,
Hi Glenn,
Is there a workaround on how to read .xlsx file in .py files. my chromedriver works perfectly fine when running my script in .py but whenever I try to do a pd.read_excel(), it returns an empty dataframe. I already tried adding engine='openpyxl', but the error still persists.
I apologize this post is unrelated to this thread.
Respectfully yours,
That doesn't necessarily mean that there is actually anything in the file. Have you checked that the file that you're reading actually has anything in it to import? Also, make sure that you're reading the file that you think you're reading: https://help.pythonanywhere.com/pages/NoSuchFileOrDirectory/
Hi, can you enable chrome for me? I am having an issue:
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/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Here's what I've been getting, and nothing from the forums seems to work:
That's the error I got with the minimal example.
Here's my code
#Setting up Chromium Settings
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
driver=webdriver.Chrome(options=chrome_options)
driver.get("https://www.google.com")
print("Page title was '{}'".format(driver.title))
finally:
driver.quit()
Maybe I'm having the wrong package? Is there a specific package I would need for chromium browser?
I am having the same error:
File "/home/eyal360/.virtualenvs/fbvenv/lib/python3.8/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: crashed
(unknown error: unable to discover open pages)
(The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 5.8.0-1041-aws x86_64)
What should be done?
In fact, it is very time sensitive and I'm facing an issue with the driver despite best attempts:
**> (The process started from chrome location /usr/bin/chromium is no
longer running, so ChromeDriver is assuming that Chrome has crashed.)**
In fact, it is very time sensitive and I'm facing an issue with the driver despite best attempts:
**> (The process started from chrome location /usr/bin/chromium is no
longer running, so ChromeDriver is assuming that Chrome has crashed.)**
@fjl Hi, did you change anything lately with selenium or with chromedriver? My script works perfectly till end of Janury but since February i almost always have error:
@fjl Hi, did you change anything lately with selenium or with chromedriver? My script works perfectly till end of Janury but since February i almost always have error:
Hello, please enable ChromeDriver for me too. Thank you.
I have got this error message:
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/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
What's happening here, something to enable manually?
I'm on latest available image (glastonbury) and can't run the sample code.
fromseleniumimportwebdriverchrome_options=webdriver.ChromeOptions()chrome_options.add_argument("--no-sandbox")chrome_options.add_argument("--headless")chrome_options.add_argument("--disable-gpu")browser=webdriver.Chrome(options=chrome_options)try:browser.get("https://www.google.com")print("Page title was '{}'".format(browser.title))finally:browser.quit()
Selenium version(also tried latest):
pip3 list | grep selenium
selenium 3.141.0
Because python-anywhere limits the amount of processes you can have running at once, if you are scraping numerous sites and using driver.quit() or closing chrome through a bash command, python (as the parent process) will retain some defunct processes for every chrome process that was open. If you do this enough time you will have too high a process count and chromedriver will refuse to open.
Running the 2 lines of code will ignore the default setting of retaining child processes until the parent is closed. However, if for some reason you need to retain these defunct processes, then this will cause other problems for you. It works for me, hope it works for you.
I'm facing similar issue
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/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
0 0x55754b165e89 <unknown>
It used to work correctly until 25th Aug,22.
Now I don't understand what the issue is
Same for me. A few days ago everything worked fine. Now the Python only works when I start it manually. In the Task I get the following error from the view task log:
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/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
0 0x55560f027e89 <unknown>
The process list shows me:
/home/"user"/.local/bin/python -m virtualenvwrapper.hook_loader --script /tmp/virtualenvwrapper-initialize-hook-uWNuIh6Cuu initialize
bash -l -c python3.9 /home/"user"/"FileName".py
Yes I have the same configuration. When I start the example code manually the programm works just fine. When I make task that is executed hourly i get the following error:
Have you follower these steps -- https://www.pythonanywhere.com/forums/topic/27124/#id_post_78316
It's easy to miss the --user on the pip install
Sorry, we have had to rate-limit your feedback sending. Please try again in a few moments...
Thanks for the feedback! Our tireless devs will get back to you soon.