RStudio desktop will not start but R env okay and rstudio/rsession processes exist

Error Information:

Description of issue

I was working in RStudio when I got an error that the connection to R was lost and it wanted to restart, which it did. I usually have headaches when this happens, so I q() out of RStudio and have not been able to get the desktop at all now. When I try to launch RStudio, no window opens but I see rstudio/rsession as processes. Before trying again, I would manually kill the rstudio process, which then gives me the message:

/common/apps/R-4.0.3/lib/R/bin/javareconf: line 379: 5977 Terminated ${run_prog}

Within the same terminal window (running rstudio in Debian on a server at work), other Java-based GUI apps work fine. Typing R in the same console enters the R environment with no problem. My attempts never create lines in the log files in .rstudio-desktop/log/

When I launch RStudio, I get the the usual messages I get anyway when it did work (which I tried to copy here but the forum system pukes at me -- can't create more than 2 links as a newbie).

Attempted steps taken to fix -

I tried restarting the console from which I launch RStudio, restarting the VNC server in which I run RStudio, deleting any init .[rR]* files from the places where I usually start RStudio, renaming the folder .rstudio-desktop.

I once had a similar problem and the culprit was non ASCII characters in a Rmarkdown file I was working on -- so I went through all my .Rmd and .R files in emacs, removed all suspicious characters, and deleted all associated .tex/.log/.html files.

Even after doing all that (deleting any init files and folders before each iteration), I still can't get the RStudio desktop (I've waited up to about half an hour). Our sys admin assures me that nothing was changed/updated on the system when this was happening.

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: rstudio-1.2.1335
  • OS Version: Debian 4.9.246-2 (2020-12-17) x86_64 GNU/Linux
  • R Version: 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
  • Output your diagnostics report (if possible): when run rstudio --run-diagnostics, it hangs. Had to ^C out of it and there was no rstudio-diagnostics folder nor diagnostics-report.txt anywhere

Aha -- it works now. I honestly am not sure what did it, but I wanted to post my experience the last time I had this problem that it was the suspicious characters that prevented RStudio desktop from launching. This linux command let me find culprit characters that I needed to remove from my Rmd files:
cat <file> | LC_ALL=c tr -d "[:alnum:][:punct:][:space:]" (Thank you, Matthias Pietsch!)
Hope that helps someone else and save them the several days it took me to figure that one out with Matthias' help!

Glad you solved the problem! could you post a reduced example RMD file that fails? And identify which character(s) caused Rstudio to not load?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.