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
loss of service to a local repository upon computer sleep #5734
Services to a local repository that is stored on a network share is lost if the computer goes to sleep or hibernates, or possibly with other network access issues.
Version
GitHub Desktop: 1.4.0
Operating system: Microsoft Windows [Version 10.0.17763.1]
Steps to Reproduce
Leave GitHub Desktop open on a repository that is stored on a network share (Windows Server 2012 R2) and then walk away and allow the computer to sleep and eventually hibernate.
Return to the computer and wake it up.
Expected Behavior
I expect the state of GitHub desktop should return to normal (as was previous before the sleep), if not immediately, I expect it to try again (indefinitely until the user says otherwise) to locate the repository at the path it was last seen.
Actual Behavior
You will find GitHub Desktop reporting 'Can't Find "repository"' along with a path to where it was last seen, and some buttons, 'locate...', 'clone' and 'remove'.
I restarted GitHub desktop, but it just came back up in the same state. I tried pressing the 'locate...' button, but it took me to some other path way too far away (local system drive) to be worth the effort to navigate to. I know the path exists because I still had Explorer windows open to the folder, and they are working fine, immediately after the awakening. All other repositories are fine, even the ones on the same server share, so only the one that was open at the time the machine went to sleep is a problem.
Apparently the repository became corrupt during the sleep event, locating it is doing no good. The issue probably happens when the computer sleeps while GitHub has some uncommitted writes to the database. Fortunately the repository was synced.
I know the path exists because I still had Explorer windows open to the folder, and they are working fine, immediately after the awakening.
Once Desktop is unable to find the repository on disk, it'll stay in that "missing" state until being resolved. Anecdotally, we mostly see this "missing" flow occur when someone renames or deletes a folder on disk without updating Desktop. We've not talked about checking the location again to see if the folder is accessible again, which might help for scenarios like repositories on network shares, but I'm not sure how many of our users are working with this sort of setup.
I restarted GitHub desktop, but it just came back up in the same state. I tried pressing the 'locate...' button, but it took me to some other path way too far away (local system drive) to be worth the effort to navigate to.
As a workaround, you can drag-and-drop the folder onto Desktop to re-add it. But this is an interesting bit of information, as we don't seem to use the old location at all when trying to relocate the repository:
If we try and open Explorer to the parent directory where we last saw this repository, would that help make this flow easier? I'm also not sure how it'd work if the network share itself is unaccessible, but I suspect Windows will put you somewhere.
Nice to know about the dragging, I've probably seen that somewhere, but didn't think about that. I eventually 'removed' it and used 'add local repository' and everything came back online. I think because it was the last repository I had added, the location came up right away in the file dialog for adding a local repository.
I'm not sure what happens if you try to open the dialog with the default path unreachable either... but I am thinking it goes back to the users home path, after a short delay, with no error message.
Activity
msftrncs commentedon Sep 25, 2018
Apparently the repository became corrupt during the sleep event, locating it is doing no good. The issue probably happens when the computer sleeps while GitHub has some uncommitted writes to the database. Fortunately the repository was synced.
msftrncs commentedon Sep 25, 2018
Additional, the database and the older seem to be intact, as GIT and VS Code operated repository just fine.
shiftkey commentedon Sep 25, 2018
@msftrncs thanks for the report.
Once Desktop is unable to find the repository on disk, it'll stay in that "missing" state until being resolved. Anecdotally, we mostly see this "missing" flow occur when someone renames or deletes a folder on disk without updating Desktop. We've not talked about checking the location again to see if the folder is accessible again, which might help for scenarios like repositories on network shares, but I'm not sure how many of our users are working with this sort of setup.
As a workaround, you can drag-and-drop the folder onto Desktop to re-add it. But this is an interesting bit of information, as we don't seem to use the old location at all when trying to relocate the repository:
desktop/app/src/lib/dispatcher/dispatcher.ts
Lines 782 to 791 in 6a0eecf
If we try and open Explorer to the parent directory where we last saw this repository, would that help make this flow easier? I'm also not sure how it'd work if the network share itself is unaccessible, but I suspect Windows will put you somewhere.
msftrncs commentedon Sep 26, 2018
Nice to know about the dragging, I've probably seen that somewhere, but didn't think about that. I eventually 'removed' it and used 'add local repository' and everything came back online. I think because it was the last repository I had added, the location came up right away in the file dialog for adding a local repository.
I'm not sure what happens if you try to open the dialog with the default path unreachable either... but I am thinking it goes back to the users home path, after a short delay, with no error message.
msftrncs commentedon Nov 14, 2018
Just flagging that this issue is effectively a duplicate to #4264 which is in the
Available In Communityproject.shiftkey commentedon Nov 14, 2018
@msftrncs thanks for the heads up. I'm going to cross-reference this issue there so we avoid carrying duplicates around.