Forums

Chrome failed to start for selenium

I have plane to go your paid plan but before go your paid plan I am checking everything will be perfect for me. getting this error while running my code:

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)

I used one of your whitelisted domain. I upgraded selenium through your bash shell. Here is my full code :

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup
import time

option = Options()

driver = webdriver.Chrome('chromedriver',options=option)


for i in range(10):
    r = driver.get('https://www.amocrm.com/')
    soup = BeautifulSoup(driver.page_source, "lxml")
    time.sleep(5)
    text =  soup.select('.feature__header')[0].text
    print(f'text : {text}')
    driver.quit()

see this- our normal stuff only works with firefox. if you want to use chrome, ask us to enable that for you and see this

after add Firefox get this error

selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

here is my edited code:

from selenium import webdriver
from bs4 import BeautifulSoup
import time

driver = webdriver.Firefox('/home/farhan1360')


for i in range(10):
    r = driver.get('https://www.amocrm.com/')
    soup = BeautifulSoup(driver.page_source, "lxml")
    time.sleep(5)
    text =  soup.select('.feature__header')[0].text
    print(f'text : {text}')
    driver.quit()

and also please activate chrome driver for my account. I want to use both Firefox and selenium

Our beta virtualization feature is now enabled for you, @farhan1360.

could you please update also my account for chrome? thanks

It is already activated for your account. All accounts have it activated by default now.

I have this error message : Message: unknown error: Chrome failed to start: exited abnormally.

and this one : Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED

Are you able to run basic example ?