RLesur / crrri

A Chrome Remote Interface written in R
https://rlesur.github.io/crrri/
Other
157 stars 12 forks source link

Errors for Browser domain methods #15

Open RLesur opened 6 years ago

RLesur commented 6 years ago

In the current version, the chr_connect() function connects to the websocket entrypoint page found at http://localhost:9222/json, see https://github.com/RLesur/crrri/blob/c873002025b0caf66df895e77617e541d75fccf5/R/chr_connect.R#L241-L246

However, methods of the Browser domain can only be sent at the browser websocket entrypoint that can be found at http://localhost:9222/json/version

I don't know whether other domains are concerned.

RLesur commented 6 years ago

I think we should re-think the model of the DevToolsConnexion class. By now, it inherits of the websocket::WebSocket class: https://github.com/RLesur/crrri/blob/c873002025b0caf66df895e77617e541d75fccf5/R/DevToolsConnexion.R#L7-L8

With this modelisation, we only can connect to a single entrypoint. It is not sufficient.

cderv commented 5 years ago

Related to #8 to try using EventEmitter class instead of websocket to fix this bug