karatelabs/karate · warning

configure driver = } — bypassing driver pool; browser will…

Error message

configure driver = {{ stop: false }} — bypassing driver pool; browser will be left running on scenario exit (debug use only)

What it means

This warning fires when a user configures `configure driver = { ... stop: false }`. Because stop:false is a debug-only flag, Karate bypasses the driver pool entirely (`provider = null`) so the browser instance is not recycled or auto-closed on scenario exit. The browser will keep running after the scenario finishes.

Solutions

  1. Remove `stop: false` from the driver config for normal runs
  2. Keep stop:false only in a scratch/debug feature not committed
  3. Re-enable pooling by ensuring the config map has no `stop:false` (or `stop: true`)

Example fix

// before
configure driver = { type: 'chrome', stop: false }
// after
configure driver = { type: 'chrome' }
Defensive patterns

Strategy: validation

Validate before calling

// In karate-config.js, keep stop:false out of shared configs:
var cfg = { type: 'chrome' }; // never set stop:false in committed config

Type guard

function isDebugDriverConfig(map) { return map != null && Boolean.FALSE.equals(map.get('stop')); }

Prevention

When it happens

Trigger: `configure driver = { type: 'chrome', stop: false }` (or equivalent) in a feature, Background, or karate-config; scenario-scoped driver with the stop flag set to false and a pool provider present.

Common situations: Debugging DOM state after a failed step; copying a debug config into committed features; leaving `stop:false` set after a debugging session.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of karatelabs/karate@a22eb90246 (2026-09-12). Data as JSON: /api/errors/90778c76b0162c77. Report an issue: GitHub.

Appendix: source

Thrown at karate-core/src/main/java/io/karatelabs/core/ScenarioRuntime.java:2179

        io.karatelabs.driver.DriverProvider provider = null;
        if (featureRuntime != null && featureRuntime.getSuite() != null) {
            provider = featureRuntime.getSuite().getDriverProvider();
            // Default userDataDir to <buildDir>/karate-temp/chrome-<uuid> if not explicitly set
            // Uses buildDir (target or build) as sibling to karate-reports, not inside it
            if (!configMap.containsKey("userDataDir")) {
                java.nio.file.Path tempDir = java.nio.file.Path.of(
                        io.karatelabs.common.FileUtils.getBuildDir(),
                        "karate-temp",
                        "chrome-" + java.util.UUID.randomUUID().toString().substring(0, 8));
                configMap.put("userDataDir", tempDir.toAbsolutePath().toString());
            }
        }

        // stop:false is a debug-only flag — bypass the driver pool so the instance
        // we hand out isn't recycled or auto-closed by the pool's lifecycle.
        boolean stopFlag = !Boolean.FALSE.equals(configMap.get("stop"));
        if (!stopFlag && provider != null) {
            logger.warn("configure driver = {{ stop: false }} — bypassing driver pool;"
                    + " browser will be left running on scenario exit (debug use only)");
            provider = null;
        }

        // Determine driver type and parse scope
        String driverType = (String) configMap.getOrDefault("type", "chrome");
        boolean isW3c = io.karatelabs.driver.w3c.W3cBrowserType.isW3cType(driverType);

        if (isW3c) {
            io.karatelabs.driver.w3c.W3cDriverOptions w3cOptions = io.karatelabs.driver.w3c.W3cDriverOptions.fromMap(configMap);
            this.driverScope = w3cOptions.getScope();
        } else {
            CdpDriverOptions cdpOptions = CdpDriverOptions.fromMap(configMap);
            this.driverScope = cdpOptions.getScope();
        }

        Driver driver;
        if (provider != null) {

View on GitHub (pinned to a22eb90246)