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
R 4.2: Document unexpectedly opens as empty in some cases #11206
Comments
|
Note: this also affects File -> Save with Encoding, in which the file is silently written as empty. Given the potential for data loss here I think we need to backport a fix ASAP! |
|
Hello, checking in if there's any way to recover file contents that have been erased like this. I lost the full contents of a huge .R file for work (now 0 KB), and it's happening to other files as well. Oddly, though I found it "erased" 3 days ago, for a brief moment today I opened it and saw the code (!), and saved it as a new .R file. But, now both files are empty again (in all programs I've opened them with, and trying multiple encodings in RStudio). I should've saved it as a .txt while I had the chance. I'm using Windows 10, RStudio 2022.02.2 build 485, and R 4.2.0. The file was saved on OneDrive, where I've been able to recover a week-old version. But I lost a week's worth of work. I'm thinking I'll revert back to R 4.1.2 to prevent any more losses. Any solutions yet? And any possibility of recovery? |
|
If you have saved it at 0kb, it is unlikely you can recover it. :-( You can try RsRecovr: https://github.com/jmcphers/rsrecovr We do have a newer build of 2022.02 that has a fix for this issue, if you'd like to try it (build 492): https://dailies.rstudio.com/rstudio/prairie-trillium/desktop/windows/ |
Thank you, I didn't know about this. I tried it and unfortunately it didn't work this time, but now I know about it for the future.
I've downloaded build 492 now, thank you! No problems so far. |
|
Verified on Windows 11 using
Also double-checked that it's not an issue on RStudio Desktop on MacOS 12.4 or RStudio Server on Ubuntu 20.04. |
|
@ronblum this might be "fixed" up to a point that you can control for windows. Part of this is outside the control of R and Rstudio as synced share folders (one drive and sharepoint), still have an issue with autosave. If co-worker who has a shared business one-drive and they were still having problems this week. I will ask them to retry and see if they get the same error. Not sure if you can flag something for better documentation or ongoing issues, but that might be the next stage of the autosave issue. |
System details
Steps to reproduce the problem
Create a text document with the contents:
Save it, then try File -> Reopen with Encoding -> ISO-8859-1.
Describe the problem in detail
The file is opened as a blank file.
Describe the behavior you expected
The file should be opened without issue.
The text was updated successfully, but these errors were encountered: