Skip to content
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

[chrome_print] Connect to the Browser websocket URL instead of the Page one #159

Merged
merged 7 commits into from
Jan 15, 2020

Conversation

RLesur
Copy link
Collaborator

@RLesur RLesur commented Dec 23, 2019

This is an attempt to fix #158. I'm unable to reproduce the bug declared in #158 but I think that controlling the target (i.e. tab or page) creation could resolve it.

The strategy is the following:

  • use the Browser websocket URL instead of the default Page websocket URL (I expect that the Browser URL is available before the Page one)
  • send a command to create a new target
  • attach this target: this creates a new session with a sessionId
  • use this sessionId in all the commands

@gershomtripp Please, could you test this PR and tell me whether it solves the problem?
You need first to install the PR version with:

remotes::install_github("rstudio/pagedown@cdp_session")

@ghost
Copy link

ghost commented Jan 15, 2020

Sorry for the delay. Yes, this definitely fixes it for me. Thanks!

@RLesur RLesur marked this pull request as ready for review January 15, 2020 14:02
@RLesur
Copy link
Collaborator Author

RLesur commented Jan 15, 2020

@gershomtripp Great news! Thanks for your test! It will be merged soon.

@RLesur RLesur merged commit ec13029 into master Jan 15, 2020
@RLesur RLesur deleted the cdp_session branch January 15, 2020 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chrome_print() throws error "Error in get_entrypoint (debug_port): Cannot connect R to Chrome. Please retry."
1 participant