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
Opening repository in Git Bash results in catastrophic error #3882
Unable to open repository in Git Bash from the desktop app. Restarting the app results in the same error every time.
Version
Version: 1.0.13
OS: Windows 10.0.16299
Replication Steps
Expected behavior: Opened in Git Bash
Actual behavior: Error on the desktop app
Reproduces how often: 100%
Logs
Error: spawn where ENOENT
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
changed the title [-]Opening repository in Gt Bash results in catastrophic error[/-][+]Opening repository in Git Bash results in catastrophic error[/+]on Jan 30, 2018
@gilmae I've not had a chance to look into this due to #3825 being challenging to implement correctly without START, but I've published an update to the beta channel which catches this error and adds some better tracing around launching shells.
If you're able to open this up, trigger the error and look at the logs there should be some more detail about how your setup differs to mine.
If you don't have time to switch, this will land in the stable channel next week.
@gilmae thanks for confirming the app now doesn't crash.
I'm curious why this message isn't being logged as that would have told me what it was trying to spawn.
We rely on Git for Windows adding a certain registry key that points to it's install location. To see what's set on your machine, you can run this command in PowerShell:
In theory, the InstallPath key should point to the install directory, with git-bash.exe under that directory. We're not checking that when launching, which I think is how the ENOENT occurring.
I've published a test build containing the tracing from in #3975here - would you mind trying out that version? If you open the Developer Tools before walking through the steps there should be some additional tracing provided.
On my machine the log look like this when it successfully launches Git Bash:
I'm curious how your machine differs to mine when this error occurs. If git-bash.exe doesn't exist there (my best guess so far) I'd love to understand how that might have happened.
where is located at C:\Windows\System32\where.exe, so this it's the same root cause as #3825 but just manifesting elsewhere. This can be fixed independent to the root cause of correctly spawning cmd.
Activity
[-]Opening repository in Gt Bash results in catastrophic error[/-][+]Opening repository in Git Bash results in catastrophic error[/+]shiftkey commentedon Feb 16, 2018
@gilmae I've not had a chance to look into this due to #3825 being challenging to implement correctly without
START, but I've published an update to the beta channel which catches this error and adds some better tracing around launching shells.If you're able to open this up, trigger the error and look at the logs there should be some more detail about how your setup differs to mine.
If you don't have time to switch, this will land in the stable channel next week.
gilmae commentedon Feb 18, 2018
2018-02-18.desktop.beta.log
Log attached from trying to open a repo in Git Bash.
Same results as described in issue description.
shiftkey commentedon Feb 19, 2018
@gilmae thanks for confirming the app now doesn't crash.
I'm curious why this message isn't being logged as that would have told me what it was trying to spawn.
We rely on Git for Windows adding a certain registry key that points to it's install location. To see what's set on your machine, you can run this command in PowerShell:
In theory, the
InstallPathkey should point to the install directory, withgit-bash.exeunder that directory. We're not checking that when launching, which I think is how the ENOENT occurring.I've published a test build containing the tracing from in #3975 here - would you mind trying out that version? If you open the Developer Tools before walking through the steps there should be some additional tracing provided.
On my machine the log look like this when it successfully launches Git Bash:
I'm curious how your machine differs to mine when this error occurs. If
git-bash.exedoesn't exist there (my best guess so far) I'd love to understand how that might have happened.gilmae commentedon Feb 19, 2018
Sorry if I miscommunicated, but the application definitely still crashes when opening any shell.
shiftkey commentedon Feb 19, 2018
@gilmae with the crash dialog? Could you attach a screenshot of what you see?
shiftkey commentedon Feb 19, 2018
@gilmae I've had a chance to read your log file again and I see the problem:
This isn't related to launching Git Bash, but is related to the work to resolve Git on your PATH:
desktop/app/src/lib/is-git-on-path.ts
Line 14 in f84e926
whereis located atC:\Windows\System32\where.exe, so this it's the same root cause as #3825 but just manifesting elsewhere. This can be fixed independent to the root cause of correctly spawningcmd.gilmae commentedon Feb 20, 2018
I can confirm that after manually adding "c:\windows\system32" to PATH that opening the repository in Git Bash works.
For reference, the requested screenshot is also attached:
