Migchw
August 25, 2024, 1:52pm
1
I'm encountering an issue when using the gtsave()
function from the gt
package to save a table as a PNG file. The error message suggests that it cannot find an available port to start Chrome. Here are the details:
library(gt)
library(dplyr)
mtcars %>%
head() %>%
gt() %>%
gtsave("test.png")
Error in with_random_port()
:
! Cannot find an available port. Please try again.
Caused by error in startup()
:
! Failed to start chrome. Error:
├─mtcars %>% head() %>% gt() %>% gtsave("test.png")
└─gt::gtsave(., "test.png")
└─gt:::gt_save_webshot(data = data, filename, path, ...)
└─webshot2::webshot(...)
└─chromote::default_chromote_object()
├─chromote::set_default_chromote_object(Chromote$new())
└─Chromote$new()
└─chromote (local) initialize(...)
└─Chrome$new()
└─chromote (local) initialize(...)
└─chromote:::launch_chrome(path, args)
└─chromote:::with_random_port(launch_chrome_impl, path = path, args = args)
Has anyone else encountered this issue? Any suggestions or workarounds would be greatly appreciated!
Thanks in advance for your help!
I have the issue, it randomly just started yesterday. It is system wide for us.
I also just started having this issue with code that ran fine two weeks ago. I updated all my packages to no avail. The traceback is the same.
Migchw
August 29, 2024, 4:07am
4
I found additional information from this thread. You can check it out by following this link.
opened 03:51PM - 23 Aug 24 UTC
Having errors after Chrome update to v128, for example:
When Chrome is alread… y running on the machine, `b <- ChromoteSession$new()` produces the following error:
Error in `with_random_port()`:
! Cannot find an available port. Please try again.
Caused by error in `startup()`:
! Failed to start chrome. Error:
When Chrome is not already running `b <- ChromoteSession$new()` will run, but executing `b$view()` will not open any window. Trying to open Chrome app will also not run after creating a new session with this command.
system
Closed
November 27, 2024, 4:07am
5
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.