florentbr/SeleniumBasic

Chrome failed to start: crashed

MAF-BAI opened this issue · 4 comments

I am getting an error when trying to open Chrome through vba.

Environment is as follows:
References has Selenium Type Library in C:\Program Files\SeleniumBasic\Selenium64.tlb; SeleniumWrapper Type Library in C:\Program Files (x86)\SeleniumWrapper\SeleniumWrapper.tlb
Chromedriver is also in both of those locations (Selenium was installed as administrator so it is not in the user appdata folder, but in program files). Chromedriver and Chrome versions match (105)

With this code
Sub Test()
Dim bot As New WebDriver
bot.Start "chrome", "https://www.google.com/"
bot.get "/"
End Sub

I get this error in the command window: ERROR: GPU process launch failed: error_code=2 then FATAL: gpu_data_manager_impl_private.cc GPU process isn't usable. Goodbye

Followed by this in Excel:
Run-time error '-2146233079 (80131509)':
Unknown error: chrome failed to start: crashed. (chrome not reachable)
(the process started from chrome location c:\program files\google\chrome\application\chrome.exe is no longer running, so chromedriver is assuming that chrome has crashed)

I am able to launch chromedriver.exe from the directory without error. When I try to run StartChrome.vbs from the scripts folder as a test, I get an error:
Line 3
Char 1
Error: UnknownError
unknown error:Chrome failed to start: crashed with the same path as above,
at the bottom it shows
Code: A00A000D
Source: Selenium

The script runs on another machine with the same version of Chrome/ChromeDriver/Windows/Excel. I have searched for other troubleshooting steps but am at a loss. Any guidance is appreciated.

Did you check if chrome browser executable is installed in: "c:\program files\google\chrome\application\chrome.exe"?

I'm having the same issue, and mine is installed there. Also, 'chromedriver.exe' from the Selenium folder crashes, as does 'StartChrome.vbs'. 'StartChromeDebug.vbs' works, but it is loading using the shell.

Did you check if chrome browser executable is installed in: "c:\program files\google\chrome\application\chrome.exe"?

The chrome executable is in the referenced path.

We have multiple people logging into the computer which is why it was installed as administrator in the program files directory versus in the appdata directory specific to a user.

The debug log shows:
ERROR:sandbox_policy_base.cc(343)] Failed to add sandbox rule. error = 2, subsystem = 0, semantics = 0,

If that provides any insight. I don't know if I need to add Chrome options in vba or how to do that. I have had to add some options for some Python scripts but not sure how to do that in VBA.