Started getting "R encountered fatal error. The session was terminated." error when launching R Studio

Error Information:

Recently I tried to move RStudio to my desktop. After that, upon launching RStudio, I would received the message that R encountered a fatal error and that the session was terminated. I moved RStudio back to its original location, but I continued to receive the error message. I have tried uninstalling and reinstalling both R and RStudio, as well as installing earlier versions of R to see if they would work (they did not).

Below is the "problem report" as provided by RStudio:

R Session Startup Failure Report

RStudio Version

RStudio 2022.12.0+353 "Elsbeth Geranium " (7d165dcf, 2022-12-03) for macOS

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.0+353 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36

Error message

[No error available]

Process Output

The R session exited with code 1.

Error output:

[No errors emitted]

Standard output:

[No output emitted]


Log File

[No logs available]

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: RStudio 2022.12.0+353 "Elsbeth Geranium " (7d165dcf, 2022-12-03) for macOS
  • OS Version: macOS Ventura 13.1
  • R Version: 4.2.2
  • Output your diagnostics report (if possible):

From RStudio Desktop Will Not Start on

This release has had pervasive problems in Ventura. Some of them seem related to the architecture of the hardware (Intel vs. Silicon), and some occur across the board, such as the failure to find /usr/bin resources in the Console pane that can be found in the Terminal pane. The lack of tar precludes installing or updating packages within RStudio except from an R session launched in the Terminal pane (or in a separate Terminal, iTerm or other emulator session).

I don't get the fatal error and have had no luck down versioning RStudio. To find out what's going on with your install, did you take all the defaults and have the visible in the /Applications folder?

Would you be willing to try out the latest daily for 2022.12.1? Elsbeth Geranium

If you could launch it with the argument to generate diagnostics, it may help determine the cause. open /Applications/ --args --run-diagnostics

is never going to work with my installation of the release version. Because

pkgutil --check-signature /Applications/

Package "RStudio":
   Status: package is invalid (checksum did not verify)

leading to

zsh: permission denied: ./

which could in theory be fixed by a deep dive into the directory tree looking for opportunities to chmod +x, but that's not something that anyone should be doing except on a spare box.

Elsepeth+360 is signed, but still not executable from shell, so diagnostics cannot be called with that command.

RStudio 2022.12.1+360 "Elsbeth Geranium" Release (974ce9490cc3e0e75855dbf216047027498ccc56, 2023-01-18) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2022.12.1+360 Chrome/102.0.5005.167 Electron/19.1.3 Safari/537.36

Still stuck with this

#> also installing the dependency 'pbapply'
#> Warning in system(paste0("tar zxf \"", path.expand(what), "\" -C \"",
#> path.expand(where), : error in running command
#> Warning: 'tar' returned non-zero exit code 127
#> Error: file '/var/folders/0j/3g7q2zss7fb55q5wqg9t141r0000gn/T//RtmpfQssIJ/downloaded_packages/pbapply_1.7-0.tgz' is not a macOS binary package
#> tar 
#>  ""
system("which tar")
#> Warning in system("which tar"): error in running command

Created on 2023-01-20 with reprex v2.0.2

The trouble is that I can't tell how RStudio is setting $PATH so I can't tell where to fix it.

See my workaround.

It sounds like 2022.12.0 was a bad download. Both the 2022.12.0 release and the 2022.12.1 daily are verified for me with pkgutil.

Running the app with ./ will not open from the terminal. The open command will correctly launch apps from the terminal.

1 Like

is what I have the Sys.which("tar") fail with before overriding default PATH with my shell version in .Renviron

This topic was automatically closed 21 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.