Forums

Chrome doesn't work with selenium

i'm having this error whenever i run selenim with Chrome: 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)

We have a new, experimental way of sandboxing users that should allow you to use a more recent version of Chrome. Let us know if you'd like us to enable it for your account.

yes i would like to , thanks

Ok. I have enabled it for your account.

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?

Ah- okay, I have turned on that virtualization for you. You will have to restart your console/webapps etc for the change to take effect.

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()

hi, can you enable chrome for free versions for testing? thank you

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

No problem @zaheer, @outsidedog and @ds4573, I have enabled it for your account.

Hi am new as well can someone teach me how to install?

Could you give more details about what you're trying to do, and what problems you're having?

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.)

OK -- I've switched that on, so if you follow the steps from my previous post then that will get Chrome working for you.

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.)

Sorry, it looks like the setting was not actually applied. I have applied it now so it should work. Bear in mind, that if you're running the code in a console, you will need to start a new console for it to be applied and if you're running it in a web app, you will need to reload the web app.

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, ifmeonline

OK -- I've switched that on, so if you follow the steps from my previous post then that will get Chrome working for you.

@giles

Hi, can you help me switch to the most recent system? I would like to use Selenium + ChromeDriver too. Thank you.

I'm a new user, and intend to use Selenium and ChromeDriver. Please activate me this

@theansweryang, @darerror Sure, I've switched that on for both of you, so if you follow the steps from my previous post then that will get Chrome working for you.

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)

Now i have: Message: session not created from tab crashed

Are you getting emails about processes in your account running of of memory and crashing?

can we use Selenium and ChromeDriver with free acount? If it is possible, please activate me this, else please tell me which paid account I should get.

It is possible, but keep in mind that with a free account, you can only access a whitelist of external sites that are public apis. So it may not work for your use case. If you still want to do that let us know and we will set you up.

Hello, you can also turn on the ChromeDriver for me.

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?

Ok, @Shrik558 and @MutFild, I have enabled it for your accounts.

Hello, could you please turn on this thing for me? Thanks.

Ok. I have enabled it for your account.

browser = webdriver.Chrome(options=chrome_options) TypeError: init() got an unexpected keyword argument 'options'

OK -- 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.

Hi, I was wondering if you could enable this feature for me as well. I'm having the same issues here.

Sure, I've turned that on for you.

Can I please have this turned on for me as well? I'm currently a free user, and testing Selenium + Chrome with the whitelist websites for now. Will move over to a paid account once I can verify that my code works.

Sure, we've turned that on for you.

Could you please turn the new virtualization on for me as well? so I can be able to run Chrome driver headless. Thank you very much

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.

I tried yesterday, either home or here, is Selenium have a problem???? Is there a tutorial?? Is my security blocking me??? how to check that???

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.

Could you please turn the new virtualization on for me as well? so I can be able to run Chrome driver headless. Thank you very much

Your account is still on an old system image. To make it work we would have to update your system image, too. Switching to a new system image may break your code that was working on your old image. You will also need to rebuild any virtual environments you have created.

Ok sir, I have backed up my all resources it's ready to update. You can take action.

No problem. That's done. New consoles will use the new system and your web app will use it once it has been reloaded.

Hi!, please turn on the ChromeDriver for me.Thanks!

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.

Hello, I also wanted to have the new virtualization on for me, I am trying to use Selenium to automate a task. Thanks!

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you.

Hi!, please turn on the ChromeDriver for me.Thanks!

Hi! I'm ready. Please turn on ChromeDriver. Thanks!

Hi, please turn on the ChromeDriver for me.Thanks!

No problem, @archproug and @blackhat0, I have enabled it for your accounts.

I upgraded to payed account. can you turn on the ChromeDriver for me to use selenium? Thank you.

Its enabled for you, @academicpost

HI! I have a free account. Could chrome be enabled for my account too? Thanks!

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you. It's worth noting, though, that from a free account you are still limited to the sites on our whitelist.

Я новый пользователь и собираюсь использовать Selenium и ChromeDriver. Исходя из вышеизложенного, можете ли вы подключить их для моей учетной записи. Спасибо 0310sawbuy0310

0310sawbuy0310 it's done for you.

выдает вот такую ошибку, с чем это может быть связано?

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

You appear to be trying to use a chromedriver executable that is not the one that we have installed and you have not made it executable. Chromedriver is quite sensitive to versioning, so I would suggest not specifying the chromedriver in your code and use the one that is installed by default.

Hi!, please turn on the ChromeDriver for me. Thanks! I want to test just for now, then I will upgrade my account

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you. It's worth noting, though, that from a free account you are still limited to the sites on our whitelist.

I am also stuck on getting the chromedriver up and running. Mind activating mine account too? I'm currently testing and would like to use selenium with chromedriver to scrape Instagram. Is that possible?

hi ! please the same problem here please can you turn on the ChromeDriver for me. thanks in advance.

@Gissa and @kumarraj123, I have enabled it for your accounts.

which chrome version is installed here can u tell me?

Chromium 78.0.3904.70 Built on Ubuntu , running on Ubuntu 16.04

Hello, could you switch on this Chrome support for me?

Thanks!

No problem. I have enabled it for your account.

Hi, is it possible to activate Chrome support for me too? Thanks!

It's done for you.

Hi, could I have it enabled for me aswell? Thanks!

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you. It's worth noting, though, that from a free account you are still limited to the sites on our whitelist.

Please enable it for me too thanks!

Sure, no problem -- that's done now.

Please enable it for me too thanks!

No problem. It's done for you

Hi, please enable this for me, thanks in advance

@taipham It's done for you.

Hi, please enable this for me too)

@ell4me It's done for you as well.

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:

  1. if you are free user, you can only access our whitelisted sites over http/https.
  2. depending on how memory intensive this is, it may run up against memory limits and be killed
  3. 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

@conrad Ок,thanks. And what paid plan are u recommended me for my tasks? And how many memory limit maximum can be use for 1 task so my process won't be kill? And last question,can i mesure how many memory used for only 1 task?

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.

Hi, I am trying to use selenium with chrome driver but it's giving me an error. I suspect it's the chrome not being enabled. Can you enable chrome for me?

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you. It's worth noting, though, that from a free account you are still limited to the sites on our whitelist.

Hi, please enable this for me too) Thanks!

@codecompagnons It's done for you.

@pafk Thanks!

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?

Hi there -- this is the forum for discussion and tech support for PythonAnywhere, an online hosting environment, so we can't really help with problems you're having on other systems. You may want to try posting your question on a general programming help site like Stack Overflow.

Hi, please enable this for me too) Thanks!

Привет, я хочу использовать selenium в моем проекте. Включите эту функцию для меня. заранее спасибо!

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you. It's worth noting, though, that from a free account you are still limited to the sites on our whitelist.

Thx

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?

How does your code look like?

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)

import built-in & third-party modules

import os import zipfile import shutil

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 downloaded
sym_path = gdd.download_and_install()[1]
return sym_path

def create_chrome_extension(): ext_path = os.path.abspath(os.path.dirname(file) + sep + "chrome_extension") # safe into assets folder zip_file = use_assets() + sep + "extension.xpi"

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 = None
err_msg = ""

# set Firefox Agent to mobile agent
user_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_agent
Settings.user_agent = user_agent

chrome_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)

if headless_browser:
    chrome_options.add_argument("-headless")

if browser_profile_path is not None:
    chrome_profile = webdriver.ChromeProfile(browser_profile_path)
else:
    driver = webdriver.Chrome()

if browser_executable_path is not None:
    chrome_options.binary = browser_executable_path

# set "info" by default
# set "trace" for debubging, Development only
chrome_options.log.level = geckodriver_log_level

# set English language
chrome_profile.set_preference("intl.accept_languages", "en-US")
chrome_profile.set_preference("general.useragent.override", user_agent)

if disable_image_load:
    # permissions.default.image = 2: Disable images load,
    # this setting can improve pageload & save bandwidth
    chrome_profile.set_preference("permissions.default.image", 2)

if proxy_address and proxy_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 stories
chrome_profile.set_preference("media.volume_scale", "0.0")

# prevent Hide Selenium Extension: error
chrome_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 logfolder
geckodriver_log = "{}geckodriver.log".format(logfolder)

# prefer user path before downloaded one
driver_path = geckodriver_path or get_geckodriver()
browser = webdriver.Chrome(
    chrome_profile=chrome_profile,
    executable_path=driver_path,
    log_path=geckodriver_log,
    options=chrome_options,
)

# add extenions to hide selenium
browser.install_addon(create_chrome_extension(), temporary=True)

# converts to custom browser
# browser = convert_selenium_browser(browser)

# authenticate with popup alert window
if proxy_username and proxy_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)
except UnexpectedAlertPresentException as exc:
    logger.exception(
        "Unexpected alert on resizing web browser!\n\t"
        "{}".format(str(exc).encode("utf-8"))
    )
    close_browser(browser, False, logger)
    return browser, "Unexpected alert on browser resize"

message = "Session started!"
highlight_print("browser", message, "initialization", "info", logger)

return browser, err_msg

def proxy_authentication(browser, logger, proxy_username, proxy_password): """ Authenticate proxy using popup alert window """

# 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"
)

try:
    # 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 try: 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")) )

    # close web browser
    try:
        browser.quit()
    except Exception as exc:
        if isinstance(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:
            try:
                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 """

def find_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)
    return rv

def wait_for_valid_connection(self, username, logger):
    counter = 0
    while True and counter < 10:
        sirens_wailing, emergency_state = emergency_exit(self, username, logger)
        if sirens_wailing and emergency_state == "not connected":
            logger.warning("there is no valid connection")
            counter += 1
            sleep(60)
        else:
            break

def wait_for_valid_authorization(self, username, logger):
    # save current page
    current_url = get_current_url(self)

    # stuck on invalid auth
    auth_method = "activity counts"
    counter = 0
    while True and counter < 10:
        login_state = check_authorization(self, username, auth_method, logger)
        if login_state is False:
            logger.warning("not logged in")
            counter += 1
            sleep(60)
        else:
            break

    # return to original page
    web_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

can you enable chrome for me please

Sorry how do i enable chrome?

@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

@MrGorsky Are you sure that it is running headless?

It is running not in headless mode. I tried to use it in this way (not headless), and my script worked, but later browser crashed and I saw this error. Can I use it without headless?

You can use it in non-headless mode, though it will run more slowly. How are you running the script -- is it from a console, or inside a website's code, or in a scheduled task?

I use it in scheduled tasks. I killed all running tasks in tab "Tasks", and now chrome works well. Thank you for your concern :)

Glad to hear you got it working!

Hello! I want to run one of my scripts in sheduled tasks using selenuim+chrome and other script using selenium+firefox? Is is possible to activate chromedriver and geckodriver both to my account? Now chrome is available for me.

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, can I also have Chrome enabled?

ok sure, we have enabled that for you.

Hi, can I also have Chrome enabled please? Thanks.

No problem, it's enabled for you @zparkar.

@pafk Hey, can you activate chrome browser in my account please? Thanks a lot!

No problem. I have activated it for your account.

Hey, can you activate chrome browser in my account please? Thanks a lot!

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you.

Hi, can I please have Chrome activated in my account too?

Sure, @henrydh, it's done for you.

Hi, can I please have Chrome activated in my account too? :) :) :)

@freddy57 It's done for you

Hey, could you please configure my account to be able to use Chrome too?

Appreciate it.

It looks like it is already enabled for your account.

Hey, could you please configure my account to be able to use Chrome too?

Appreciate it.

Sure, no problem -- that's done now, and new consoles will be using it. If you follow the steps from my previous post then that will get Chrome working for you.

Please configure my account to be able to use Chrome with selenium, please

I see that you posted another thread about that, so I've answered there.

Hello!! I would like to run chrome webdriver too! Can it be switched on for me?

Hi, can you please enable my account to work with Chrome as well? Thanks!

@renatonm007 @jhollier It's done for both of you

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)

try:
    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

Interestingly, everything works great now with no changes. Anyway, thanks for the assistance :)

Thanks for letting us know!