0
  1. I have written test cases using webdriverIO with cucumber and pushed everything on github and checked my local, it is working fine

  2. I have configured Jenkins with github

  3. Before that jenkins was configured in Ubuntu server machine and I have installed chrome and firefox browser

  4. Run and check I am getting below error message.

Showing below error on wdio.conf.log file

2024-05-16T14:58:52.635Z INFO wdio-multiple-cucumber-html-reporter:

The 'r2024-05-16T14:58:53.182Z INFO webdriver: Initiate new session using the WebDriver protocol

2024-05-16T14:58:53.185Z INFO webdriver: [POST] http://localhost:4444/wd/hub/session

2024-05-16T14:58:53.186Z INFO webdriver: DATA
{
  capabilities: {
    alwaysMatch: {
      browserName: 'firefox',
      acceptInsecureCerts: true,
      'moz:firefoxOptions': [Object],
      'wdio:sharedStoreServicePort': 42997
    },
    firstMatch: [ {} ]
  },
  desiredCapabilities: {
    browserName: 'firefox',
    acceptInsecureCerts: true,
    'moz:firefoxOptions': { args: [Array] },
    'wdio:sharedStoreServicePort': 42997
  }
}

2024-05-16T14:58:54.003Z WARN webdriver: Request failed with status 500 due to Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: Process unexpectedly closed with status 1
Host info: host: 'ip-172-31-4-79', ip: '172.31.4.79'
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.8.0-1008-aws', java.version: '17.0.11'
Driver info: driver.version: unknown
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.8.0-1008-aws', java.version: '17.0.11'
Driver info: driver.version: unknown

2024-05-16T14:58:54.003Z INFO webdriver: Retrying 1/3

2024-05-16T14:58:54.003Z INFO webdriver: [POST] http://localhost:4444/wd/hub/session

2024-05-16T14:58:54.004Z INFO webdriver: DATA
{
  capabilities: {
    alwaysMatch: {
      browserName: 'firefox',
      acceptInsecureCerts: true,
      'moz:firefoxOptions': [Object],
      'wdio:sharedStoreServicePort': 42997
    },
    firstMatch: [ {} ]
  },
  desiredCapabilities: {
    browserName: 'firefox',
    acceptInsecureCerts: true,
    'moz:firefoxOptions': { args: [Array] },
    'wdio:sharedStoreServicePort': 42997
  }
}

Locally it is working fine but it's not working on ubuntu server. I have tried firefox and chrome browser both are showing similar error.

6
  • Have you tried running the test in headless mode? Commented May 17, 2024 at 8:24
  • Yes, I tried it on headless mode.. Commented May 19, 2024 at 2:35
  • ok, are the chrome and firefox drivers present in the path as well? Also, information on how you've installed the browser would be helpful. Commented May 20, 2024 at 9:30
  • @Techrookie89 I have installed chrome browser using wget like this wget dl.google.com/linux/direct/… with sudo dpkg -i google-chrome-stable_current_amd64.deb. and the path is /usr/bin/google-chrome Commented May 20, 2024 at 15:33
  • Ok, need one more info. I need you to locate the chromedriver binary path (mostly it would be under node_modules/chromedriver/bin. Once located I want you to share the output you get for executing ./chromedriver Commented May 20, 2024 at 16:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.