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

webshot2::webshot doesnt return from being called #18

Open
SatoshiReport opened this issue Mar 18, 2021 · 8 comments
Open

webshot2::webshot doesnt return from being called #18

SatoshiReport opened this issue Mar 18, 2021 · 8 comments

Comments

@SatoshiReport
Copy link

I run webshot about 1,000 times a day and every few days I don't get a return status. I have to restart my program as there is no way that I know off to get around this. Is there options I can use to help debug this?

@wch
Copy link
Collaborator

wch commented Mar 19, 2021

Can you provide more detailed information? Like what are you taking a screenshot of, and what exactly does you mean by "I don't get a return status?"

@nstrayer
Copy link
Contributor

@SatoshiReport , Are you running appshot or webshot? If you're running appshot you may want to look at (#19), which enables detection and forwarding of errors in the app-running background process. This can make debugging these mysterious no return calls easier.

@yanxianl
Copy link

Hi, I also have a similar problem when trying to call webshot2 from the flextable package. I tried to capture the bug using reprex but it didn't work. Below is a minimal example:

library(dplyr)
library(flextable)

ft <- iris %>%
group_by(Species) %>%
summarise_all(median) %>%
flextable()

ft_ws2 <- as_raster(ft, webshot="webshot2")

The code worked for the first time but when I tried again, the R was stuck at the last step like forever. It worked if I set webshot="webshot". Not sure if this is a webshot2 or flextable problem.

@yanxianl
Copy link

update: I confirmed that I could run the code ft_ws2 <- as_raster(ft, webshot="webshot2") in a new R session. But if I run the code again in the same R session, then R runs the code forever. I need to assign a new variable name to make it work. R is also stuck when I render the code in RMarkdown.

@wch
Copy link
Collaborator

wch commented Jun 15, 2021

I think this may be fixed by rstudio/chromote@e423b4b

And it may also need the fix here: #21

@yanxianl
Copy link

After updating the webshot2, I could repeatedly run the code from R console. However, when I try to knit the RMarkdown file, I got an error message saying: Error: Chromote: timed out waiting for event Page.loadEventFired. I got this error message when I ran the code from R console for the first time but disappeared when I ran the code again.

@dmurdoch
Copy link
Contributor

@yanxianl : Could you clarify which versions you were using? You may need webshot2 from my PR as well as the latest chromote update. You'll get both of those using

remotes::install_github(c("rstudio/chromote",
                      "dmurdoch/webshot2@fixlockup"))

@yanxianl
Copy link

The webshot2 version was 0.0.0.9000 (RemoteSha@f62e743). I updated the webshot2 to @fixlockup and it worked! Now I can knit the RMarkdown file. Thanks!

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

No branches or pull requests

5 participants