New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to save file from Rstudio 1.2.5033 and 1.3.036 (Windows 10) on network shares (UNC paths) #6587
Comments
|
Here's a few things that might help us better debug this issue:
print? Does it run successfully? Does the path look correct?
Do those files successfully open? Are you able to modify + save them?
|
|
I'd also be curious to know what |
|
Hi, will do - hope latest on Monday is ok? Thanks for quick reaction. |
Sorry, that's correct. This might be more useful. After attempting to save the new document, you should be able to view the RStudio event log by typing: You should see an event called Do you see the correct path there? (I wonder if it's being malformed in a similar way to what you're seeing with the default working directory) |
|
Good news! I've finally been able to reproduce this error locally. The issue does indeed occur if your home directory is set to a UNC path. I initially was not able to reproduce as I was setting the home directory but not matching the case of the UNC path correctly. Here are some steps to reproduce the issue:
That save fails, and it looks like it's because the path isn't constructed correctly: Now that we can reproduce locally, we should be able to get to the bottom of this issue. Thank you for all your help! |
|
And here's a way to reproduce locally without requiring a separate network share: just use a UNC path to the local home directory. Will try to get to the bottom of this soon. |
|
Just a reminder comment - as mentioned in the issue title this also happens with RStudio 1.3.036. |
|
For what it's worth, I believe one workaround would be to set If that works, would that suffice as a workaround in the interim? |
I will give it a shot tomorrow - thanks a lot for this workaround suggestion. I'm definitely thankful for [workaround] until you come up with a fix. |
|
Note to self: the error is here: rstudio/src/cpp/shared_core/FilePath.cpp Lines 1046 to 1048 in a977037
It looks like the file separators aren't normalized the same way in each path, and this causes the attempt to compute a lexically relative path to fail. I think we can fix this by fixing the path separators before attempting to form a lexically relative path. |
This work around (at least when applied via Sys.setenv(...) in .Rprofile) does not make 'Save As' to the Users (UNC) home directory work, when Save As is done from the File menu drop-down in RStudio. Note: Defining "R_USER" (ie adding it) to the Users WINDOWS ENV variables, worked! Just setting it up via ~/.Rprofile was not enough, same for ~/.Renviron ... Rprofile.site modification I haven't tried yet. |
I think that's what I would expect -- RStudio reads the environment variable pretty early on during initialization, so it needs to be set when RStudio is launched (that is, before R itself is initialized). |
Thanks (again) for clarifying that ... so I won't invest any time into modifying Rprofile.site, I guess. |
|
Again the save_document_diff details == REQUEST ====== == RESPONSE ====== A whole lot of 'null' up there - guess that is not good? |
|
The Initial 1.3 release will not contain this fix. It was made in 1.3-patch which will be the first bugfix release of 1.3 but is not yet being built. That will start happening once 1.3 has been released. |
|
@R-Hannibal - will do test - expect info from me by tomorrow |
@R-Hannibal first 'plain vanilla' attempts of saving files in RStudio to the Users UNC path home folder worked. I will probably do a couple more variations (eg with modifications in Global Options etc) some time later - but for now it looks very promising. |
|
Thanks so much for confirming the fix @gwd666 , and for the kind words (I'm in Quality Assurance but will definitely pass your compliments on to the development team). Please let us know if you see any variations or re-occurrences of this issue. |






RStudio 1.2.5033 cannot save files (.R, .Rmd, etc) to Users home folder or any of its subfolders which is located on "\\server/path/to/USER/Daten" (Daten == Documents)
System details
Description of issue
RStudio (1.2.5033 and 1.3.936) cannot save files (.R, .Rmd, etc) to Users home folder if is located on Windows UNC path "\\server/path/to/USER/Daten" (Daten == Documents)
Steps to reproduce the problem
Open RStudio 1.2.5033
Create New (empty) file - optionally write some content into it.
Try to "Save As" ... anywhere on the (UNC path) Users home folder
Describe the problem in detail
Not possible to save any files on a UNC path "out of the box" (see also 'Attempted steps taken to fix' below)
Error Information:
Describe the behavior you expected
Ability to save files - just like with RStudio 1.1.463 under UNC-PATH USER home folder or its subfolders.
Attempted steps taken to fix
Replace UNC \\server/some/path/to/User/Documents with mapped drive letter eg: "L:/USER/Documents"; this works temporarily but is not a feasible permanent solution since after every login respectively even after restart of RStudio 1.2.5033 the same bug reappears!
Output of diagnostics report (if possible):
see attached .pdf file - interesting sidenote RStudio managed to create (the rstudio-diagnostics folder) and write the diagnostic-report.txt file to the users (UNC path) document folder w/o applying any fixes (eg as mentioned above mapping to drive letter etc.)
diagnostics-report.txt
"Interesting" sidenote RStudio 1.2.5033 managed to create (the rstudio-diagnostics folder) and write the diagnostic-report file to the users (UNC path) document folder w/o applying any prior fixes (eg as mentioned above mapping to drive letter etc.) before that action.
So it seems that UNC path access / write ability is hidden somewhere in there?
The text was updated successfully, but these errors were encountered: