Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Script alert R encountered a fatal error. This session was terminated

Tags:

r

rstudio

I was using RStudio regularly and all was working smoothly..But recently my Windows crashed terribly and had to be restored to a previous time. Thereafter, when I opened RStudio, my project is not opening ad repeatedly showing the error Java Script alert R encountered a fatal error. This session was terminated. I am sure I had closed Rstudio properly the time I had last used it before the Windows crash. Can anyone tell me how I could solve this problem(preferably without losing much data and work on RStudio)

like image 717
humble_me Avatar asked Jul 28 '16 16:07

humble_me


2 Answers

goto folder

c:/Users/yourUserName/AppData/Local/Rstudio-Desktop

And delete the file history_database. (For someone in linux, search the folder .rstudio) You will NOT lose your open files history or environment history. You may have to change your default folder, and open manually its .Rdata file, in order to get the last environment you saved. Ex.: load(paste0(getwd(),"/.RData") )

This solution can also work for Rstudio-server errors like:

ERROR session hadabend; LOGGED FROM: rstudio::core::Error<unnamed>::rInit(const rstudio::r::session::RInitInfo&)

See: https://community.rstudio.com/t/continuous-crash-on-rstudio-server/19302

These errors happen usually for having several untitled files open. After recovering, you may have to copy text of open files to empty files before saving.

like image 109
Ferroao Avatar answered Nov 14 '22 08:11

Ferroao


I had this issue when I installed a newer version of RStudio. It went away after I uninstalled the previous version of the software.

like image 1
jjcasta3 Avatar answered Nov 14 '22 08:11

jjcasta3