Caroline
Caroline

Reputation: 470

RStudio Server returns "Cannot read property 'error' of null"

When I try to go into RStudio Server (1.0.44), I get the following error in the browser:

RStudio Initialization Error (TypeError) : Cannot read property 'error' of null

This happens before logging in - it has the rotating clock thing for a minute and goes straight into that.

I have tried all sorts of remedies, including restarting the server, rebooting, uninstalling and reinstalling RStudio server, changing the port settings, deleting the .RStudio folder in my home directory, etc. I checked the system log and that didn't seem to have anything relevant. There were a few errors, of course, but nothing after I got the error.

Also, R works fine from the terminal and I have the latest version of both R and RStudio.

Anyone have any ideas?

Upvotes: 2

Views: 5821

Answers (3)

Sina
Sina

Reputation: 812

You probably tried to restart rstudio already, but this is not enough.Follow these steps:

  1. Do a ps -u user where user is one of the user whose session is returning the error in the browser

[root]# ps -u username

PID TTY TIME CMD

19445 ? 00:00:18 rsession

  1. kill the rsession related to it using it's PID.

[root]# kill 19445

  1. start rstudio using sudo rstudio-server start.

  2. Go to the folder contained within the project you were working with last and delete the ProjectName.Rproj file.

  3. restart rstudio using sudo rstudio-server restart

P.S: If after second step, problem remains, you could remove the .Rproj file using command line: rm directory/of/Rproj/File/ProjectName.Rproj

Upvotes: 5

saken
saken

Reputation: 21

rm -r .rstudio
sudo rstudio-server suspend-all

worked for me. I first also moved .RData to a separate folder and upgraded the rstudio server. However, still the problem remained.

Upvotes: 1

Caroline
Caroline

Reputation: 470

I went through a lot of trouble and have finally managed to get it to work again. What ultimately seems to have worked is upgrading to the newest version (1.0.136), deleting all .Rhistory and .Rproj.user files, stopping the server and deleting the .rstudio file in my user profile, and then restarting. I wish I had more info on why it stopped and what fixed it exactly, but at least it's working again. Note that when I upgraded--and before deleting the .rstudio folder (which I had already done a few times), the error message changed to:

Status code 500 returned

So that seems to be the same error--maybe this will help someone else to resolve this problem.

Upvotes: 0

Related Questions