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
- Click Add on the command toolbar
- Enter the following:
- Name:
args - Type:
List
Step 3: Add Chrome arguments
- Click More […] next to
args - In the List Property Builder dialog, click Add
- 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/shmshared 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 ![]()