Rider closes all tabs automatically.
Answered
I used Rider without any problem. But from today, my Rider closes all tabs automatically every time I switched to another window/application and came back to the Rider. How can I make my Rider maintain opened tabs?
Please sign in to leave a comment.
This is what I found in the logs
2024-06-28 08:44:44,801 [ 26603] WARN - #c.i.o.v.i.l.LocalFileSystemBase - /Users/<>/Documents: Operation not permitted
java.nio.file.FileSystemException: /Users/<>/Documents: Operation not permitted
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:420)
at java.base/java.nio.file.Files.newDirectoryStream(Files.java:482)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.listPathChildren(LocalFileSystemBase.java:791)
at com.intellij.openapi.vfs.DiskQueryRelay.accessDiskWithCheckCanceled(DiskQueryRelay.java:47)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.list(LocalFileSystemBase.java:205)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.listWithCaching(LocalFileSystemImpl.java:279)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.listWithCaching(LocalFileSystemImpl.java:264)
at com.intellij.openapi.vfs.newvfs.RefreshWorker.fullDirRefresh(RefreshWorker.java:229)
at com.intellij.openapi.vfs.newvfs.RefreshWorker.processQueue(RefreshWorker.java:186)
at com.intellij.openapi.vfs.newvfs.RefreshWorker.lambda$parallelScan$0(RefreshWorker.java:122)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Let's check the folder's permissions.
make sure IDE has permissions to access folders in System Settings | Privacy & Security | Files and Folders, see https://support.apple.com/guide/mac-help/control-access-to-files-and-folders-on-mac-mchld5a35146/mac for more info.
Another option is indeed to move the project outside of Documents/Desktop/Downloads folders.
In Settings | Keymap, check if you have assigned any shortcut for the “Close All Tabs” action and triggered.
Then checking Settings | Editor | General | Editor Tabs, see if you have a wrong value of “Tab Closing Policy”, the default tab limit is 10.
Finally, try to invalidate IDE caches in File | Invalidate Caches, see if the there is any improvement.
It's not working. Rider automatically work some process when ı switch window or click something else, and it's reset the rider.
I am also experiencing this issue. Every time I change focus to another window and return to Rider, all tabs immediately close and all files briefly disappear from the Solution in the Explorer tab. In the bottom right status bar it says something like “Syncing Project…”. Any unsaved changes are lost. This bug makes Rider unusable for projects in which this is happening. Notably, I only see this with solutions generated by the dotnet CLI. My Unity project solutions don't have this problem. I tried the suggested steps from the post above and none of them fix the issue.
Rider 2024.1.4 (though it also occurred in 2023)
OSX Ventura 13.6.7
I can reproduce this issue every time by running these commands then opening the solution in Rider, open a file such as Program.cs, then switch to another window and switch back. All tabs will close and any unsaved changes will be lost.
I removed all folders and files from my pc and reload again, it's fixed. But you need the remove caches too, I removed everything about c#
Hi there,
Do you use OneDrive to store the files for your project?
We have several similar reports about it.
It might be caused by it. is there any difference between where you store your Unity projects and the CLI ones?
Could you please reproduce it one more time and collect all the logs from Rider (menu `Help | Collect Logs`)?
To share a bundle with logs please use https://uploads.jetbrains.com/ service and let me know the uploadId.
similar report
https://youtrack.jetbrains.com/issue/WI-71350/Suddenly-the-IDE-closes-all-the-open-tabs-and-reset-the-Project-window.#focus=Comments-27-6886647.0-0
I do not use OneDrive or any other automated backup/file sync system that I'm aware of. However you seem to be correct that it is related to where the project is stored. The projects that are having this issue are all in subfolders under the Documents folder. I tried making a new solution with the dotnet CLI under a different folder and it does not have the issue. This at least gives me a work-around to avoid the issue.
Here's the upload id of my Rider logs.
Upload id: 2024_06_28_GDt6AJHyYhMUfbJGXLWV94 (file: rider-logs-20240628-08524513984089904045034032.zip)
Thank you for your support!
Yes, Rider did not have permissions to access the Documents folder (even though somehow it was still able to open the project and edit the files). Enabling that permission has resolved the issue. Thank you for your help with this!
Always welcome :)