org.openqa.selenium.WebDriverException: unexpected issue: Chrome failed to initiate: crashed.(chrome inaccessible)

Having issues running Java script (selenium framework) on Chrome.

Tried various solutions but still facing problems:

  1. Unchecked run as admin
  2. Added arguments

Snippet of the code:

ChromeOptions options = new ChromeOptions();
//options.setExperimentalOption("debuggerAddress", "127.0.0.1:9222");
options.setBinary("C:/Program Files/Google/Chrome/Application/chrome.exe");
options.addArguments("--no-sandbox");
options.addArguments("--headless");
options.addArguments("--disable-gpu");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("start-maximized"); // open Browser in maximized mode
options.addArguments("--disable-extensions"); // disabling extensions
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--remote-debugging-port=9222");

Chrome version: 108.0.5359.125

selenium-java-3.141.59

selenium-server-3.4.0

Using web driver manager for automation

Operating system - Windows 10

Error message received:

"C:\Program Files\Java\jdk1.8.0_351\bin\java.exe" -C:/Users/..../ISA/src/test/resources/Checklist/NFTE1_Confirm_login.feature
Testing started at 09:07 AM ...
inside chrome browser configuration
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}) on port 35499
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1674119263.153][WARNING]: Deprecated chrome option is ignored: useAutomationExtension
[1674119263.156][WARNING]: Deprecated chrome option is ignored: useAutomationExtension

Skipped step

Skipped step
Executed scenario successfully

Failed scenarios:
C:/Users/...../ISA/src/test/resources/Checklist/NFTE1_Confirm_login.feature:15 # Scenario Outline: Login to ISA

1 Scenarios (1 failed)
2 Steps (2 skipped)
0m20.488s

org.openqa.selenium.WebDriverException: 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.)

Answer №1

To achieve this, you can utilize one of the following:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>
    <version>3.141.59</version>
</dependency>

Alternatively, go with:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>3.4.0</version>
</dependency>

Do not mix both options.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Convert JSON objects within an array into HTML format

Is there a way to reformat an array of JSON objects that has the following structure? [{"amount":3,"name":"Coca-Cola"},{"amount":3,"name":"Rib Eye"}] The desired output in plain HTML text would be: 3 - Coca-Cola 3 - Rib Eye What is the best approach to ...

The input box fails to show larger values on the user's page

Show me the biggest number that the user enters in an input box and then display it back to them. I need some improvements to my code, ideally making it possible with just one input box instead of two. <!DOCTYPE html> <html la ...

Leveraging async/await to handle the insertion of SQL data

function Scan_Insert_Recursive (dir_path) { //scans dir_path recursively and inserts file path into a temporary list Scan_Recursive(dir_path, (err, files) => { //using npm recursive_readdir for scanning if(err) { console.log(err) ...

What is the best way to retrieve data from multi-dimensional JSON structures?

Looking to extract specific values from my JSON file. console.log( objects.assignments.header.report_type ); I need to display HOMEWORK Javascript $.ajax({ url: "/BIM/rest/report/assignment", type: "POST", dataTyp ...

"Utilize gulp-connect to store the root as an array

The gulp-connect documentation mentions that options.root can accept either an array or string. My situation involves having a build directory that I want to use as the root, along with a separate sources directory where all my source maps are located. Is ...

Using slashes in the import statement versus using require statement

Note: I am currently running on node version 14.1 Here is the line of code I'm experimenting with: import "module-alias/register"; This results in the following error: Error [ERR_MODULE_NOT_FOUND]: Cannot find module The error seems to point to t ...

Factory not properly updating AngularJS controller

I am facing an issue with two controllers and one factory in my AngularJS application. The first controller sends an http request to a server, receives a string in response, and stores it in the factory. However, the second controller does not update with ...

Chromedriver bug

from selenium import webdriver url = 'https://www.youtube.com/watch?v=CHUxmVVH2AQ' browser = webdriver.Chrome() browser.get(url) browser.find_element_by_xpath('//*[@id="thumbnail"]').click() ISSUE Traceback (most recent call ...

Updating JSON in JavaScript

I am striving to structure a JSON object in the following manner: {"tokenId":1,"uri":"ipfs://bafy...","minPrice":{"type":"BigNumber","hex":"0x1a"},"signature":"0 ...

Having trouble accessing variables using the put method in Laravel with XMLHttpRequest

I am struggling to save my image data using XMLHttpRequest. Although I can send json data and see them in the developer console, I am unable to access them on the server side as the $request appears to be null. Below are snippets of my JavaScript code: ...

Creating custom functions within views using Sencha Touch 2

I'm having trouble creating my own function in Sencha Touch 2 and I keep receiving an error: Uncaught ReferenceError: function22 is not defined The issue seems to be coming from my Position.js file located in the View directory. Ext.define(' ...

AngularJS Assessing an Attribute directive following an Element directive

Currently, I am utilizing an angular plugin that can be found at the following link: https://github.com/angular-slider/angularjs-slider The objective is to customize the "legends" produced by the directive. In order to achieve this customization, the dire ...

NPM packages installed on a global level are not being detected

Recently, I experienced a system crash that led me to delete some files in an attempt to fix the issue. Among those files may have been ~/.profile. Since restoring my system, I've noticed that my globally installed npm packages are no longer functioni ...

"Failure to Update: Ajax Auto-Refresh Table Failing to Refresh

I'm facing a tricky issue with my code that I just can't seem to resolve. Currently, I am using Ajax and setTimeout to retrieve data. The problem arises when the data doesn't refresh automatically (if I manually navigate to the page getdata. ...

WhatsApp automation is encountering an issue with selenium.common.exceptions.WebDriverException, specifically noting that there is an unknown error related to the absence of the DevToolsActivePort

Attempting to execute a python script to automate WhatsApp messages results in an error when the script is run. selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: Backtrace: ...

Retrieving custom data attributes from slides within a slick carousel

After the recent Slick carousel update to version 1.4, there have been changes in how data attributes are accessed from the current slide. The previous method that was working fine is as follows: onAfterChange: function(slide, index) { $('.projec ...

Submitting a JavaScript array to MongoDB using a React application: A guide to success!

As a beginner delving into the world of React and MongoDB, I'm encountering difficulties in establishing communication between the two technologies. Recently, I've been following a detailed tutorial on Medium that focuses on utilizing the Plaid A ...

An error occurred while processing the JSReport request

I am encountering an issue while trying to utilize the jsreport API for rendering a report template. The error I am facing is as follows: { body: "{"body":"\"{\\\"template\\\":{\\\"shortid\\& ...

Error: The initialization function received an unknown keyword argument 'log_path'

I am trying to use Selenium and PhantomJS to generate a screenshot. Below is the code I am running from a virtualenv with Python 2.7 on Windows 8: from selenium import webdriver br = webdriver.PhantomJS(executable_path='C:\phantomjs\phantom ...

Having trouble selecting ionic specific elements within a hybrid app with appium

Currently, I am working on automating the build process for a hybrid app developed in Ionic2 with Cordova and TypeScript. The structure of the HTML page appears as follows: <ion-input _ng_somename class="header-signin-part"> <input clas ...