RStudio project "cannot find the file specified" on R session restart
I think @Jack Wasey is right: Google drive locks files during sync. This causes many issues with other programs as well. There are alternatives from companies that do file syncing for a living, such as dropbox, whose clients don't lock files. With google drive you only have the option to use selective sync and exclude every .Rproj.user
folder. Once the RStudio's database is corrupted, moving the project out of the Google drive folder won't be enough - you will need to delete/rename it to have RStudio fix its database.
Summary:
- Copy contents from all unsaved files to a temp file outside of RStudio (while clicking away the error message every other second)
- Quit Rstudio
- Pause Google drive syncing
- Rename (or move/delete) the hidden
.Rproj.user
folder in your project - Reopen the project in Rstudio
- Exclude the new
.Rproj.user
folder from syncing with Google drive (Preferences -> sync only these folders) - Remember that Google drive is free / Become an awesome google developer and fix the issue once and for all