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

Gracefully handle Chocolatey CLI not being installed #979

Open
4 tasks done
29039 opened this issue Jan 27, 2023 · 5 comments
Open
4 tasks done

Gracefully handle Chocolatey CLI not being installed #979

29039 opened this issue Jan 27, 2023 · 5 comments
Labels
0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint Improvement Issues that enhances existing functionality, or adds new features

Comments

@29039
Copy link

29039 commented Jan 27, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

Unable to load Chocolatey GUI assembly. The type initializer for 'ChocolateyGui.Common.Windows.Bootstrapper' threw an exception.

OK

What is Expected?

Chocolatey GUI should just launch

How Did You Get This To Happen?

  1. Installed Windows Sandbox
  2. Install Chocolatey GUI 1.1.1 in the Windows Sandbox
  3. Launch Chocolatey GUI from the Start Menu

System Details

  • Operating System: Windows 10 2004 (Which is what Windows Sandbox comes with under Windows 10 Pro 21H2)
  • Windows PowerShell version: 5.1.19041.2364
  • Chocolatey CLI Version: Not Installed
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: Community
  • Terminal/Emulator: conhost

Installed Packages

N/A

Output Log

Under C:\ProgramData there is no "Chocolatey" folder, and the "Chocolatey GUI" folder only has an empty folder named "Config"

Additional Context

  • Operating System: Windows 10 2004 (Which is what Windows Sandbox comes with under Windows 10 Pro 21H2)
  • Windows PowerShell version: 5.1.19041.2364
  • Chocolatey CLI Version: Not Installed
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: Community
  • Terminal/Emulator: conhost

The error pops up several times, have to press OK each time.

If I then go ahead and install the CLI version of chocolatey then everything works fine. But isn't the whole point of a GUI application not to use CLI? So the GUI MSI installer should be installing the CLI version automatically.

@29039 29039 added the Bug Issues where something has happened which was not expected or intended label Jan 27, 2023
@gep13
Copy link
Member

gep13 commented Jan 27, 2023

@29039 said...
But isn't the whole point of a GUI application not to use CLI? So the GUI MSI installer should be installing the CLI version automatically.

You are correct when you say that the point is that a user can use a GUI, rather than use the CLI directly, however, there is still a hard requirement that Chocolatey CLI be installed, as the GUI is really just a wrapper around the CLI. As such, currently, there is a requirement that Chocolatey CLI be installed, and the GUI doesn't currently take responsibility for installing it. Was there something in our documentation that made you believe that this was the case?

@29039
Copy link
Author

29039 commented Jan 27, 2023

The simple fact that it's called "GUI" gave me the expectation that I'd simply have to install the file and get a GUI, without needing the CLI. If I needed the CLI to get to the GUI, then it would be a totally pointless project, because the barrier to entry has not been lowered.

I am fine with the CLI, but sadly there are those out there who won't touch it and will install inferior alternatives because they are allergic to the CLI for some reason. I don't want to have to log onto their PC to run CMD and copy and paste some commands for them, I just want to say "Go install Chocolatey GUI", and they run the MSI file and that is that.

@pauby
Copy link
Member

pauby commented Jun 28, 2023

As there is nothing more for us to do here, I'm going to go ahead and close this, but we can reopen it if necessary.

@pauby pauby closed this as completed Jun 28, 2023
@pauby pauby added Invalid / Not Issue / No repro / Not Implementing and removed Bug Issues where something has happened which was not expected or intended labels Jun 28, 2023
@pauby
Copy link
Member

pauby commented Jun 28, 2023

Actually, we should handle this more gracefully than the exception that is thrown.

Perhaps a check that choco.exe is available and if not, information on what to do next would be better.

@Unknown-Guy

This comment was marked as off-topic.

@pauby pauby added Improvement Issues that enhances existing functionality, or adds new features 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Apr 16, 2024
@pauby pauby changed the title Unable to load Chocolatey GUI assembly. The type initializer for 'ChocolateyGui.Common.Windows.Bootstrapper' threw an exception Handle Chocolatey CLI not being installed gracefully Apr 16, 2024
@pauby pauby changed the title Handle Chocolatey CLI not being installed gracefully Gracefully handle Chocolatey CLI not being installed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

No branches or pull requests

4 participants