Skip to content
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

I have installed the extension and don't see any of the stashes #95

Open
gregviolette opened this issue Oct 27, 2023 · 8 comments
Open

Comments

@gregviolette
Copy link

I have this extension installed on my Ubuntu VM and it works fine. But when I installed it on my Windows 11 VS Code, I don't see the "STASHES" panel in the Explorer. What am I doing wrong?

@artrz
Copy link
Owner

artrz commented Nov 7, 2023

Try right clicking on the SCM title (Source control), in the revealed menu select Stashes to enable the view. If that entry doesn't appear, verify that the Explorer: Enabled setting is active.

@res359
Copy link

res359 commented Nov 12, 2023

Same problem here, under Linux. The explorer doesn't appear and that entry doesn't exist. Enabled setting is On by default. Extension log file is totally empty. Added a keybinding to Toggle Explorer and that doesn't do anything either.

@res359
Copy link

res359 commented Nov 16, 2023

I think I figured it out. I ran the extension in a debug session and got a stacktrace:

rejected promise not handled within 1 second: Error: ENOENT: no such file or directory, stat '/home/user/projects/test/does-not-exist'
stack trace: Error: ENOENT: no such file or directory, stat '/home/user/projects/test/does-not-exist'
        at statSync (node:fs:1615:3)
        at t.statSync (node:electron/js2c/asar_bundle:2:4557)
        at /home/user/git/vscode-gitstash/dist/extension.js:6965:28
        at Array.forEach (<anonymous>)
        at Workspace.getSubdirectoriesTree (/home/user/git/vscode-gitstash/dist/extension.js:6962:38)
        at /home/user/git/vscode-gitstash/dist/extension.js:6933:46
        at Array.forEach (<anonymous>)
        at Workspace.getSubRootPaths (/home/user/git/vscode-gitstash/dist/extension.js:6932:24)
        at Workspace.getRootPaths (/home/user/git/vscode-gitstash/dist/extension.js:6894:30)
        at WorkspaceGit.getRepositories (/home/user/git/vscode-gitstash/dist/extension.js:5983:47)
        at activate (/home/user/git/vscode-gitstash/dist/extension.js:7287:80)
        at H._callActivateOptional (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:16961)
        at H._callActivate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:16631)
        at /usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:136:14456
        at async w._activate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7861)
        at async w._waitForDepsThenActivate (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7803)
        at async w._initialize (/usr/share/codium/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:7167)

The problem is caused by a stashed commit referencing a folder that doesn't exist anymore. Recreating the missing folder makes everything work correctly. Code should be fixed to ignore stat errors.

@artrz
Copy link
Owner

artrz commented Nov 17, 2023

@res359 Thank you very much for taking time to debug it on you side. I'll update the extension as soon as got some free time.

@artrz
Copy link
Owner

artrz commented Nov 21, 2023

@res359 Could you tell me the steps to reproduce it, including any custom settings? I'd rather fix after reproducing it than just blindly fixing it based on the trace.

@res359
Copy link

res359 commented Nov 21, 2023

@artrz Turns out I was slightly mistaken. The problem is simply caused by having a broken symlink in your repository folder. Just create one with ln -s foobar test. It doesn't have to be referenced by a stashed commit. The extension will stop working immediately.

@gregviolette originally reported the problem under Windows and not Linux, so I wonder if it's the same issue even.

@artrz
Copy link
Owner

artrz commented Nov 22, 2023

Ah that makes sense @res359! Tried using directories and wasn't unable to reproduce. While I don't expect the symlink thing to fix the issue from OP still a bug so I'll fix it soon.

@gregviolette could you start a debug session on your side to catch any possible trace? I already found a possible issue but not sure if related to you case.

@Akv2021
Copy link

Akv2021 commented Oct 29, 2024

Hi @res359 @artrz ,
I'm also not able to see the "STASHES" panel in the Explorer since sometime on macOS Sonoma 14.7
Running in debug session gives missing file error.

Could not read source map for file:///Users/akvabhi/.vscode/extensions/arturock.gitstash-5.2.0/dist/extension.js: ENOENT: no such file or directory, open '/Users/akvabhi/.vscode/extensions/arturock.gitstash-5.2.0/dist/extension.js.map'

On checking manually, the extensions.js file is present but no file named extension.js.map

I also tried to reinstall the extension but it didn't help.
However the commands to show stash etc are working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants