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

ComfyUI updates fail silently because of a PortableGit error #301

Closed
jennygreene88 opened this issue Nov 30, 2023 · 1 comment · Fixed by #306
Closed

ComfyUI updates fail silently because of a PortableGit error #301

jennygreene88 opened this issue Nov 30, 2023 · 1 comment · Fixed by #306

Comments

@jennygreene88
Copy link

jennygreene88 commented Nov 30, 2023

I'm on the Windows build of 2.6.6.

When I click to update ComfyUI, it instantly reports success (without actually checking for updates), and this error is logged:

Error: System.ComponentModel.Win32Exception (267): An error occurred trying to start process 'C:\Users\gal\Downloads\StabilityMatrix-win-x64\Data\PortableGit\bin\git.exe' with working directory 'init'. The directory name is invalid.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at StabilityMatrix.Core.Processes.ProcessRunner.StartTrackedProcess(Process process)
   at StabilityMatrix.Core.Processes.ProcessRunner.StartAnsiProcess(String fileName, String arguments, String workingDirectory, Action`1 outputDataReceived, IReadOnlyDictionary`2 environmentVariables)
   at StabilityMatrix.Avalonia.Helpers.WindowsPrerequisiteHelper.RunGit(ProcessArgs args, Action`1 onProcessOutput, String workingDirectory)
   at StabilityMatrix.Core.Models.Packages.BaseGitPackage.Update(InstalledPackage installedPackage, TorchVersion torchVersion, DownloadPackageVersionOptions versionOptions, IProgress`1 progress, Boolean includePrerelease, Action`1 onConsoleOutput)
   at StabilityMatrix.Core.Models.PackageModification.UpdatePackageStep.ExecuteAsync(IProgress`1 progress)
   at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IReadOnlyList`1 steps)

@Sceptero
Copy link

Sceptero commented Nov 30, 2023

Having same issue but with Stable Diffusion WebUI updates:

Error: System.ComponentModel.Win32Exception (267): An error occurred trying to start process 'E:\ai\stabilitymatrix\Data\PortableGit\bin\git.exe' with working directory 'init'. The directory name is invalid.
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at StabilityMatrix.Core.Processes.ProcessRunner.StartTrackedProcess(Process process)
   at StabilityMatrix.Core.Processes.ProcessRunner.StartAnsiProcess(String fileName, String arguments, String workingDirectory, Action`1 outputDataReceived, IReadOnlyDictionary`2 environmentVariables)
   at StabilityMatrix.Avalonia.Helpers.WindowsPrerequisiteHelper.RunGit(ProcessArgs args, Action`1 onProcessOutput, String workingDirectory)
   at StabilityMatrix.Core.Models.Packages.BaseGitPackage.Update(InstalledPackage installedPackage, TorchVersion torchVersion, DownloadPackageVersionOptions versionOptions, IProgress`1 progress, Boolean includePrerelease, Action`1 onConsoleOutput)
   at StabilityMatrix.Core.Models.PackageModification.UpdatePackageStep.ExecuteAsync(IProgress`1 progress)
   at StabilityMatrix.Core.Models.PackageModification.PackageModificationRunner.ExecuteSteps(IReadOnlyList`1 steps)

Tried removing the PortableGit directory hoping it might get redownloaded, but it only resulted in change of error message to:

An error occurred trying to start process 'E:\ai\stabilitymatrix\Data\PortableGit\bin\git.exe' with working directory 'init'. The system cannot find the file specified.

Perhaps the init working directory is the culprit?

EDIT:
I checked the sources and it seems that the string init is passed to the RunGit function as working directory argument, while it should've been a part of git ... command. I fixed the issue for myself by manually executing following git commands in stabilitymatrix\Data\Packages\Stable Diffusion WebUI directory:

git init
git remote add origin https://github.com/AUTOMATIC1111/stable-diffusion-webui

After that, the updater was able to update my package without any issues.

@ionite34 ionite34 mentioned this issue Dec 2, 2023
pull bot pushed a commit to SysLik000/StabilityMatrix that referenced this issue Dec 19, 2023
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

Successfully merging a pull request may close this issue.

2 participants