chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.61k stars 248 forks source link

I unintentionally turned on all of the options for the premium licensed features, now I only CTD on startup. #903

Open EngineerJack opened 2 years ago

EngineerJack commented 2 years ago

This is a repost of my post here, which was in the wrong category. I posted the only response at the bottom.

About an hour ago, I was logged in, where I could click on packages, and settings, but it was taking forever to do its initial loading. While I was waiting, I went and turned on quite a few settings I hadn't previously had active, skimming the descriptions, yet I was activating premium, licensed options and I'm only a free user. I'm not cheap, but I don't have enough to spend on a license. Now when I try to log in, I get the error shown in the screenshot below, and I only CTD on startup now.

Chocolatey CTD Error

I'm not sure which version I have, but it's no older than a week or so, possibly two weeks.

I've been doing a lot of Googling and found this tutorial, which describes how it is possible to access the options and switches in the configuration file when the program isn't running.

My first question would be, is there a simple command that allows us to turn off all of the premium options easily? - Which I'm currently trying to find how to set all options to default, if possible.

If not, what would be the easiest way to do so?

I have no problem turning every option off, then going back in and setting them afterward, but I really need to get it running, as I was working on something else, that requires it to update in Chocolatey before I am able to do anything else. So this has completely brought everything to a grinding halt.

--

**Reply:

--

I'll go ahead and link TheCakeIsNaOH's response below:**

Hi,

This repository is for packages uploaded by the chocolatey-community user on the Chocolatey community repository. Your issue appears to be with error in the the ChocolateyGUI program, not with a specific package on the community repository.

Therefore, please open an issue at the ChocolateyGUI repository instead of here: chocolatey/ChocolateyGUI

I went and turned on quite a few settings I hadn't previously had active, skimming the descriptions, yet I was activating premium, licensed options and I'm only a free user.

The options that are labeled as being only for the licensed editions are still available even if the licensed extension is not installed, but they should not doing anything if the licensed extension is not installed.

It appears most likely that there is a bug, where one of those licensed-only options actually did try to activate, but is failing because there is no license or licensed extension installed.

gep13 commented 2 years ago

@EngineerJack said... My first question would be, is there a simple command that allows us to turn off all of the premium options easily? - Which I'm currently trying to find how to set all options to default, if possible.

Short answer is no, there isn't an option to do this. While using the OSS Version of Chocolatey GUI, if you enable/disable a premium feature it should have no bearing on the execution of the application. These features should only be inspected/used when the Chocolatey GUI Licensed Extension is installed. If enabling/disabling one of the features is causing this exception to occur, then that is a bug that we need to address.

To reset back to all the default settings, you can do the following:

  1. Chocolatey GUI keeps configuration information in two locations, depending on whether it is globally set, or local to the current user
  2. Close Chocolatey GUI
  3. Delete the data.db in the C:\ProgramData\Chocolatey GUI\Config folder
  4. Delete the data.db in the C:\Users\<user name>\AppData\Local\Chocolatey GUI. NOTE Replace <user name> with your user name
  5. Restart Chocolatey GUI

I would be very interested to know if you can replicate the steps that caused this error to occur. If you can, if you can update this issue with that information, it would be very helpful in getting to the root cause of the problem.

Thanks

EngineerJack commented 2 years ago

Thank you so much for your detailed directions, yet, I just deleted one, tried, same CTD. I tried the other, and CTD, so I tried both, and, CTD. Basically, this isn't working.

The interesting thing about this is I truly don't know how I managed to screw it up so badly. Yet, when you are someone like me who is programming illiterate, for the most part, and trying to learn, mistakes happen, and one simple mistake with something can affect a lot of things. Yet, being that Chocolatey has been working, with no issues at all, for over a year, and having not messed with a lot, in terms of programming, fortunately, I do not think this is the cause, at least, not the direct cause.

I was working with Git Gui and Git Bash, and working on trying to get my SSH Keys configured properly, which is why I was really wanting Chocolatey to run since I have Git Gui through it, which is working and set up correctly (hence, why I like installing through Chocolatey). As well as a few other minor things, but nothing too in-depth, except those damn SSH Keys, I was having a horrible time with those, and think I pretty much had it figured out, then this happened, thus, it's still not configured.

I truly wish I could replicate my steps for you, step by step, but for me, it's extremely improbable, due to how if I get frustrated with something, I'll stop and go back to it later, and start on something different. But, I'll be as detailed as I can be. But, what I truly believe was caused by, was my working on configuring my VPN. As, Chocolatey started up like normal, but was taking absolutely forever to run through the initial updating out-of-date apps. I closed it out and restarted it four or five times, and let it just keep running, and it never did initialize.

I have Cyberghost VPN, premium account, and I was working through a guide online to help me get it configured better than it was. I was working on the manual router settings through the website, which then took me to my router settings through AT&T, and I did successfully complete the manual router setup through the Cyberghost website, but I made absolutely sure not to change anything at all with my router through AT&T, as I've learned the hard way in the past messing with that. I never could find the settings the guide I was using was talking about, so, I ended up just closing out of it without making any changes. The main two guides I was using were this and this. I guess I should also mention, I also have the free browser add-on from Cyberghost, which I use on occasion.

I use two different browsers regularly, Firefox and Chrome, each on a different monitor, and I remember that after messing with all of that, Firefox was running horribly slow, but when I went to Chrome, the same website I was waiting forever for on Firefox, loaded instantly on Chrome. It is possible that I had both my new VPN configuration going as well as the Cyberghost addon in Firefox, but in no way can I remember if this is true or not. But, while I was working on these two things I described, Chocolatey was running the entire time in the background, at least during most of it. I've searched through my history while writing this, just to be as accurate as I could be, in recalling what I was working on exactly. But, being how Chocolatey was acting, I am sure it had to have something to do with my setting up the VPN.

I truly hope this proves to be some kind of help, and if I remember something, I'll check back in and update. If you need some kind of bug report, or whatever, just let me know, and I'll provide whatever I can.

EngineerJack commented 2 years ago

I hadn't done anything since I wrote my last post, but by going here "C:\ProgramData\chocolatey\config\chocolatey.config" deleting the old config (which I saved if you want me to upload a copy) and copy/pasting the extremely old version of the config file here, out of curiosity, I started up Chocolatey and it's working again. You know, I didn't see any sensitive information in the config file, so I'll go ahead and upload it for you so you don't have to ask. Or maybe I'll just copy/paste it since I don't see a way to upload a file.

<?xml version="1.0" encoding="utf-8"?>
<chocolatey xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <config>
    <add key="cacheLocation" value="" description="Cache location if not TEMP folder. Replaces `$env:TEMP` value for choco.exe process. It is highly recommended this be set to make Chocolatey more deterministic in cleanup." />
    <add key="containsLegacyPackageInstalls" value="true" description="Install has packages installed prior to 0.9.9 series." />
    <add key="commandExecutionTimeoutSeconds" value="2700" description="Default timeout for command execution. '0' for infinite (starting in 0.10.4)." />
    <add key="proxy" value="" description="Explicit proxy location. Available in 0.9.9.9+." />
    <add key="proxyUser" value="" description="Optional proxy user. Available in 0.9.9.9+." />
    <add key="proxyPassword" value="" description="Optional proxy password. Encrypted. Available in 0.9.9.9+." />
    <add key="webRequestTimeoutSeconds" value="30" description="Default timeout for web requests. Available in 0.9.10+." />
    <add key="proxyBypassList" value="" description="Optional proxy bypass list. Comma separated. Available in 0.10.4+." />
    <add key="proxyBypassOnLocal" value="true" description="Bypass proxy for local connections. Available in 0.10.4+." />
    <add key="upgradeAllExceptions" value="" description="A comma-separated list of package names that should not be upgraded when running `choco upgrade all'. Defaults to empty. Available in 0.10.14+." />
  </config>
  <sources>
    <source id="chocolatey" value="https://chocolatey.org/api/v2/" disabled="false" bypassProxy="false" selfService="false" adminOnly="false" priority="0" />
  </sources>
  <features>
    <feature name="checksumFiles" enabled="true" setExplicitly="false" description="Checksum files when pulled in from internet (based on package)." />
    <feature name="autoUninstaller" enabled="true" setExplicitly="false" description="Uninstall from programs and features without requiring an explicit uninstall script." />
    <feature name="allowGlobalConfirmation" enabled="true" setExplicitly="true" description="Prompt for confirmation in scripts or bypass." />
    <feature name="failOnAutoUninstaller" enabled="false" setExplicitly="false" description="Fail if automatic uninstaller fails." />
    <feature name="failOnStandardError" enabled="false" setExplicitly="false" description="Fail if install provider writes to stderr. Not recommended for use. Available in 0.9.10+." />
    <feature name="allowEmptyChecksums" enabled="false" setExplicitly="false" description="Allow packages to have empty/missing checksums for downloaded resources from non-secure locations (HTTP, FTP). Enabling is not recommended if using sources that download resources from the internet. Available in 0.10.0+." />
    <feature name="allowEmptyChecksumsSecure" enabled="true" setExplicitly="false" description="Allow packages to have empty/missing checksums for downloaded resources from secure locations (HTTPS). Available in 0.10.0+." />
    <feature name="powershellHost" enabled="true" setExplicitly="false" description="Use Chocolatey's built-in PowerShell host. Available in 0.9.10+." />
    <feature name="logEnvironmentValues" enabled="true" setExplicitly="true" description="Log Environment Values - will log values of environment before and after install (could disclose sensitive data). Available in 0.9.10+." />
    <feature name="virusCheck" enabled="true" setExplicitly="true" description="Virus Check - perform virus checking on downloaded files. Available in 0.9.10+. Licensed versions only." />
    <feature name="failOnInvalidOrMissingLicense" enabled="true" setExplicitly="true" description="Fail On Invalid Or Missing License - allows knowing when a license is expired or not applied to a machine. Available in 0.9.10+." />
    <feature name="ignoreInvalidOptionsSwitches" enabled="true" setExplicitly="false" description="Ignore Invalid Options/Switches - If a switch or option is passed that is not recognized, should choco fail? Available in 0.9.10+." />
    <feature name="usePackageExitCodes" enabled="true" setExplicitly="false" description="Use Package Exit Codes - Package scripts can provide exit codes. With this on, package exit codes will be what choco uses for exit when non-zero (this value can come from a dependency package). Chocolatey defines valid exit codes as 0, 1605, 1614, 1641, 3010. With this feature off, choco will exit with 0, 1, or -1 (matching previous behavior). Available in 0.9.10+." />
    <feature name="useEnhancedExitCodes" enabled="true" setExplicitly="true" description="Use Enhanced Exit Codes - Chocolatey is able to provide enhanced exit codes surrounding list, search, info, outdated and other commands that don't deal directly with package operations. To see enhanced exit codes and their meanings, please run `choco [cmdname] -?`. With this feature off, choco will exit with 0, 1, or -1  (matching previous behavior). Available in 0.10.12+." />
    <feature name="exitOnRebootDetected" enabled="false" setExplicitly="false" description="Exit On Reboot Detected - Stop running install, upgrade, or uninstall when a reboot request is detected. Requires 'usePackageExitCodes' feature to be turned on. Will exit with either 350 or 1604. When it exits with 350, it means pending reboot discovered prior to running operation. When it exits with 1604, it means some work completed prior to reboot request being detected. Available in 0.10.12+." />
    <feature name="useFipsCompliantChecksums" enabled="false" setExplicitly="false" description="Use FIPS Compliant Checksums - Ensure checksumming done by choco uses FIPS compliant algorithms. Not recommended unless required by FIPS Mode. Enabling on an existing installation could have unintended consequences related to upgrades/uninstalls. Available in 0.9.10+." />
    <feature name="showNonElevatedWarnings" enabled="false" setExplicitly="true" description="Show Non-Elevated Warnings - Display non-elevated warnings. Available in 0.10.4+." />
    <feature name="showDownloadProgress" enabled="true" setExplicitly="false" description="Show Download Progress - Show download progress percentages in the CLI. Available in 0.10.4+." />
    <feature name="stopOnFirstPackageFailure" enabled="true" setExplicitly="true" description="Stop On First Package Failure - Stop running install, upgrade or uninstall on first package failure instead of continuing with others. As this will affect upgrade all, it is normally recommended to leave this off. Available in 0.10.4+." />
    <feature name="useRememberedArgumentsForUpgrades" enabled="true" setExplicitly="true" description="Use Remembered Arguments For Upgrades - When running upgrades, use arguments for upgrade that were used for installation ('remembered'). This is helpful when running upgrade for all packages. Available in 0.10.4+. This is considered in preview for 0.10.4 and will be flipped to on by default in a future release." />
    <feature name="ignoreUnfoundPackagesOnUpgradeOutdated" enabled="false" setExplicitly="false" description="Ignore Unfound Packages On Upgrade Outdated - When checking outdated or upgrades, if a package is not found against sources specified, don't report the package at all. Available in 0.10.9+." />
    <feature name="skipPackageUpgradesWhenNotInstalled" enabled="false" setExplicitly="false" description="Skip Packages Not Installed During Upgrade - if a package is not installed, do not install it during the upgrade process. Available in 0.10.12+." />
    <feature name="removePackageInformationOnUninstall" enabled="false" setExplicitly="false" description="Remove Stored Package Information On Uninstall - When a package is uninstalled, should the stored package information also be removed?  Available in 0.10.9+." />
    <feature name="logWithoutColor" enabled="false" setExplicitly="false" description="Log without color - Do not show colorization in logging output. Available in 0.10.9+." />
    <feature name="logValidationResultsOnWarnings" enabled="true" setExplicitly="false" description="Log validation results on warnings - Should the validation results be logged if there are warnings? Available in 0.10.12+." />
    <feature name="usePackageRepositoryOptimizations" enabled="true" setExplicitly="false" description="Use Package Repository Optimizations - Turn on optimizations for reducing bandwidth with repository queries during package install/upgrade/outdated operations. Should generally be left enabled, unless a repository needs to support older methods of query. When disabled, this makes queries similar to the way they were done in Chocolatey v0.10.11 and before. Available in 0.10.14+." />
    <feature name="scriptsCheckLastExitCode" enabled="false" setExplicitly="false" description="Scripts Check $LastExitCode (external commands) - Leave this off unless you absolutely need it while you fix your package scripts  to use `throw 'error message'` or `Set-PowerShellExitCode #` instead of `exit #`. This behavior started in 0.9.10 and produced hard to find bugs. If the last external process exits successfully but with an exit code of not zero, this could cause hard to detect package failures. Available in 0.10.3+. Will be removed in 0.11.0." />
  </features>
  <apiKeys />
</chocolatey>