-
Notifications
You must be signed in to change notification settings - Fork 20
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
Problem with Chrome v128 #170
Comments
I am having the same issue since today. Everything worked yesterday.
The ports that are tried are: 33403 5029 35925 8541 2155 33826 46754 41097 42704 22106 |
I just updated to Chrome 128.0.6613.85 and chromote is working fine for me. That's usually a sign that there are some environment or operating system characteristic at play with your issue. Can you please include the results of |
|
@bradvf can you please include all of the output? If the output prints too many packages, try this |
|
Having the issue since yesterday after chrome update to 128
Here is the session info:
|
Can you please try with the latest development version of chromote? At the very least it might surface more context about the error. remotes::install_github("rstudio/chromote") |
Very stressful situation since yesterday. Today me with my little team spent whole day to fix this issue but unable. We found out, the port number returned after execution with_random_port() function is always null. I expect a help from a guru to find out where is the problem. Our hosted product in shinyapps.io for hotels room price analysis seems still working. However, problem is coming from desktop trial. Cheers
|
@gadenbuie same error with the development version: |
Having the same issue here Error in with_random_port(): |
For anyone struggling with this, a temporary solution was to download Chrome For Testing version 127 (https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.120/win64/chrome-win64.zip). You can then point chromote to that browser via:
|
I was able to reproduce the issue with Chrome v128 in Windows 11 via Parallels. Immediately after installing the updated Chrome version, the following would fail as described above: library(chromote)
b <- ChromoteSession$new()
#> Error in `with_random_port()`:
#> ! Cannot find an available port. Please try again.
#> Caused by error in `startup()`:
#> ! Failed to start chrome. Error:
#> Run `rlang::last_trace()` to see where the error occurred. The lack of error message is a result of the Chrome process exiting almost immediately, or before chromote has a chance to do anything with the process. Running the following in a command prompt was exiting immediately without starting a Chrome process:
As I understand it, Chrome is in the process of transitioning from
I couldn't find anything mentioning a change to the That said, when I changed Can anyone in this thread try my process to see if it works for you? Use chromote::find_chrome()
#> [1] "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" and then, in a command or power shell prompt, run the executable once with the "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless=new --remote-debugging-port=9876 --remote-allow-origins=http://127.0.0.1:9876 I included the
After that, you can stop the process by pressing Ctrl + C and then try using chromote in R to start a new session with
|
@gadenbuie I found that I can only run your command line when Chrome is closed. When Chrome is already open, the command fails immediately. However, I still receive the same errors in R after successfully running the command line. |
@bradvf Does headless Chrome work correctly when called from the command line? Try running this command, it should output the HTML of https://example.com. "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --dump-dom https://example.com
# <html><head>
# <title>Example Domain</title>
# [...snip...]
# </body></html> |
@bradvf Do you receive the same errors when Chrome is open or closed? You might need to use Task Manager to verify that there aren't any running Chrome processes. |
When Chrome is closed, this will work. When Chrome is open, this produces no output. Guessing this is a problem directly with Chrome that chromote won't be able to get around. |
oh! So the cause might be having or not having Chrome open, rather than the commands I was using. I stopped all chrome processes while testing |
That's right, this is certainly a Chrome-specific issue, especially since we can reproduce the error without using chromote at all. That's a good start! I'm surprised this hasn't been reported in other chrome-automation packages, though. 🤔 |
Also related: once I start a Chrome session via chromote, I can't then start a normal headful instance of Chrome until I completely shut down the R session. |
Same behavior for Chrome Beta (129.0.6668.12 (arm64)) |
This has been reported in the Chromium bug tracker in at least two places, we'll have to wait for an upstream fix. |
I have tried with this approach. However, it provides same error. |
Many thanks Bro. At least I have something now to work with. |
Chromium is a snap on Ubuntu. https://snapcraft.io/docs/quickstart-tour#pause-or-stop-automatic-updates |
New chromium issue to follow |
The latest version of chromote v0.3.0 (now on CRAN!) uses If you're encountering the problem in this thread, please use the latest version of chromote: install.packages("chromote")
|
Hi - having big issues related to this chrome v128 update. `> library(gt)
Attempted the workaround suggested by bradvf and end up with same error: `chrome_path <- "C:\chrome-win64\chrome.exe"
Any help appreciated - I am very reliant on this! Thankyou! |
I too encountered an error when the chrome got updgated. Right now I initiate the chrome session like this.. and I get the error 'Cannot find an available port. Please try again.' chromote::set_default_chromote_object( Is is suggested to add --headless=new ?? like below? chromote::set_default_chromote_object( |
@Billy-Pilgrim-UIT Can you please install the latest chromote (v0.3.1) and try again? There was a small but consequential bug in v0.3.0 |
do you recommend including c("--headless", "new") option? I would like to keep the old behaviour as is. |
@gadenbuie here is the full trace of the error when trying to iniate new chrome session. Error in fetching the screenshot of the URL:Cannot find an available port. Please try again. |
@tatvabodhini if you install the latest version of chromote, you won't need to change anything to keep the old behavior. With the latest version you can test the new headless mode by setting |
The new version of chromote resolved my issue with saving to a png file (using But it has not solved my issue of converting an html to a pdf (using
This may be unrelated to the Chrome package. For those having this issue you can add the path to another browser in argument
|
@ValentineHerr Great to hear the new version of chromote is working for you! Unfortunately, while |
@gadenbuie The issue still persisted. So I had to go back to old version of chrome. Chrome version "127.0.6533.119" worked for me with chromote 0.3.1 version package. I did not set the environment variables as refrerenced in package updates. I guess the old behaviour persisted and worked. |
@tatvabodhini please feel free to open a new issue with a reproducible example |
Thankyou @gadenbuie - that was my blind spot. I was running Chromote v0.3.0. Upgrading to v0.3.1 appears to have fixed the issue. |
Adding this for posterity: I was having issues with image sizes in Webshot. We have a Shiny app with Webshot image downloads that is deployed to shinyapps.io. After making a deploy to shinyapps.io on 23/08/24 (NZT), all images were getting downloaded with a width of 780px no matter what. After a lot of investigating (including finding this gh issue), I theorized that shinyapps.io had updated their server image to Chrome 128, and that our problems might also be caused by this version. Just chiming in to say that updating to Chromote v0.3.1 (with no code updates) has fixed the issue! Images are now downloading at the correct size. Thanks so much for this! |
Closing because the problem is resolved with Chromote 0.3.1. |
I got error when try to update chromote package package ‘chromote’ successfully unpacked and MD5 sums checked |
I can fix the problem with this code thank so much !
|
Having errors after Chrome update to v128, for example:
When Chrome is already 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 executingb$view()
will not open any window. Trying to open Chrome app will also not run after creating a new session with this command.The text was updated successfully, but these errors were encountered: