cucumber / cucumber/website

Code from website does not work.

Open
#116 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
10
Forks
26
Avg merge
1d 23h
Merged PRs (30d)
37

Description

Hi

I'm running cucumber-js using Node:24 in Docker. The container image and the container are short lived.

Versions:
Chrome: 136.0.7103.92
@cucumber/cucumber: ^11.2.0
assert: ^2.1.0
chai: ^5.2.0
chromedriver: ^136.0.0
selenium-webdriver: ^4.32.0

The following code taken from https://cucumber.io/docs/guides/browser-automation/?lang=javascript

```
const { Given, When, Then, AfterAll } = require('cucumber');
const { Builder, By, Capabilities, Key } = require('selenium-webdriver');
const { expect } = require('chai');

require("chromedriver");

// driver setup
const capabilities = Capabilities.chrome();
capabilities.set('chromeOptions', { "w3c": false });
const driver = new Builder().withCapabilities(capabilities).build();
```

Causes the following error message:

```
/app/node_modules/selenium-webdriver/lib/error.js:523
let err = new ctor(data.message)
^

SessionNotCreatedError: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
at Object.throwDecodedError (/app/node_modules/[4mselenium-webdriver[24m/lib/error.js:523:15)
at parseHttpResponse (/app/node_modules/[4mselenium-webdriver[24m/lib/http.js:524:13)
at Executor.execute (/app/node_modules/[4mselenium-webdriver[24m/lib/http.js:456:28)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
remoteStacktrace: '#0 0x5564f97157fa \n' +
'#1 0x5564f91b9e90 \n' +
'#2 0x5564f91f3cfb \n' +
'#3 0x5564f91efa3f \n' +
'#4 0x5564f923fc15 \n' +
'#5 0x5564f923f136 \n' +
'#6 0x5564f9231013 \n' +
'#7 0x5564f91fdb3b \n' +
'#8 0x5564f91fe7a1 \n' +
'#9 0x5564f96dab9b \n' +
'#10 0x5564f96dea8a \n' +
'#11 0x5564f96c2912 \n' +
'#12 0x5564f96df604 \n' +
'#13 0x5564f96a774f \n' +
'#14 0x5564f9703678 \n' +
'#15 0x5564f9703856 \n' +
'#16 0x5564f9714666 \n' +
'#17 0x7fd4475861f5 \n'
}

Node.js v24.0.1
[1G[0K\[1G[0K
```

I don't know how to fix it. I've already tried adding --user-data-dir.

Contributor guide

Open the contributing guide

Research direction

Start with the browser automation guide at https://cucumber.io/docs/guides/browser-automation/?lang=javascript and reproduce the example using the Node, Chrome, and package versions listed in the issue. Compare the documented setup with the reported SessionNotCreatedError; done means the published example works in the stated short-lived Docker container or clearly documents the required setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.