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

Chrome v132 no longer supports old headless mode #187

Closed
chlebowa opened this issue Jan 16, 2025 · 3 comments · Fixed by #189
Closed

Chrome v132 no longer supports old headless mode #187

chlebowa opened this issue Jan 16, 2025 · 3 comments · Fixed by #189
Assignees

Comments

@chlebowa
Copy link

For now, to avoid disruption, chromote defaults to using the old headless mode. In the future, chromote will follow Chrome and default to `"new"` headless mode. (And at some point, Chrome intends to remove the old headless mode which is now offered as [a separate binary](https://developer.chrome.com/blog/chrome-headless-shell).) To test the new headless mode, use `options(chromote.headless = "new")` or `CHROMOTE_HEADLESS="new"` (in `.Renviron` or via `Sys.setenv()`). (#172)

It seems the hour is upon us:

Error in `with_random_port()` at chromote/R/chrome.R:195:3:
! Cannot find an available port. Please try again.
Caused by error in `startup()`:
! Failed to start chrome. Error:
Old Headless mode has been removed from the Chrome binary. Please use the new Headless mode (https://developer.chrome.com/docs/chromium/new-headless) or the chrome-headless-shell which is a standalone implementation of the old Headless mode (https://developer.chrome.com/blog/chrome-headless-shell).
Backtrace:
     x
  1. \-chromote::ChromoteSession$new()
  2.   \-chromote (local) initialize(...) at R6/R/new.R:156:5
  3.     \-chromote::default_chromote_object() at chromote/R/chromote_session.R:60:7
  4.       +-chromote::set_default_chromote_object(Chromote$new()) at chromote/R/chromote.R:552:5
  5.       \-Chromote$new() at chromote/R/chromote.R:552:5
  6.         \-chromote (local) initialize(...) at R6/R/new.R:156:5
  7.           \-Chrome$new() at chromote/R/chromote.R:36:7
  8.             \-chromote (local) initialize(...) at R6/R/new.R:156:5
  9.               \-chromote:::launch_chrome(path, args) at chromote/R/chrome.R:[redacted]
 10.                 \-chromote:::with_random_port(launch_chrome_impl, path = path, args = args) at chromote/R/chrome.R:195:3
 11.                   \-rlang::abort(...) at chromote/R/utils.R:185:3
 12. 
@gadenbuie
Copy link
Member

gadenbuie commented Jan 16, 2025

@gadenbuie
Copy link
Member

Note that with chromote 0.3.1, you can opt into using the new headless mode by setting

options(chromote.headless = "new")

or via the env var

CHROMOTE_HEADLESS=new

@chlebowa
Copy link
Author

Yes, that's what I did. Thank you for including that in the NEWS 👍

@gadenbuie gadenbuie self-assigned this Jan 16, 2025
@gadenbuie gadenbuie changed the title Chrome no longer supports old headless mode Chrome v132 no longer supports old headless mode Jan 16, 2025
@gadenbuie gadenbuie pinned this issue Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants