4

I have made a site using blogdown but never got around to deploying it. I haven't touched my site for maybe a month and half but the live preview was working at that time. I could see a preview of my site in the Viewer tab.

Today, I opened my project and blogdown initiated the live preview on startup. However, I got the following error:

ERROR: The process "2848" not found.
Error: It took more than 30 seconds to launch the server. There may be something wrong. The process has been killed. If the site needs more time to be built and launched, set options(blogdown.server.timeout) to a larger value.

I restarted R and my device. I updated R, Rstudio and all of my packages. I still get an error but the process number changes every time I open the project or run blogdown::serve_site().

I thought that maybe my site is taking too long to load because it's too large even though it only has a few posts so far. So, I tried creating a new test site using the default Hugo theme and it started up as expected with the preview. However, if I try to change the Hugo theme using install_theme() I've run into this same error message.

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5      bookdown_0.21   ps_1.4.0        digest_0.6.27  
 [5] later_1.1.0.1   R6_2.5.0        jsonlite_1.7.1  magrittr_1.5   
 [9] evaluate_0.14   blogdown_0.21   rlang_0.4.8     promises_1.1.1 
[13] rstudioapi_0.11 rmarkdown_2.5   tools_4.0.3     servr_0.20     
[17] processx_3.4.4  httpuv_1.5.4    xfun_0.18       yaml_2.2.1     
[21] compiler_4.0.3  htmltools_0.5.0 knitr_1.30

Update 10/30: Issue resolved

As suggested in the comments, I ran blogdown::build_site which gave me different errors. I fixed the first one about a bad request. I am not able to reproduce the error now but the fix was to add ignoreErrors =["error-remote-getjson"] to my config.toml file

dhonda
  • 41
  • 2
  • FYI this issue [has been fixed in the dev version of **blogdown**](https://github.com/rstudio/blogdown/commit/32349667206b5e00b610c0ec913456aab4812439). – Yihui Xie Feb 22 '21 at 02:33

1 Answers1

2

Since you didn't provide a reproducible example, my current guess is that you run into a blogdown bug that I have fixed two weeks ago. Please try the current development version:

remotes::install_github('rstudio/blogdown')

Remember to restart R.

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
  • 1
    I tried this, but I got a similar error about the server taking more than 5 seconds. Not sure how to provide a reproducible example, since it occurs on start up. Here are the steps I take: 1. Open R 2. Open project 3. ```blogdown:::preview_site(startup = TRUE``` automatically runs in the console – dhonda Oct 30 '20 at 15:09
  • Where do I set options for blogdown? The error suggests changing options(blogdown.server.timeout) to a greater value. – dhonda Oct 30 '20 at 15:19
  • You can set the option in the file `.Rprofile`. However, I doubt if it will help. Try to run `blogdown::build_site()` and see if it tells you more information. – Yihui Xie Oct 30 '20 at 17:44
  • Thank you! I ran ```blogdown::build_site()``` which gave me a Bad Request error which I was able to fix. – dhonda Oct 30 '20 at 19:49
  • @YihuiXie I face the exact same problem as described above. I tried the steps you suggested above. When I run blogdown::build_site(), it goes smoothly without any problem. Though, I can't preview my website. – Y_gr Oct 31 '20 at 14:05
  • @Y_gr Could you please provide a reproducible example? You may file an issue to https://github.com/rstudio/blogdown/issues with the reproducible example (such as a Github repo). Thanks! – Yihui Xie Oct 31 '20 at 21:32