Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Could not start R session, timed out - with renv and language server

Aperta
#731 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
r
Ambito
tooling

Direzione di ricerca

Riproducete il timeout con il .Rprofile del progetto che esegue il source di renv/activate.R, quindi confrontatelo con la configurazione funzionante in cui quella riga di source è commentata. Iniziate dallo stack trace di R Language Server OUTPUT e dai tempi di avvio di Git Bash riportati. Il lavoro è completato quando il language server riesce ad avviare una sessione R con l’attivazione di renv abilitata, oppure quando sono documentati la causa e l’aggiustamento del timeout necessario.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Trying to get language server to work in latest build of VS Code, R 4.6.0,

Project dependencies are managed with renv. I have verified I have renv installed in both local and project library.

When launching VS Code, I get the following stack trace from the OUTPUT tab for R Language Server:

R Language Server (5068) started
R library paths: F:/Programs/R/R-4.6.0/library

[2026-05-25 23:14:23.818] Error: ! Could not start R session, timed out
Call: [1] "rs_init(self, private, super, options, wait, wait_timeout)"
Stack trace:
1: throw(new_error("Could not start R session, timed out"))
2: rs_init(self, private, super, options, wait, wait_timeout)
3: initialize(...)
4: callr::r_session$new(options = callr::r_session_options(system_profile = TRUE, 
    user_profile = TRUE), wait = TRUE)
5: private$find_or_create_session()
6: self$diagnostics_task_manager$run_tasks()
7: self$process_events()

[2026-05-25 23:14:23.820] exiting

[Error - 11:14:23 PM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 11:14:23 PM] Client R Language Server: connection to server is erroring.
read ECONNRESET
[Error - 11:14:23 PM] Connection to server got closed. Server will not be restarted.
R Language Server (5068) exited with exit code null

Any ideas? I believe it's due to the renv environment being activated because when I comment out the source file added to my .Rprofile project file, it works fine. But when renv activation script is sourced in .Rprofile (source("renv/activate.R"), it throws this error. I could not find any way to adjust timeout settings. I timed a launch of my CLI (Git Bash), it takes approximately 5 seconds with the activation script. Without the activation sourced, it's essentially instant.

So is it an issue with how long it's taking renv to scan files in my environment? I have added all non .R scripts to my .renvignore to speed the process up.

Lingua principale
R
Stelle
675
Fork
118
Merge medio
1g 11h
PR unite (30g)
11

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di REditorSupport/languageserver

Tutte le issue di REditorSupport/languageserver

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.