Rstudio on macOS Catalina (10.15.3)

As soon as I want to open Rstudio I get the following error message:

This site can’t be reached

127.0.0.1 refused to connect.

Try:

  • Checking the connection
  • Checking the proxy and the firewall

ERR_CONNECTION_REFUSED

Reload

HIDE DETAILS

Check your Internet connection

Check any cables and reboot any routers, modems, or other network devices you may be using.

Allow Chromium to access the network in your firewall or antivirus settings.

If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.

If you use a proxy server…

Check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server: Go to Applications > System Preferences > Network > Advanced > Proxies and deselect any proxies that have been selected.

Hi, and welcome!

This issue came up last fall and @ciberger reported the following fix

brew reinstall r
brew unlink r && brew link r

from the terminal.

If you need to install brew, go to https://brew.sh.

Thanks for your answer!

But my problem is still unresolved...

I downloaded Rstudio again but still get the same error message

Hi, RStudio and R are separate programs, and RStudio won't run without R. You can install R either through brew or the package installer on https://cran.r-project.org. I'm on Catalina, too, so it is possible!

R works fine and I can open this program. But Rstudio is the problem...I cant even open it.

Could you run

sessionInfo()

from the R console and paste the results?

If I type this in R I get the following:

R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.3

Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_3.6.2

Well, we're on all fours as to base configuration. Try resetting the RStudio startup https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State

Thanks for the advice!

So far, I tried everything I could but it still does not work.....to be honest, I have absolutely no idea what to do..

1 Like

Garrr! This is driving me nuts. I don't know what I'm doing right! Just for snicks, in R try

??mutate

This should open 127, proving that it indeed does work independently of RStudio

If I type in this safari opens the 127 website....However, the Rstudio is still not working and always wants to open another window but with the 127 error.

1 Like

Well, that at least narrows it to RStudio!

Just to double check I did

mv ~/.rstudio-desktop ~/backup-rstudio-desktop

and RStudio survived the experience. It didn't have any effect on the 127 problem, because it was already working. Just to check, although you said you had, try it again? Did you also

defaults read com.rstudio.desktop > ~/backup-rstudio-prefs
defaults delete com.rstudio.desktop

(Again, I just did this on my own machine and RStudio survived the experience.)

thanks for answering and trying to help me I am really grateful for that!

So I typed this: mv ~/.rstudio-desktop ~/backup-rstudio-desktop into terminal and then it sais: No such file or directory

When I then type in the other thing: defaults read com.rstudio.desktop > ~/backup-rstudio-prefs
defaults delete com.rstudio.desktop and press enter the cursor just goes to the next line....

I am doing something wrong?

Just to let you know, I have kind of absolutely no idea what I am doing :confused:

1 Like

OK, that is likely a good tell of a failed install. RStudio should recreate them automagically if it finds them missing.

If you have AppZap or some other removal app that searches out every trace of RStudio and extirpates it, run it on RStudio then reinstall from

DO NOT install from conda (I love Anaconda for Python, but I've heard nothing but grief about it's usefulness as a package manager for anything R related) or brew (which is otherwise an indispensable tool). This has got to be possible, even I did it successfully.

So I did delete Rstudio with the AppZapper and then reinstalled Rstudio and I got still the same error.

To be honest I also did something with Homebrew when the problem first occured....but like I said I am no computer specialist and therefore did not really know what I did.

1 Like

Progress! Like I said I like brew and it has really excellent diagnostic tools. But ... they are legion and it's not obvious which one to use, so let's start with

brew cleanup

Again, I'm eating my own dog food and ran this without damage to RStudio before recommending it.

I also run brew update, without damage. (Takes a while.)

I typed both commands into terminal and they seamed to work but I still cannot open Rstudio...

1 Like

I've found a github open issue with this problem, which commenters blame on brew. One way to confirm the diagnostic is

R --version

from the terminal. You should get nothing except

bash-3.2$ R --version
R version 3.6.2 (2019-12-12) -- "Dark and Stormy Night"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.

In the meantime, I'm going to see if there's a way to brew uninstall R, try it (I love dogfood) and report back.

1 Like

Ok I took a deep breath and

bash-3.2$ brew uninstall R
Error: No such keg: /usr/local/Cellar/r
bash-3.2$

which means that I didn't have a brewed RStudio installation and that running uninstall doesn't harm R or RStudio.

Try that?

If I try this command I just get: command not found

1 Like