Skip to content

Conversation

@Rafikooo
Copy link
Contributor

@Rafikooo Rafikooo commented Oct 22, 2025

Q A
Branch? 1.14
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets #18459 (it introduced step-based chrome run)
License MIT

Description

This PR resolves the "user data directory is already in use" error that causes all Panther tests to fail on Symfony 5.4 matrix jobs after upgrading to BuildTestAppAction v3.0.1.

The issue occurs because BuildTestAppAction v3.0.1 starts a background Chrome process (for Chromedriver on port 9222) without specifying a user-data-dir, which conflicts with Panther's Chrome instance attempting to use the same default directory.

Root Cause

The Sylius behat.yml.dist configuration was incorrectly placing Chrome arguments under options.browser_arguments, which is completely ignored by the behat-panther-extension. The correct configuration path is manager_options.capabilities.goog:chromeOptions.args.

This configuration error was introduced in commit 04a222b and went unnoticed because it only manifested when BuildTestAppAction v3.0.1 removed the default Chrome installation (which was already running with a user-data-dir).

Changes

  • behat.yml.dist: Fixed Chrome arguments configuration to use the correct path:
    • Moved arguments from sessions.panther.panther.options.browser_arguments (ignored)
    • To sessions.panther.panther.manager_options.capabilities.goog:chromeOptions.args (correct)
    • Added --user-data-dir=/tmp/panther-chrome-data to prevent conflicts with Chromedriver's Chrome instance

This ensures Panther's Chrome process uses a unique user data directory, allowing it to run alongside BuildTestAppAction's Chrome instance without conflicts.

Technical Details

  • BuildTestAppAction's Chrome uses default user-data-dir (or will use /tmp/chrome-chromedriver-behat in future versions)
  • Panther's Chrome now explicitly uses /tmp/panther-chrome-data
  • The fix resolves the issue on both Symfony 5.4 (Panther v2.1.1) and Symfony 6.4 (Panther v2.2.0)

@Rafikooo Rafikooo requested a review from a team as a code owner October 22, 2025 11:58
@probot-autolabeler probot-autolabeler bot added the Maintenance CI configurations, READMEs, releases, etc. label Oct 22, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

@Rafikooo Rafikooo force-pushed the 1.14-panther-user-data-dir branch 11 times, most recently from 8d94d46 to 8de070a Compare October 23, 2025 10:26
@Rafikooo Rafikooo force-pushed the 1.14-panther-user-data-dir branch from 8de070a to 40aa276 Compare October 23, 2025 10:51
@GSadee GSadee merged commit 8f3a0e5 into Sylius:1.14 Oct 23, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintenance CI configurations, READMEs, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants