Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so...
I'm aware there are several answers concerning this question but nothing has worked for me so far so therefor i'm posting a new question.
Recently i switched computers and since then I can't launch chrome with selenium. i've also tried firefox but the browser just doesn't lanch.
from selenium import webdriver
d = webdriver.Chrome('/home/PycharmProjects/chromedriver')
d.get('https://www.google.nl/')
i get the following error:
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
i have the latest chrome version and chromedriver installed
EDIT:
After trying @b0sss solution i am getting the following error.
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(chrome not reachable)
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so chromedriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-38-generic x86_64)
python selenium
add a comment |
I'm aware there are several answers concerning this question but nothing has worked for me so far so therefor i'm posting a new question.
Recently i switched computers and since then I can't launch chrome with selenium. i've also tried firefox but the browser just doesn't lanch.
from selenium import webdriver
d = webdriver.Chrome('/home/PycharmProjects/chromedriver')
d.get('https://www.google.nl/')
i get the following error:
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
i have the latest chrome version and chromedriver installed
EDIT:
After trying @b0sss solution i am getting the following error.
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(chrome not reachable)
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so chromedriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-38-generic x86_64)
python selenium
add a comment |
I'm aware there are several answers concerning this question but nothing has worked for me so far so therefor i'm posting a new question.
Recently i switched computers and since then I can't launch chrome with selenium. i've also tried firefox but the browser just doesn't lanch.
from selenium import webdriver
d = webdriver.Chrome('/home/PycharmProjects/chromedriver')
d.get('https://www.google.nl/')
i get the following error:
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
i have the latest chrome version and chromedriver installed
EDIT:
After trying @b0sss solution i am getting the following error.
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(chrome not reachable)
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so chromedriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-38-generic x86_64)
python selenium
I'm aware there are several answers concerning this question but nothing has worked for me so far so therefor i'm posting a new question.
Recently i switched computers and since then I can't launch chrome with selenium. i've also tried firefox but the browser just doesn't lanch.
from selenium import webdriver
d = webdriver.Chrome('/home/PycharmProjects/chromedriver')
d.get('https://www.google.nl/')
i get the following error:
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233, platform=Linux 4.15.0-38-generic x86_64)
i have the latest chrome version and chromedriver installed
EDIT:
After trying @b0sss solution i am getting the following error.
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed
(chrome not reachable)
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so chromedriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.43.600233 (523efee95e3d68b8719b3a1c83051aa63aa6b10d),platform=Linux 4.15.0-38-generic x86_64)
python selenium
python selenium
edited Oct 31 '18 at 7:23
DebanjanB
41.7k83979
41.7k83979
asked Oct 30 '18 at 21:54
SOehSOeh
3515
3515
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
This error message...
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the Chrome browser is not installed at the default location within your system.
The server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.
Solution
In case you are using a Chrome executable in a non-standard location you have to override the Chrome binary location. as follows:

1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
add a comment |
Try to download HERE and use this latest chrome driver version.
https://sites.google.com/a/chromium.org/chromedriver/downloads
EDIT:
Try this:
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
d.get('https://www.google.nl/')
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
add a comment |
I encountered the exact problem running on docker container (in build environment). After ssh into the container, I tried running the test manually and still encountered
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome-stable is
no longer running, so ChromeDriver is assuming that Chrome has crashed.)
When I tried running chrome locally /usr/bin/google-chrome-stable, error message
Running as root without --no-sandbox is not supported
I checked my ChromeOptions and it was missing --no-sandbox, which is why it couldn't spawn chrome.
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless --no-sandbox disable-gpu window-size=1920,1080) }
)
add a comment |
Assuming that you already downloaded chromeDriver, this error is also occurs when already multiple chrome tabs are open.
If you close all tabs and run again, the error should clear up.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53073411%2fselenium-webdriverexceptionchrome-failed-to-start-crashed-as-google-chrome-is%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
This error message...
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the Chrome browser is not installed at the default location within your system.
The server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.
Solution
In case you are using a Chrome executable in a non-standard location you have to override the Chrome binary location. as follows:

1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
add a comment |
This error message...
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the Chrome browser is not installed at the default location within your system.
The server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.
Solution
In case you are using a Chrome executable in a non-standard location you have to override the Chrome binary location. as follows:

1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
add a comment |
This error message...
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the Chrome browser is not installed at the default location within your system.
The server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.
Solution
In case you are using a Chrome executable in a non-standard location you have to override the Chrome binary location. as follows:

This error message...
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 /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the Chrome browser is not installed at the default location within your system.
The server i.e. ChromeDriver expects you to have Chrome installed in the default location for each system as per the image below:

1For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary.
Solution
In case you are using a Chrome executable in a non-standard location you have to override the Chrome binary location. as follows:

answered Oct 31 '18 at 7:26
DebanjanBDebanjanB
41.7k83979
41.7k83979
1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
add a comment |
1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
1
1
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
Setting the chrome binary worked. Gave you best answer. Also completely deleting Chrome/Chromedriver/Pycharm and then reinstalling everything did the trick as well, so now I won't have the set chrome binary.
– SOeh
Oct 31 '18 at 18:02
add a comment |
Try to download HERE and use this latest chrome driver version.
https://sites.google.com/a/chromium.org/chromedriver/downloads
EDIT:
Try this:
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
d.get('https://www.google.nl/')
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
add a comment |
Try to download HERE and use this latest chrome driver version.
https://sites.google.com/a/chromium.org/chromedriver/downloads
EDIT:
Try this:
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
d.get('https://www.google.nl/')
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
add a comment |
Try to download HERE and use this latest chrome driver version.
https://sites.google.com/a/chromium.org/chromedriver/downloads
EDIT:
Try this:
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
d.get('https://www.google.nl/')
Try to download HERE and use this latest chrome driver version.
https://sites.google.com/a/chromium.org/chromedriver/downloads
EDIT:
Try this:
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
d = webdriver.Chrome('/home/PycharmProjects/chromedriver',chrome_options=chrome_options)
d.get('https://www.google.nl/')
edited Oct 30 '18 at 22:42
answered Oct 30 '18 at 22:30
NgoCuongNgoCuong
35917
35917
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
add a comment |
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
I have already downloaded the latest chromedriver from that location.
– SOeh
Oct 30 '18 at 22:40
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
@SOeh try the Edited solution
– NgoCuong
Oct 30 '18 at 22:43
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
i get another error, see edit.
– SOeh
Oct 30 '18 at 22:49
add a comment |
I encountered the exact problem running on docker container (in build environment). After ssh into the container, I tried running the test manually and still encountered
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome-stable is
no longer running, so ChromeDriver is assuming that Chrome has crashed.)
When I tried running chrome locally /usr/bin/google-chrome-stable, error message
Running as root without --no-sandbox is not supported
I checked my ChromeOptions and it was missing --no-sandbox, which is why it couldn't spawn chrome.
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless --no-sandbox disable-gpu window-size=1920,1080) }
)
add a comment |
I encountered the exact problem running on docker container (in build environment). After ssh into the container, I tried running the test manually and still encountered
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome-stable is
no longer running, so ChromeDriver is assuming that Chrome has crashed.)
When I tried running chrome locally /usr/bin/google-chrome-stable, error message
Running as root without --no-sandbox is not supported
I checked my ChromeOptions and it was missing --no-sandbox, which is why it couldn't spawn chrome.
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless --no-sandbox disable-gpu window-size=1920,1080) }
)
add a comment |
I encountered the exact problem running on docker container (in build environment). After ssh into the container, I tried running the test manually and still encountered
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome-stable is
no longer running, so ChromeDriver is assuming that Chrome has crashed.)
When I tried running chrome locally /usr/bin/google-chrome-stable, error message
Running as root without --no-sandbox is not supported
I checked my ChromeOptions and it was missing --no-sandbox, which is why it couldn't spawn chrome.
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless --no-sandbox disable-gpu window-size=1920,1080) }
)
I encountered the exact problem running on docker container (in build environment). After ssh into the container, I tried running the test manually and still encountered
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome-stable is
no longer running, so ChromeDriver is assuming that Chrome has crashed.)
When I tried running chrome locally /usr/bin/google-chrome-stable, error message
Running as root without --no-sandbox is not supported
I checked my ChromeOptions and it was missing --no-sandbox, which is why it couldn't spawn chrome.
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w(headless --no-sandbox disable-gpu window-size=1920,1080) }
)
answered Jan 15 at 18:34
ibaralfibaralf
9,13533144
9,13533144
add a comment |
add a comment |
Assuming that you already downloaded chromeDriver, this error is also occurs when already multiple chrome tabs are open.
If you close all tabs and run again, the error should clear up.
add a comment |
Assuming that you already downloaded chromeDriver, this error is also occurs when already multiple chrome tabs are open.
If you close all tabs and run again, the error should clear up.
add a comment |
Assuming that you already downloaded chromeDriver, this error is also occurs when already multiple chrome tabs are open.
If you close all tabs and run again, the error should clear up.
Assuming that you already downloaded chromeDriver, this error is also occurs when already multiple chrome tabs are open.
If you close all tabs and run again, the error should clear up.
edited Jan 15 at 19:20
Bob Dalgleish
6,17612235
6,17612235
answered Jan 7 at 1:22
tugcetugce
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53073411%2fselenium-webdriverexceptionchrome-failed-to-start-crashed-as-google-chrome-is%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown