# RStudio app error

**URL:** <https://discourse.openondemand.org/t/rstudio-app-error/3254>\
**Category:** Get Help\
**Created:** [February 7, 2024, 5:15pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254 "2024-02-07T17:15:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [February 7, 2024, 5:15pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/1 "2024-02-07T17:15:16Z")

</div>

Hello - The below happens on launch of the RStudio app. I’m stumped on what the issue is.  
OoD 3.0.1

Feb 7 17:13:25 queue1-dy-compute-resource-1-1 rsession-dan.buckley[23779]: ERROR generic error 22 (Invalid argument) [path: , target-dir:]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared\_core/FilePath.cpp:846; LOGGED FROM: void rstudio::session::{anonymous}::ensureDefaultDirectory(std::string\*, const string&) src/cpp/session/SessionOptions.cpp:69  
Feb 7 17:13:25 queue1-dy-compute-resource-1-1 rsession-dan.buckley[23779]: ERROR system error 13 (Permission denied) [path: /.local/share/rstudio, target-dir:]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared\_core/FilePath.cpp:846; LOGGED FROM: int main(int, char\* const\*) src/cpp/session/SessionMain.cpp:2192

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [February 7, 2024, 5:25pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/2 "2024-02-07T17:25:20Z")

</div>

Rstudio is open source. I thing you’re hitting this error about trying to make the default directory.

> <https://github.com/rstudio/rstudio/blob/b51c81cc303d4b52b010767e5b30438beb904641/src/cpp/session/SessionOptions.cpp#L69>

---

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [February 7, 2024, 7:12pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/3 "2024-02-07T19:12:58Z")

</div>

Thanks - The above turned out to be a permissions issue on rstudio-os.sqlite.

The next error I think is related to home not correctly specified. I’m not sure where to specify that.

Feb 7 19:12:00 queue1-dy-compute-resource-1-2 rsession-dan.buckley[28965]: ERROR generic error 22 (Invalid argument) [path: , target-dir:]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared\_core/FilePath.cpp:846; LOGGED FROM: void rstudio::session::{anonymous}::ensureDefaultDirectory(std::string\*, const string&) src/cpp/session/SessionOptions.cpp:69  
Feb 7 19:12:00 queue1-dy-compute-resource-1-2 rsession-dan.buckley[28965]: ERROR system error 13 (Permission denied) [path: /.local/share/rstudio, target-dir:]; OCCURRED AT rstudio::core::Error rstudio::core::FilePath::createDirectory(const string&) const src/cpp/shared\_core/FilePath.cpp:846; LOGGED FROM: int main(int, char\* const\*) src/cpp/session/SessionMain.cpp:2192

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [February 7, 2024, 7:18pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/4 "2024-02-07T19:18:41Z")

</div>

That’s the same error from the original comment.

What is the directory you’re trying to open the application at? Whatever it is, apparently you can’t make that directory.

> [@maestro7879](#):
>
> (Invalid argument) [path: , target-dir:];

This says that the `target-dir` is empty - meaning nothing. Could it be that you’re `HOME` environment variable is empty somehow? Or that you’ve configured something strange?

[https://docs.posit.co/ide/server-pro/rstudio\_pro\_sessions/directory\_management.html#working-directories](https://docs.posit.co/ide/server-pro/rstudio_pro_sessions/directory_management.html#working-directories)

---

<div class="post-metadata">

**Author:** ![maestro7879](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maestro7879/32/1865_2.png) [@maestro7879](https://discourse.openondemand.org/u/maestro7879)\
**Post date:** [February 8, 2024, 5:18pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/5 "2024-02-08T17:18:45Z")

</div>

This was all self-inflicted. Using an example that was dumbed down helped.  
I ended up using the below example and was up and running in minutes.

> **[GitHub - mcw-rcc/bc\_rcc\_rstudio\_server: RStudio Server app for Open OnDemand](https://github.com/mcw-rcc/bc_rcc_rstudio_server)**
>
> RStudio Server app for Open OnDemand. Contribute to mcw-rcc/bc\_rcc\_rstudio\_server development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [August 6, 2024, 5:18pm UTC](https://discourse.openondemand.org/t/rstudio-app-error/3254/6 "2024-08-06T17:18:51Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
