v128: Multiple headless browsers not working

524 views
Skip to first unread message

CG

unread,
Aug 26, 2024, 3:31:37 PMAug 26
to Chromium-dev
Since the v128 update (from v127) I cannot run more than one instance of --headless at one time.  Similarly, if the headful/full GUI Chrome is running, --headless will not run.

I have tested older versions (v127 and v116) and can run multiple --headless instances at one time and can run --headless while a headful browser is running.  Chrome Beta v129 also does not work.

Testing on Windows 11.  Current version of Chrome: v128.0.6613.85.  I am testing via powershell and golang os/exec.

Alexei Svitkine

unread,
Aug 26, 2024, 5:30:40 PMAug 26
to coreym...@gmail.com, Chromium-dev
You can try running bisect-builds.py to find the change that caused the regression. This would make the bug report much more actionable.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/0e5c3c96-16da-4f86-a721-70cea0646519n%40chromium.org.

Corey Gilmore

unread,
Aug 27, 2024, 4:08:21 PMAug 27
to Peter Kvitek, Chromium-dev
Peter,

Thank you for your help.

On Mon, Aug 26, 2024 at 5:56 PM Peter Kvitek <kvi...@google.com> wrote:
Corey,

Is there any use to keeping the user data directory around for reuse?
Chrome stores a lot of things in the user data directory, however, your use case does not need any of that since you used old headless before and it does not persist any data. Specifying a temporary directory with --user-data-dir switch is a very common practice in test automation.

Best,
/Peter




On Mon, Aug 26, 2024 at 2:34 PM Corey Gilmore <coreym...@gmail.com> wrote:
Hello,

Thank you for the help.  I saw in past notes that --headless was changing, but didn't realize the change went into effect with v128.  The v128 notes didn't say anything about --headless [1, 2] so I was at a loss.

I implemented the --user-data-dir switch and I can now get Chrome to run multiple headless instances.

Per your notes, "the user data directory...cannot be shared", so is the best way to handle running multiple instances by providing a randomized path to ---user-data-dir and then deleting that directory after use?  Is there any use to keeping the user data directory around for reuse?



On Mon, Aug 26, 2024 at 4:14 PM Peter Kvitek <kvi...@google.com> wrote:
v128 changed --headless switch default to 'new', so you're running the new headless which is actual Chrome running with no visible UI vs old headless which is an alternate browser implementation.

Since the new headless is real Chrome it will try to re-use the same user data directory as the regular Chrome and those cannot be shared between Chrome instances. You can work around it by specifying different user data dirs explicitly using --user-data-dir switch.

You can still run old headless using --headess=old switch. However, be advised that old headless will be removed from Chrome binary soon.

Best,
/Peter


--

Corey Gilmore

unread,
Aug 27, 2024, 4:08:34 PMAug 27
to Peter Kvitek, Chromium-dev
Hello,

Thank you for the help.  I saw in past notes that --headless was changing, but didn't realize the change went into effect with v128.  The v128 notes didn't say anything about --headless [1, 2] so I was at a loss.

I implemented the --user-data-dir switch and I can now get Chrome to run multiple headless instances.

Per your notes, "the user data directory...cannot be shared", so is the best way to handle running multiple instances by providing a randomized path to ---user-data-dir and then deleting that directory after use?  Is there any use to keeping the user data directory around for reuse?



On Mon, Aug 26, 2024 at 4:14 PM Peter Kvitek <kvi...@google.com> wrote:
v128 changed --headless switch default to 'new', so you're running the new headless which is actual Chrome running with no visible UI vs old headless which is an alternate browser implementation.

Since the new headless is real Chrome it will try to re-use the same user data directory as the regular Chrome and those cannot be shared between Chrome instances. You can work around it by specifying different user data dirs explicitly using --user-data-dir switch.

You can still run old headless using --headess=old switch. However, be advised that old headless will be removed from Chrome binary soon.

Best,
/Peter


On Mon, Aug 26, 2024 at 12:31 PM CG <coreym...@gmail.com> wrote:
--

CG

unread,
Aug 27, 2024, 4:08:36 PMAug 27
to Chromium-dev, CG
I have since tested this on an Ubuntu 22.04 server machine, however, this is running chromium (still version 128).  I CAN run multiple instances of chromium in headless mode at the same time.  Looks like a Windows related issue.

Rebooted.  Did not help.  Reinstalled Chrome.  Did not help.

Peter Kvitek

unread,
Aug 27, 2024, 4:08:47 PMAug 27
to Corey Gilmore, Chromium-dev
Corey,

Is there any use to keeping the user data directory around for reuse?
Chrome stores a lot of things in the user data directory, however, your use case does not need any of that since you used old headless before and it does not persist any data. Specifying a temporary directory with --user-data-dir switch is a very common practice in test automation.

Best,
/Peter




On Mon, Aug 26, 2024 at 2:34 PM Corey Gilmore <coreym...@gmail.com> wrote:

Peter Kvitek

unread,
Aug 27, 2024, 4:09:06 PMAug 27
to coreym...@gmail.com, Chromium-dev
v128 changed --headless switch default to 'new', so you're running the new headless which is actual Chrome running with no visible UI vs old headless which is an alternate browser implementation.

Since the new headless is real Chrome it will try to re-use the same user data directory as the regular Chrome and those cannot be shared between Chrome instances. You can work around it by specifying different user data dirs explicitly using --user-data-dir switch.

You can still run old headless using --headess=old switch. However, be advised that old headless will be removed from Chrome binary soon.

Best,
/Peter


On Mon, Aug 26, 2024 at 12:31 PM CG <coreym...@gmail.com> wrote:
--

Peter Kvitek

unread,
Aug 27, 2024, 7:29:09 PMAug 27
to coreym...@gmail.com, Chromium-dev
Yes, indeed, it's confirmed to be the problem on Windows platform only, here's the case.

Best,
Peter

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
Reply all
Reply to author
Forward
0 new messages