rstudio / chromote

Chrome Remote Interface for R
https://rstudio.github.io/chromote/
156 stars 20 forks source link

ChromeRemote unable to call is_alive() #169

Open Manestricker opened 1 month ago

Manestricker commented 1 month ago

A browser object created using a <- ChromeRemote$new(host="localhost", port=9222) is unable to call a$is_alive(). From what I understand, this is because the process is never set which results in Error in a$is_alive() : attempt to apply non-function as there is now process to call on.

Manestricker commented 1 month ago

The goal here is to connect to an already running instance of chrome by creating a ChromeRemote browser object, creating a new Chromote object with this browser, then creating a ChromoteSession with the parent as this Chromote object.

a <- ChromeRemote$new(host="localhost", port=9111) #creates a remote browser
bWindow <- Chromote$new(browser = a) #doesn't work because process is null
rider <- ChromoteSession$new(parent = set_default_chromote_object(bWindow))
rpodcast commented 4 weeks ago

I'm encountering the same issue when I use a custom container powered by Apptainer to launch a chrome process via the {processx} package and trying to get the ChromeRemote session to connect to that existing process. There was no issues with this workflow in version 0.1.2 (I am running version 0.3.1 currently).

gadenbuie commented 4 weeks ago

Can you share any kind of reprex @rpodcast?