Closed JacekJagosz closed 1 year ago
@JacekJagosz Could you confirm if there are any logs at C:\ProgramData\Chocolatey GUI\Logs
? And if there's a directory at C:\ProgramData\Chocolatey GUI\Config
? If the Config directory doesn't exist, you could try creating it. I've noticed that if the Config directory isn't there it doesn't launch at least for the debugger, and never delved too far into what caused it at the time.
Another place to look for clues is the Event Viewer under Windows Logs > Application. You may see Error level entries from a Source of either Application Error, or .NET Runtime. In either entry it should state ChocolateyGui.exe
or choco.exe
as the cause.
In C:\ProgramData\Chocolatey GUI\
there is only Config
folder, no Logs
folder. The Config
is empty.
Fortunately there are logs in the event viewer: Chronologically:
~~~xml
Kod XML zdarzenia:
Any additional logs I could attach that could help? (I am a Linux guy, this is all dark magic to me)
@JacekJagosz thanks for including that. Part of me wants to suggest just completely removing Chocolatey GUI and trying a fresh install, but the other part wants to get to the bottom of the issue so we can get it fixed.
So, a happy medium:
C:\ProgramData\Chocolatey GUI\Config\data.db
(IIRC you said this directory existed, but was empty), C:\Users<User>\AppData\Local\Chocolatey GUI\data.db
(IIRC same for this one), C:\Users<User>\AppData\Local\Chocolatey\ChocolateyGui.exe_StrongName_qgbusv5dfgkxx33orw4dqzgj3f5c3jne\0.19.0.0\user.config
(This one may be in a different location... I suspect the version number to be 1.1.0, but the StrongName I believe should be the same).If this solves the issue, could you get us a copy of all of those files (off the top of my head, I'm not 100% sure on the contents of them, so maybe start with letting us know if this fixes the issue, and then we can work on getting the files in a private manner if needed).
If that doesn't work, then my suggestion would be the complete uninstall and reinstall, but that's not likely to provide us the details of what caused the issue 😦
This is really weird. C:\ProgramData\Chocolatey GUI\Config\
is empty, C:\Users<User>\AppData\Local\Chocolatey GUI\
is empty, and C:\Users<User>\AppData\Local\Chocolatey\
doesn't exist at all.
I also tried choco upgrade chocolateygui -y --force
and choco upgrade chocolatey -y --force
to reinstall them, with no change.
I would love to do a full clean reinstall if that would help
@JacekJagosz I would probably start with just a reinstall of Chocolatey GUI. The easiest way to do that would be with Chocolatey CLI: choco uninstall chocolateygui -y
followed by choco install chocolateygui -y
. This should uninstall it, then reinstall it.
If that doesn't work, then you're probably looking at a full uninstall of Chocolatey itself, which is a little more involved, and definitely not recommended if you have many packages installed.
I don't have the directions to do this in front of me, but from memory it is something along the lines of: rename C:\ProgramData\Chocolatey
to C:\ProgramData\Chocolatey.bak
and then re-run the installation from an elevated PowerShell window: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
@JacekJagosz I was debugging a different issue, and I found some output that if you're still having an issue might actually help isolate it better than the logs we've already found. If you try to run chocolateyguicli
it should also error, but in my experience it may give a more actionable error message.
Wyjątek nieobsłużony: System.IO.FileLoadException: Nie można załadować pliku lub zestawu 'chocolatey, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb' lub jednej z jego zależności. Nieprzechwycony wyjątek podczas inicjowania typu. (Wyjątek od HRESULT: 0x80131534) ---> System.TypeInitializationException: Inicjator typów zgłosił wyjątek dla typu 'ChocolateyGuiCli.Bootstrapper'. ---> System.IO.FileLoadException: Nie można załadować pliku lub zestawu 'chocolatey, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb' lub jednej z jego zależności. Nieprawidłowy wskaźnik. (Wyjątek od HRESULT: 0x80004003 (E_POINTER)) ---> System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
w ChocolateyGuiCli.Program.<>c.<AddAssemblyResolver>b__2_0(Object sender, ResolveEventArgs args)
w System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Bootstrapper..cctor()
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Bootstrapper.get_Logger()
w ChocolateyGuiCli.Program.<>c.<AddAssemblyResolver>b__2_0(Object sender, ResolveEventArgs args)
w System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Runner.Run(String[] args)
w ChocolateyGuiCli.Program.Main(String[] args)
Which would translate to:
Unhandled exception: System.IO.FileLoadException: Couldn't load file or toolkit 'chocolatey, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb' or one of the dependencies. Unhandled exception during type initialisation. (Exception HRESULT: 0x80131534) ---> System.TypeInitializationException: Type initiator reported exception 'ChocolateyGuiCli.Bootstrapper'. ---> System.IO.FileLoadException: Couldn't load file or toolkit 'chocolatey, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb' or one of its dependencies. Incorrect pointer. (Exception HRESULT: 0x80004003 (E_POINTER)) ---> System.NullReferenceException: Reference to object was not set for object appearance.
w ChocolateyGuiCli.Program.<>c.<AddAssemblyResolver>b__2_0(Object sender, ResolveEventArgs args)
w System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Bootstrapper..cctor()
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Bootstrapper.get_Logger()
w ChocolateyGuiCli.Program.<>c.<AddAssemblyResolver>b__2_0(Object sender, ResolveEventArgs args)
w System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
--- Koniec śladu stosu wyjątków wewnętrznych ---
w ChocolateyGuiCli.Runner.Run(String[] args)
w ChocolateyGuiCli.Program.Main(String[] args)
🤔 That's interesting. I got a very similar error yesterday when working with a locally built Chocolatey. Could you run choco list -lo
and advise what it reports?
Chocolatey v1.1.0
chocolatey 1.1.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolateygui 1.1.0
dotnetfx 4.8.0.20220524
git.commandline 2.11.0.20170203
git.portable 2.37.3
KB2919355 1.0.20160915
KB2919442 1.0.20160915
sdio 1.12.8.748
11 packages installed.
What environment variables do you have set? In particular, do you have a ChocolateyInstall
and is it pointing to the Chocolatey location?
I don't have this variable, only those related to Chocolatey
Try setting an environment variable called ChocolateyInstall
to C:\ProgramData\chocolatey
. You may need to reboot or log off and back in once it's set.
After setting it and rebooting I am still getting the same error with both ChocolateyGui and guicli
But in the end simply doing choco uninstall chocolateygui -y
followed by choco install chocolateygui -y
fixed it.
So sorry for the whole mess, I have no idea why it didn't work in the first place, and why my reinstallation using different commands didn't fix it either.
Oh, and the error log is interesting, it said the GUI wasn't installed?!
PS C:\Users\Jacek> choco uninstall chocolateygui -y
Chocolatey v1.1.0
Directory 'C:\ProgramData\chocolatey\lib' does not exist.
Uninstalling the following packages:
chocolateygui
chocolateygui is not installed. Cannot uninstall a non-existent package.
Chocolatey uninstalled 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- chocolateygui - chocolateygui is not installed. Cannot uninstall a non-existent package.
If a package uninstall is failing and/or you've already uninstalled the
software outside of Chocolatey, you can attempt to run the command
with `-n` to skip running a chocolateyUninstall script, additionally
adding `--skip-autouninstaller` to skip an attempt to automatically
remove system-installed software. Only the packaging files are removed
and not things like software installed to Programs and Features.
If a package is failing because it is a dependency of another package
or packages, then you may first need to consider if it needs to be
removed as packages have dependencies for a reason. If
you decide that you still want to remove it, head into
`$env:ChocolateyInstall\lib` and find the package folder you want to
be removed. Then delete the folder for the package. You should use
this option only as a last resort.
PS C:\Users\Jacek> choco install chocolateygui -y
Chocolatey v1.1.0
Directory 'C:\ProgramData\chocolatey\lib' does not exist.
Installing the following packages:
chocolateygui
By installing, you accept licenses for the packages.
Progress: Downloading chocolatey 1.1.0... 100%
Progress: Downloading ChocolateyGUI 1.1.0... 100%
chocolatey v1.1.0
chocolatey package files install completed. Performing other installation steps.
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.
Creating Chocolatey folders if they do not already exist.
WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
'Batch file could not be found' is also safe to ignore.
'The system cannot find the file specified' - also safe.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNING: Not setting tab completion: Profile file does not exist at 'C:\Users\Jacek\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of chocolatey was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
chocolatey-compatibility.extension v1.0.0 [Approved]
chocolatey-compatibility.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-compatibility extensions.
The install of chocolatey-compatibility.extension was successful.
Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-compatibility'
chocolatey-core.extension v1.4.0 [Approved]
chocolatey-core.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-core extensions.
The install of chocolatey-core.extension was successful.
Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-core'
chocolatey-dotnetfx.extension v1.0.1 [Approved]
chocolatey-dotnetfx.extension package files install completed. Performing other installation steps.
Installed/updated chocolatey-dotnetfx extensions.
The install of chocolatey-dotnetfx.extension was successful.
Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-dotnetfx'
KB2919442 v1.0.20160915 [Approved]
kb2919442 package files install completed. Performing other installation steps.
Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
The install of kb2919442 was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
KB2919355 v1.0.20160915 [Approved]
kb2919355 package files install completed. Performing other installation steps.
Skipping installation because this hotfix only applies to Windows 8.1 and Windows Server 2012 R2.
The install of kb2919355 was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
dotnetfx v4.8.0.20220524 [Approved]
dotnetfx package files install completed. Performing other installation steps.
Microsoft .NET Framework 4.8 or later is already installed.
The install of dotnetfx was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
ChocolateyGUI v1.1.0 [Approved]
chocolateygui package files install completed. Performing other installation steps.
Installing ChocolateyGUI...
ChocolateyGUI has been installed.
Added C:\ProgramData\chocolatey\bin\chocolateygui.exe shim pointed to 'c:\program files (x86)\chocolatey gui\chocolateygui.exe'.
Added C:\ProgramData\chocolatey\bin\chocolateyguicli.exe shim pointed to 'c:\program files (x86)\chocolatey gui\chocolateyguicli.exe'.
The install of chocolateygui was successful.
Software installed as 'msi', install location is likely default.
Chocolatey installed 8/8 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Installed:
- kb2919355 v1.0.20160915
- chocolatey-core.extension v1.4.0
- dotnetfx v4.8.0.20220524
- chocolatey v1.1.0
- kb2919442 v1.0.20160915
- chocolateygui v1.1.0
- chocolatey-compatibility.extension v1.0.0
- chocolatey-dotnetfx.extension v1.0.1
Thanks for the confirmation @JacekJagosz, it's unfortunate we weren't able to get to the root of the issue, but at least we got it solved.
Just wanted to add my twopence here: I landed on that page when I had the same issue.
A reinstall of chocolateygui
dit nothing.
I forced a reinstall with choco install chocolatey --force
and that fixed it.
I then noticed that the chocolateygui
package version was 2.0.0.0
while the chocolatey
package (before the force reinstall) was 1.3.1
.
After the reinstall it matches the GUI version and everything works.
No idea what happened to make the main package go out of sync.
@R4cOOn You just saved my day. My problem went away after a forced reinstallation.
I can also confirm that choco install chocolatey --force
also fixed the same issue for me.
This is the second PC I had this happen on. All started after running Update all from Chocolateygui. Chocolatey gets updated, gui closes, wont launch again. even after trying to also update chocolateygui from chocolateycli.
In my case, i could resolve the issue by upgrading chocolatey via the powershell command line.
choco upgrade chocolatey
It seems I had chocolatey v2.0.0 installed. It was then upgrade to v2.1.0 and afterwards the gui would load without problems.
Maybe I upgraded the GUI before chocolatey and thereby broke dependencies?
What You Are Seeing?
When I launch Chocolatey GUI from start menu or powershell (admin), after an UAC prompt I see:
When I click ok, I the same prompt appears, and I need to close like 8 windows for it to disappear.
What is Expected?
GUI should just launch, or at least some more detailed error on the terminal.
How Did You Get This To Happen? (Steps to Reproduce)
sdio
not as an administrator, aborted, then did it as adminchocolateygui
, I never managed to launch itchoco upgrade chocolateygui -y --force
andchoco upgrade chocolatey -y --force
, didn't workAppData\Local\Chocolatey GUI
is emptySystem Details
[System.Environment]::OSVersion.version.tostring()
): 10.0.22000.0 (Windows 11 Home 22000)$PSVersionTable
): 5.1.22000.832choco --version
): 1.1.0Output Log
No output log when launching the GUI