You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
R 4.2: Document unexpectedly opens as empty in some cases #11206
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!
changed the title [-]R 4.2: File -> Open with Encoding fails for non-UTF-8 encodings[/-][+]R 4.2: Document unexpectedly opens as empty in some cases[/+]on May 13, 2022
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?
@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.
Activity
kevinushey commentedon May 13, 2022
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!
[-]R 4.2: File -> Open with Encoding fails for non-UTF-8 encodings[/-][+]R 4.2: Document unexpectedly opens as empty in some cases[/+]3fa commentedon May 23, 2022
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?
jmcphers commentedon May 23, 2022
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/
3fa commentedon May 23, 2022
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.
ronblum commentedon May 24, 2022
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.
mlane3 commentedon Jun 3, 2022
@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.