desktop: Application hangs when trying to discard changes
Describe the bug
When trying to discard changes, the application becomes unresponsive.
Version & OS
2.9.7 (x64) Windows 10 21H2 (19044.1526)
Steps to reproduce the behavior
- Change a file in any repository
- Open the Changes tab
- Right click on the applicable file
- Click Discard changes in the context menu
- Click Discard changes in the confirmation dialog
Expected behavior
- The changes are discarded
Actual behavior
- A spinner icon appears in the dialog title bar
- The whole application becomes unresponsive
- Nothing happens when clicking Discard changes or Cancel
- The changes are not discarded
Screenshots

Logs
Not much relevant content in the logs. This is the only line written:
2022-02-15T11:32:53.506Z - info: [ui] No submodules found. Skipping "git submodule status"
Additional context
- I have waited about 10 minutes for the operation to finish
- The only solution is to terminate the application from Task Manager
- I have checked that there are no other processes using the file
- I have tried to discard multiple file types (.js, .html, .json)
- I have tried multiple repositories. All repositories are non-GitHub.
- I have tried deleting %AppData%\GitHub Desktop to start “fresh”
- Downgrading to 2.9.6 fixes the problem
- Not directly related, but the application seems slower to start in 2.9.7
I was unsure whether I should open a new issue or comment on #13433 or #13661, but those appear closed by #13436.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 15 (6 by maintainers)
My Recycle bin is also set to not set delete items immediately. Plus as I mentioned, my local repo is on a network NAS share in which deletes don’t normally go into the recycle bin. And yes, this was all working before upgrade.
An option to disable discarding changes to recycle bin all together would be stellar
@t3knoid Likely it is a similar issue in that the
electron.trashItem()fails since it cannot access it (before this upgrade it would have silently failed to do so)My current work folder is located in a mounted NAS share. It wouldn’t be part of recycle bin. Is this a similar use case as the one described in #13899?
Here’s the specific error I’m seeing in the console:
Thanks @palhal, I was able to reproduce this issue as well on my Windows machine with those options configured.