-
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
Error in startup(): ! Chrome debugging port not open after 10 seconds. #124
Comments
Yeah. I confirm this is due to |
I found a solution. In my
This works. In this way the Now I'm wondering: should I restore this variable at the end of the session? And how? |
I'm experiencing this same issue. I have not set HTTP_PROXY or NO_PROXY, and I used The original package I use that calls Chromote was
And I get the error:
I definitely have Chrome (v118.0.5993.71), which I can launch from an R terminal (system2('cmd', args = '/c start chrome https://www.google.com'), and I'm running on Windows 10 (OS=20348.1970, version=21H2). |
Does |
I'm not sure if it does (though GPT says it interacts directly with a Chromium-based browser through Chrome DevTools Protocol), but this definitely coincides roughly with the timing of the Chrome update. I installed the beta version of chromedriver (https://googlechromelabs.github.io/chrome-for-testing/#beta) and updated my Windows system PATH to point to it, but I'm still getting the same error. My PATH wasn't pointing to Chromedriver before, either. So maybe chromote uses something else? I also tried changing the browser to Edge, which is Chromium-based, following the steps here: https://cran.r-project.org/web/packages/chromote/readme/README.html#specifying-which-browser-to-use
|
I think there's a timeout option for And did you try the chrm <- Chrome$new(
path = chromePath, # you can use 'find_chrome()'
args = "--disable-gpu --headless --remote-debugging-port=9222"
)
chromote <- Chromote$new(browser = chrm) |
I couldn't figure out how to change the default_timeout parameter. I tried your code, but it resulted in the same error after this:
As a reminder, the error is:
I do have a clue: I've been developing and (recently) shinytest2-ing the app in VS Code. However, I'm not encountering the error in R Studio Server. Not sure what to make of that. |
Try setting |
That successfully upped the time, but it still didn't work:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
In case it's helpful, here's the backtrace:
And here's the specific line that fails: Line 153 in 84ac340
Similar to this StackOverflow post, it's working on RStudio Server, but not VS Code or RStudio app, on my VPN. |
@dmurdoch I don't think chromote (nor webshot2) use
@alex-silverman Can you try looking at the error output of the chrome process on your server? You can use code like the following, I've included the results I see when running chrome locally on my Mac. library(chromote)
chrm <- Chrome$new(
path = find_chrome(),
args = "--disable-gpu --headless"
)
chrm$get_path()
#> [1] "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
chrm$get_port()
#> [1] 7676
readLines(chrm$get_process()$get_error_file())
#> [1] ""
#> [2] "DevTools listening on ws://127.0.0.1:7676/devtools/browser/0b0b64c4-039f-4375-9e74-a11a80e0fd29" |
@gadenbuie: Sorry for the noise. I guess it's Rselenium that uses chromedriver. |
@gadenbuie - I get the same error/failure on this line:
So I can't even run |
@alex-silverman shoot, sorry, in retrospect it makes sense you wouldn't make it that far. I'm trying to figure out how we can get more logging details out of Chrome. We might not get much, but the error file I read above lives in your R session temp directory. You could try looking at the contents of the log files created in the process of launching (or trying to launch) chrome: dir(tempdir(), pattern = "chrome-") Is there anything helpful in there? |
woah, I think you might have found the answer! Looks like my admins are blocking it: DevTools remote debugging is disallowed by the system admin. Let me check with them to confirm. |
Is a solution that retains HTTP_PROXY possible? After debugging, it seems running this function is what causes the error
I've checked with our system admins and they have allowed debugging. If I enter the ip address above in Chrome it also seems to work fine |
Hi, after running:
I get the timeout error: Error in trying: content of tempfile: [1014/171004.068642:ERROR:socket_posix.cc(93)] CreatePlatformSocket() failed: Permission denied (13) I guess chromote is not using new headless mode? Thanks |
@s-elsheikh These are the most important lines, which indicate that there's some kind of permissions issue. It's very unlikely that it's related to chromote using the legacy headless mode.
The issue is probably with Chrome and Ubuntu 24.04 or your specific environment. You can try setting the library(chromote)
options(chromote.launch.echo_cmd = TRUE)
b <- ChromoteSession$new()
#> Running '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' \
#> '--headless=old' '--remote-debugging-port=33697' \
#> '--remote-allow-origins=http://127.0.0.1:33697' \
#> '--force-color-profile=srgb' --disable-extensions --mute-audio |
Hi I'm new to the I'm currently struggling to render my book using Github Actions due to this same error message as OP. I've had a crack at increasing the time out in the workflow file following @gadenbuie suggestion but I don't think its working because {chromote} is being called by quarto in a different session. What is interesting is that was passing at one brief moment, however reverting back to that commit seems to now fail Github Actions. Very hard to write a reprex for this context since its on CI but here is my best attempt. Book renders fine locally. usethis:: create_from_github("invertau/inverthotspot")
renv::restore()
quarto::quarto_render()
quarto::quarto_preview() Would really appreciate some advice and tips! |
Folks, I've managed to bypass Github Actions by freezing my Quarto computations! Free free to mark my above comment as off topic! Thank you again :) |
Hello,
My package giacR starts with this code:
I have not tried it today but yesterday it worked fine. However, when I run this code today:
then I get the error message
Today I set a value to the environment variables
HTTP_PROXY
andHTTPS_PROXY
. Could it be related? My laptop has also been updated (I don't know what have been updated).The text was updated successfully, but these errors were encountered: