Selenium: WebDriverException:Chrome failed to start: crashed as google-chrome is no longer running so...












3














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)









share|improve this question





























    3














    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)









    share|improve this question



























      3












      3








      3







      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)









      share|improve this question















      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 google-chrome selenium-webdriver selenium-chromedriver






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 31 '18 at 7:23









      DebanjanB

      39.1k73576




      39.1k73576










      asked Oct 30 '18 at 21:54









      SOehSOeh

      255




      255
























          3 Answers
          3






          active

          oldest

          votes


















          1














          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:



          Chrome_binary_expected_location



          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:



          Chrome executable in a non-standard location






          share|improve this answer

















          • 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



















          3














          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/')





          share|improve this answer























          • 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



















          0














          Assuming that you already download chromeDriver,this error is also occurs when already multiple chrome tabs open. Try to close all tabs and run again.






          share|improve this answer








          New contributor




          tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            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
            });


            }
            });














            draft saved

            draft discarded


















            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

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            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:



            Chrome_binary_expected_location



            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:



            Chrome executable in a non-standard location






            share|improve this answer

















            • 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














            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:



            Chrome_binary_expected_location



            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:



            Chrome executable in a non-standard location






            share|improve this answer

















            • 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








            1






            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:



            Chrome_binary_expected_location



            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:



            Chrome executable in a non-standard location






            share|improve this answer












            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:



            Chrome_binary_expected_location



            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:



            Chrome executable in a non-standard location







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 31 '18 at 7:26









            DebanjanBDebanjanB

            39.1k73576




            39.1k73576








            • 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




              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













            3














            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/')





            share|improve this answer























            • 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
















            3














            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/')





            share|improve this answer























            • 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














            3












            3








            3






            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/')





            share|improve this answer














            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/')






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Oct 30 '18 at 22:42

























            answered Oct 30 '18 at 22:30









            NgoCuongNgoCuong

            34917




            34917












            • 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










            • @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











            0














            Assuming that you already download chromeDriver,this error is also occurs when already multiple chrome tabs open. Try to close all tabs and run again.






            share|improve this answer








            New contributor




            tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.























              0














              Assuming that you already download chromeDriver,this error is also occurs when already multiple chrome tabs open. Try to close all tabs and run again.






              share|improve this answer








              New contributor




              tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.





















                0












                0








                0






                Assuming that you already download chromeDriver,this error is also occurs when already multiple chrome tabs open. Try to close all tabs and run again.






                share|improve this answer








                New contributor




                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                Assuming that you already download chromeDriver,this error is also occurs when already multiple chrome tabs open. Try to close all tabs and run again.







                share|improve this answer








                New contributor




                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 2 days ago









                tugcetugce

                1




                1




                New contributor




                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                tugce is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


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




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Ottavio Pratesi

                    Tricia Helfer

                    15 giugno