Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless Mode refactoring for the removal of old Headless Mode #3434

Open
mdmintz opened this issue Jan 19, 2025 · 0 comments
Open

Headless Mode refactoring for the removal of old Headless Mode #3434

mdmintz opened this issue Jan 19, 2025 · 0 comments
Assignees
Labels
enhancement Making things better

Comments

@mdmintz
Copy link
Member

mdmintz commented Jan 19, 2025

Headless Mode refactoring for the removal of old Headless Mode

As detailed in https://developer.chrome.com/blog/removing-headless-old-from-chrome, Chrome's old headless mode has been removed in Chrome 132. The SeleniumBase headless1 option mapped to it (--headless=old). Before Chrome's newer headless mode appeared, it was just headless. After the newer --headless=new option appeared, the SeleniumBase headless2 option mapped to it.

Now that the old headless mode is gone, a few changes will occur to maintain backwards compatibility:

  • If the Chrome version is 132 (or newer), headless1 will automatically remap to --headless / --headless=new.
  • If the Chrome version is less than 132, then headless1 will continue mapping to --headless=old.

So in summary, on Chrome 132 or newer (once this ticket is complete), headless1 is the same as headless is the same as headless2. All those will map to the same (new) headless mode on Chrome.

In the meantime, attempting to use the old headless mode on Chrome 132 (or newer) causes the following error to occur:

selenium.common.exceptions.SessionNotCreatedException: Message: 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

(Not sure where that error is coming from, but the message is misleading because the real cause of the error is the removal of Chrome's old headless mode, and not some problem with the user data directory.)

@mdmintz mdmintz added the enhancement Making things better label Jan 19, 2025
@mdmintz mdmintz self-assigned this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Making things better
Projects
None yet
Development

No branches or pull requests

1 participant