REditorSupport / languageserver

An implementation of the Language Server Protocol for R
Other
564 stars 91 forks source link

Error with renv: Header must provide a Content-Length property #645

Open duccioa opened 7 months ago

duccioa commented 7 months ago

Hello, I am not sure this is the right place to post this, but languageserver is giving me an error when I start VScode on a project with renv activated. This error does not prevent the functioning of the package but it pops out of VScode every time I open a project with renv. I have started to notice this error popping out since the latest update in VScode.

Here's the log of the error. I moved the json configuration that is logged to the attached file for readability. languageserver_error_log.log

R library paths: <path to project>/renv/library/R-4.1/x86_64-pc-linux-gnu
/home/myuser/.cache/R/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/9a444a72
[2023-11-30 09:51:34.600] connection type: stdio
[2023-11-30 09:51:34.700] received:  Content-Length: 5981
[2023-11-30 09:51:34.738] received payload.
[2023-11-30 09:51:34.738] handling request:  initialize
[2023-11-30 09:51:34.738] session:  {<config file see attachment>}
[2023-11-30 09:51:37.212] workspace initialize error:  <callr_timeout_error/callr_error/rlib_error_3_0/rlib_error/error>
Error in `get_result(output = out, options)`:
! callr timed out
[2023-11-30 09:51:37.592] deliver:  ["Response", "Message", "R6"]
[Error - 09:51:37] Client R Language Server: connection to server is erroring.
Header must provide a Content-Length property.
{"- the project is out-of-sync -- use `renv":":status()` for details.\nContent-Length: 871"}

System

languageserver 0.3.15 renv 1.0.3

VScode info :

Version: 1.84.2
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:50:47.800Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.5.6-76060506-generic

R session info:

R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Pop!_OS 22.04 LTS

Matrix products: default

BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] s4c_2.5.4         here_1.0.1        dplyr_1.1.3       magrittr_2.0.3    sf_1.0-14         data.table_1.14.8 devtools_2.4.5    usethis_2.2.2    

loaded via a namespace (and not attached):
 [1] tidyselect_1.2.0    remotes_2.4.2.1     purrr_1.0.2         vctrs_0.6.4         generics_0.1.3      miniUI_0.1.1.1      htmltools_0.5.6     utf8_1.2.3          rlang_1.1.1         pkgbuild_1.4.2      e1071_1.7-13        urlchecker_1.0.1   
[13] later_1.3.1         pillar_1.9.0        glue_1.6.2          todor_0.1.2         DBI_1.1.3           sessioninfo_1.2.2   lifecycle_1.0.3     stringr_1.5.0       htmlwidgets_1.6.2   memoise_2.0.1       callr_3.7.3         fastmap_1.1.1      
[25] rex_1.2.1           httpuv_1.6.11       ps_1.7.5            class_7.3-22        fansi_1.0.5         Rcpp_1.0.11         KernSmooth_2.23-22  xtable_1.8-4        renv_1.0.3          promises_1.2.0.1    classInt_0.4-10     BiocManager_1.30.22
[37] cachem_1.0.8        pkgload_1.3.3       jsonlite_1.8.7      mime_0.12           fs_1.6.3            digest_0.6.33       stringi_1.7.12      processx_3.8.2      shiny_1.7.5         grid_4.1.2          rprojroot_2.0.3     cli_3.6.1          
[49] tools_4.1.2         lazyeval_0.2.2      proxy_0.4-27        tibble_3.2.1        profvis_0.3.8       crayon_1.5.2        pkgconfig_2.0.3     ellipsis_0.3.2      prettyunits_1.2.0   rstudioapi_0.15.0   lgr_0.4.4           R6_2.5.1           
[61] units_0.8-4         compiler_4.1.2     

Thank you