Katalon Github actions: Could not start a new session

Hello, I am trying to run my Katalon Studio project using Katalon GitHub actions.

Katalon version: 10.1.0
Operating system: Linux (ubuntu-latest)

it is unable to open Chrome browser

here is our simplified yml file

name: Katalon Tests

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v4

    - name: Run Katalon Tests
      uses: katalon-studio/katalon-studio-github-action@v4.0
      with:
        version: '10.1.0'
        projectPath: '${{ github.workspace }}'
        args: '-noSplash -retry=0 -testSuitePath="Test Suites/SingleTestCaseTestSuite" -browserType="Chrome" -executionProfile="default" -apiKey=${{ secrets.KATALON_API_KEY }} --config -webui.autoUpdateDrivers=true'
1 Like

Hi @mateusz.mysliwiec,

Thank you for letting us know your issue.

The error message suggests that Chrome is unable to start due to the --user-data-dir issue. This often happens when multiple Chrome instances are running or when the directory is already in use.

I would like to suggest that:

1. Explicitly Set a Unique User Data Directory

Modify your args in the yml file to specify a unique --user-data-dir for Chrome.
Add the following option inside your args parameter:

args: '-noSplash -retry=0 -testSuitePath="Test Suites/SingleTestCaseTestSuite" -browserType="Chrome" -executionProfile="default" -apiKey=${{ secrets.KATALON_API_KEY }} --config -webui.autoUpdateDrivers=true --config -webui.userDataDir=/tmp/chrome-user-data'

2. Disable User Data Directory Sharing
Try running Chrome in a temporary mode without using a specific user data directory:

args: '-noSplash -retry=0 -testSuitePath="Test Suites/SingleTestCaseTestSuite" -browserType="Chrome (headless)" -executionProfile="default" -apiKey=${{ secrets.KATALON_API_KEY }} --config -webui.autoUpdateDrivers=true'

This ensures Chrome runs in headless mode, which avoids conflicts with user data directories.

3. Ensure Chrome and WebDriver are Compatible
Since you’re using Katalon 10.1.0, it’s crucial to update the Chrome WebDriver:

  • Add this to your YAML script:
    args: '-noSplash -retry=0 -testSuitePath="Test Suites/SingleTestCaseTestSuite" -browserType="Chrome" -executionProfile="default" -apiKey=${{ secrets.KATALON_API_KEY }} --config -webui.autoUpdateDrivers=true'
    
  • Ensure that webui.autoUpdateDrivers=true is enabled.

4. Manually Install Chrome and ChromeDriver
If the issue persists, add a step to install the latest Google Chrome and ChromeDriver before running tests:

    - name: Install Chrome
      run: |
        sudo apt update
        sudo apt install -y google-chrome-stable

    - name: Install ChromeDriver
      run: |
        sudo apt install -y chromium-chromedriver

This ensures your Chrome browser and WebDriver are correctly installed before running Katalon tests. Read more about our 10.1.0 release note here: Katalon Studio Release Notes: Version 10.x | Katalon Docs.

Thank you

Hi @Elly_Tran - thank you for detailed response, I have tried all proposed solutions, and it is working only with Chrome (headless) mode, but we would really like to avoid that, do you think it is a bug with Katalon?

@mateusz.mysliwiec

What do you want Katalon to do? Could you enumate your concrete requirements/suggestions here?

Try executing your tests with cloud platform providers like testcloud/browserstack/saucelabs in headful mode

@dineshh

Could you explain why TestCloud (or BrowserStack, SourceLabs) is a better fit for @mateusz.mysliwiec than GitHub Actions?

1 Like