Skip to content

session not created on Chromedriver 132+ #1123

@ssada1975

Description

@ssada1975

Bug description

since Chromedriver 132 phpwebdriver isn't able to start Chrome with error:
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

How could the issue be reproduced

$options = array(
        '--no-sandbox',
        '--verbose',
        '--headless',
        "--user-data-dir=/home/site/wwwroot/temp/browser/tmp/profile-67c3658f93f6d5260',
        '--window-size=1920,1080',
        '--start-maximized',
        '--profile-directory=/home/site/wwwroot/temp/browser/tmp/',
        '--disable-dev-shm-usage',
        '--disable-blink-features=AutomationControlled',
        '--disable-infobars',
        '--disable-search-engine-choice-screen', //changed with 129, with 127 works without
    );
$chromeOptions = new ChromeOptions();
    $chromeOptions->addArguments($options);
$capabilities = DesiredCapabilities::chrome();
    $capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);
$driver =  ChromeDriver::start($capabilities);

Expected behavior

Here is the error

["results":"Facebook\WebDriver\Exception\WebDriverException":private]=> --   | array(1) {   | ["value"]=>   | array(3) {   | ["error"]=>   | string(19) "session not created"   | ["message"]=>   | string(157) "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"   | ["stacktrace"]=>   | string(512) "#0 0x64251b69f14a   | #1 0x64251b13cb80   | #2 0x64251b17603f   | #3 0x64251b171d7f   | #4 0x64251b1c2819   | #5 0x64251b1c1d46   | #6 0x64251b1b3ca3   | #7 0x64251b17ff08   | #8 0x64251b181071   | #9 0x64251b668b5b   | #10 0x64251b66cae2   | #11 0x64251b654967   | #12 0x64251b66d6d4   | #13 0x64251b638c7f   | #14 0x64251b68dcd8   | #15 0x64251b68dea9   | #16 0x64251b69dfc6   | #17 0x7dfe64d4d1c4   | "   | }

Php-webdriver version

1.15.1

PHP version

8.3

How do you start the browser driver or Selenium server

$driver = ChromeDriver::start($capabilities);

Selenium server / Selenium Docker image version

No response

Browser driver (chromedriver/geckodriver...) version

No response

Browser name and version

No response

Operating system

linux

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions