humble_me
humble_me

Reputation: 331

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

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)

Upvotes: 8

Views: 9497

Answers (5)

garcesj
garcesj

Reputation: 599

In my case was related to Java-dependent package xlxs, removing it (form R terminal, no within RStudio) worked.

Upvotes: 0

Ferroao
Ferroao

Reputation: 3066

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.

Upvotes: 2

igorkf
igorkf

Reputation: 3575

(02-05-2020: Solution for Ubuntu 18.04)

After spending too many time, I found a solution:

  • First remove r-base and others stuffs related to R

Remove files (with care) using:

sudo find . -type f -name "*rstudio*"
sudo find . -type f -name "*.RData*"
sudo find . -type f -name "*.Rhistory*"

You can use -delete to delete all files listed by the commands above using (be careful):

sudo find . -type f -name "*rstudio*" -delete

After removing eveything related to R and RStudio, restart the computer and install R using the following:

https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-18-04-quickstart

After installing R, install RStudio by this link:

https://rstudio.com/products/rstudio/download/#download

Obs.: I think removing R related files from ~.config folder that really solved the problem.

Upvotes: -1

I tried to use few method but not works, finally get the solution via the link.

<p>R encountered a fatal error.</p>The session was terminated.

Upvotes: 0

jjcasta3
jjcasta3

Reputation: 21

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

Upvotes: 1

Related Questions