[Trouble Shooting 101] Invalid Session error in the execution log

Troubleshooting: “Invalid session” error when running tests on Chrome (Katalon Studio)

Symptom

When executing tests with the Chrome browser, you may see an Invalid session (or “invalid session id”) error in the Execution Log, and the run may stop unexpectedly.

This issue is commonly seen in restricted or resource-limited environments (for example: CI/CD, Docker, Linux servers, or machines with limited shared memory). A practical fix is to launch Chrome with a few stability-focused arguments.

Fix: Add Chrome arguments in Desired Capabilities

Step 1: Open Chrome Desired Capabilities

From your opened project in Katalon Studio, go to:

Project > Settings > Desired Capabilities > WebUI > Chrome

Step 2: Add args as a List capability

  1. Click Add on the command toolbar
  2. Enter the following:
  • Name: args
  • Type: List

Step 3: Add Chrome arguments

  1. Click More […] next to args
  2. In the List Property Builder dialog, click Add
  3. Add these values (each as a String):
  • --no-sandbox
  • --disable-dev-shm-usage
  • --disable-gpu

Your list should look like this:

Type Value
String --no-sandbox
String --disable-dev-shm-usage
String --disable-gpu

Why these arguments help

  • --no-sandbox: Helps in containerized or restricted permission environments (often required in Docker/CI).
  • --disable-dev-shm-usage: Prevents Chrome from crashing due to small /dev/shm shared memory limits (common on Linux/containers).
  • --disable-gpu: Avoids GPU-related instability on environments without proper GPU support.

Quick validation checklist

After saving the settings:

  • Re-run the same test suite on Chrome.
  • Confirm the session stays alive (no “Invalid session” in the log).
  • If the error still appears, try upgrading Chrome + ChromeDriver to compatible versions (this mismatch is another frequent cause).

Enjoy testing as always :grinning_face:

3 Likes

Another good tip for beginners

useful post

also worth double checking that your ChromeDriver version matches the installed Chrome version on the first step. mismatches can trigger this issue too