chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Unable to disable some features when with a Pro license #366

Closed sync-by-unito[bot] closed 6 months ago

sync-by-unito[bot] commented 6 months ago

What You Are Seeing?

When attempting to run choco feature disable --name downloadCache with a Pro License installed you get the following warning output "Feature downloadCache is not supported."

What is Expected?

This should be a supported feature toggle for Pro License customers.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Install Chocolatey OSS on a fresh VM.
  2. Place a Pro License file in the $env:ChocolateyInstall\license directory
  3. Install the chocolatey.extension package
  4. Run choco feature disable --name downloadCache in an administrative Windows PowerShell session.

System Details

Output Log

chocolatey.log

~~~sh 2023-12-05 09:56:57,442 4360 [INFO ] - Chocolatey v2.2.2 Professional 2023-12-05 09:56:57,457 4360 [DEBUG] - Chocolatey is running on Windows v 10.0.20348.0 2023-12-05 09:56:57,457 4360 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old". 2023-12-05 09:56:57,457 4360 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old". 2023-12-05 09:56:57,473 4360 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" feature disable --name downloadCache -d -v --log-file=C:\test.log 2023-12-05 09:56:57,473 4360 [DEBUG] - Received arguments: feature disable --name downloadCache -d -v --log-file=C:\test.log 2023-12-05 09:56:57,520 4360 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage. 2023-12-05 09:56:57,520 4360 [DEBUG] - CountdownTask is now ready and waiting for PostRunMessage. 2023-12-05 09:56:57,535 4360 [DEBUG] - Terminal services setup not necessary for this session. 2023-12-05 09:56:57,551 4360 [DEBUG] - SynchronizeTask is now ready and waiting for PreRunMessage. 2023-12-05 09:56:57,567 4360 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers... 2023-12-05 09:56:57,582 4360 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed... 2023-12-05 09:56:57,598 4360 [DEBUG] - [Synchronize] Updating packages with Programs and Features 2023-12-05 09:56:57,598 4360 [DEBUG] - [Synchronize] Currently only supports removals. Soon will handle updates. 2023-12-05 09:56:57,723 4360 [DEBUG] - Resolving resource PackageSearchResource for source C:\ProgramData\chocolatey\lib 2023-12-05 09:56:57,895 4360 [DEBUG] - chocolatey 2.2.2 2023-12-05 09:56:57,911 4360 [DEBUG] - chocolatey.extension 6.1.0 2023-12-05 09:56:57,973 4360 [DEBUG] - Performing validation checks. 2023-12-05 09:56:57,973 4360 [DEBUG] - Global Configuration Validation Checks: 2023-12-05 09:56:57,988 4360 [DEBUG] - - Package Exit Code / Exit On Reboot = Checked 2023-12-05 09:56:57,988 4360 [DEBUG] - System State Validation Checks: 2023-12-05 09:56:57,988 4360 [DEBUG] - Reboot Requirement Checks: 2023-12-05 09:56:57,988 4360 [DEBUG] - - Pending Computer Rename = Checked 2023-12-05 09:56:57,988 4360 [DEBUG] - - Pending Component Based Servicing = Checked 2023-12-05 09:56:57,988 4360 [DEBUG] - - Pending Windows Auto Update = Checked 2023-12-05 09:56:58,004 4360 [DEBUG] - - Pending File Rename Operations = Ignored 2023-12-05 09:56:58,004 4360 [DEBUG] - - Pending Windows Package Installer = Checked 2023-12-05 09:56:58,004 4360 [DEBUG] - - Pending Windows Package Installer SysWow64 = Checked 2023-12-05 09:56:58,004 4360 [DEBUG] - Cache Folder Lockdown Checks: 2023-12-05 09:56:58,004 4360 [DEBUG] - - Elevated State = Checked 2023-12-05 09:56:58,004 4360 [DEBUG] - - Folder Exists = Checked 2023-12-05 09:56:58,020 4360 [DEBUG] - - Folder lockdown = Checked 2023-12-05 09:56:58,020 4360 [INFO ] - 3 validations performed. 3 success(es), 0 warning(s), and 0 error(s). 2023-12-05 09:56:58,035 4360 [DEBUG] - The source '' evaluated to a 'normal' source type 2023-12-05 09:56:58,052 4360 [DEBUG] - NOTE: Hiding sensitive configuration data! Please double and triple check to be sure no sensitive data is shown, especially if copying output to a gist for review. 2023-12-05 09:56:58,068 4360 [DEBUG] - Configuration: MaximumDownloadRateBitsPerSecond='0'| MaximumDownloadRateBitsPerSecondAutoSet='False'| LicensedInformation.LicenseType='Professional'| LicensedInformation.LicenseIsValid='True'| LicensedInformation.LicenseIsTrial='False'| LicensedInformation.PauseInTrial='False'| LicensedInformation.LicenseUserName='Chocolatey Software, Inc. (dev+Professional[at REDACTED])'| LicensedInformation.LicenseExpirationDate='7/31/2024 12:00:00 AM'| LicensedInformation.LicensedVersion='6.1.0.0'| ChocolateyVersion.Version='2.2.2.0'| ChocolateyVersion.IsLegacyVersion='False'| ChocolateyVersion.Revision='0'|ChocolateyVersion.IsSemVer2='False'| ChocolateyVersion.OriginalVersion='2.2.2.0'| ChocolateyVersion.Major='2'| ChocolateyVersion.Minor='2'|ChocolateyVersion.Patch='2'| ChocolateyVersion.IsPrerelease='False'| ChocolateyVersion.HasMetadata='False'| LicensedFeatures.UseDownloadCache='True'| LicensedFeatures.AllowSynchronization='True'| LicensedFeatures.AllowBackgroundServiceOverride='False'| LicensedFeatures.UseBackgroundService='False'| LicensedFeatures.UseBackgroundServiceWithSelfServiceSourcesOnly='False'| LicensedFeatures.UseBackgroundServiceWithNonAdministratorsOnly='False'| LicensedFeatures.UseBackgroundServiceInteractively='False'| LicensedFeatures.UseBackgroundServiceWithEmptySessions='False'| LicensedFeatures.AllowBackgroundServiceUninstallsFromUserInstallsOnly='False'| LicensedFeatures.AllowPreviewFeatures='False'| LicensedFeatures.ShowAllPackagesInProgramsAndFeatures='False'| LicensedFeatures.AdminOnlyExecutionForAllChocolateyCommands='False'| LicensedFeatures.AdminOnlyExecutionForNewCommand='False'| LicensedFeatures.AdminOnlyExecutionForDownloadCommand='False'| LicensedFeatures.ReduceInstalledPackageSize='True'| LicensedFeatures.ReduceOnlyNupkgSize='False'| LicensedFeatures.UseLocalSystemForServiceInstalls='False'| LicensedFeatures.WarnOnUpcomingLicenseExpiration='False'| LicensedFeatures.UseChocolateyCentralManagement='False'| LicensedFeatures.UseChocolateyCentralManagementDeployments='False'| LicensedFeatures.UseLogRetentionPolicy='False'| LicensedFeatures.ExcludeChocolateyPackagesDuringUpgradeAll='False'| LicensedNewCommand.UseOriginalFilesLocation='False'| LicensedNewCommand.PauseOnError='False'| LicensedNewCommand.BuildPackage='False'| LicensedNewCommand.GeneratePackagesFromSoftwareInstalls='False'| LicensedNewCommand.IncludeArchitectureInPackageId='False'| LicensedDownloadCommand.Internalize='False'| LicensedDownloadCommand.AppendUseOriginalLocation='False'| LicensedDownloadCommand.InternalizeAnyUrlFound='False'| LicensedDownloadCommand.DownloadInstalledPackages='False'| LicensedDownloadCommand.IgnoreUnfoundPackages='False'| LicensedConvertCommand.IncludeAll='False'| LicensedConvertCommand.IncludeDependencies='False'| LicensedPushCommand.SkipCleanup='False'| LicensedListCommand.ShowAuditInformation='False'| LicensedListCommand.ShowDisplayVersion='False'| LicensedUninstallCommand.FromProgramsAndFeatures='False'| VirusConfiguration.VirusCheckMinimumPositives='4'| VirusConfiguration.VirusScannerType='VirusTotal'| VirusConfiguration.GenericVirusScannerArgs=''[[File]]''| VirusConfiguration.GenericVirusScannerValidExitCodes='0'| VirusConfiguration.GenericVirusScannerTimeoutInSeconds='120'| LicensedBackgroundService.LogRetentionPolicyInDays='0'| CommandName='feature'| CacheLocation='C:\Users\Administrator\AppData\Local\Temp\chocolatey'| CommandExecutionTimeoutSeconds='2700'|WebRequestTimeoutSeconds='30'| SourceType='normal'|ShowOnlineHelp='False'|Debug='True'|Verbose='True'| Trace='False'|Force='False'|Noop='False'|HelpRequested='False'| UnsuccessfulParsing='False'|RegularOutput='True'|QuietOutput='False'| PromptForConfirmation='True'|DisableCompatibilityChecks='False'| AcceptLicense='False'|AllowUnofficialBuild='False'| AdditionalLogFileLocation='C:\test.log'|Input='disable'| AllVersions='False'|SkipPackageInstallProvider='False'| SkipHookScripts='False'|Prerelease='False'|ForceX86='False'| OverrideArguments='False'|NotSilent='False'| ApplyPackageParametersToDependencies='False'| ApplyInstallArgumentsToDependencies='False'|IgnoreDependencies='False'| CacheExpirationInMinutes='30'|AllowDowngrade='False'| ForceDependencies='False'|PinPackage='False'| Information.PlatformType='Windows'| Information.PlatformVersion='10.0.20348.0'| Information.PlatformName='Windows Server 2016'| Information.ChocolateyVersion='2.2.2.0'| Information.ChocolateyProductVersion='2.2.2'| Information.FullName='choco, Version=2.2.2.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'| Information.Is64BitOperatingSystem='True'| Information.Is64BitProcess='True'|Information.IsInteractive='True'| Information.UserName='Administrator'| Information.UserDomainName='TESTY'| Information.IsUserAdministrator='True'| Information.IsUserSystemAccount='False'| Information.IsUserRemoteDesktop='False'| Information.IsUserRemote='False'|Information.IsProcessElevated='True'| Information.IsLicensedVersion='True'| Information.IsLicensedAssemblyLoaded='True'| Information.LicenseType='Professional'| Information.CurrentDirectory='C:\Users\Administrator'| Features.AutoUninstaller='True'|Features.ChecksumFiles='True'| Features.AllowEmptyChecksums='False'| Features.AllowEmptyChecksumsSecure='True'| Features.FailOnAutoUninstaller='False'| Features.FailOnStandardError='False'|Features.UsePowerShellHost='True'| Features.LogEnvironmentValues='False'|Features.LogWithoutColor='False'| Features.VirusCheck='True'| Features.FailOnInvalidOrMissingLicense='False'| Features.IgnoreInvalidOptionsSwitches='True'| Features.UsePackageExitCodes='True'| Features.UseEnhancedExitCodes='False'| Features.UseFipsCompliantChecksums='False'| Features.ShowNonElevatedWarnings='True'| Features.ShowDownloadProgress='True'| Features.StopOnFirstPackageFailure='False'| Features.UseRememberedArgumentsForUpgrades='False'| Features.IgnoreUnfoundPackagesOnUpgradeOutdated='False'| Features.SkipPackageUpgradesWhenNotInstalled='False'| Features.RemovePackageInformationOnUninstall='False'| Features.ExitOnRebootDetected='False'| Features.LogValidationResultsOnWarnings='True'| Features.UsePackageRepositoryOptimizations='True'| ListCommand.LocalOnly='False'|ListCommand.IdOnly='False'| ListCommand.IncludeRegistryPrograms='False'|ListCommand.PageSize='25'| ListCommand.Exact='False'|ListCommand.ByIdOnly='False'| ListCommand.ByTagOnly='False'|ListCommand.IdStartsWith='False'| ListCommand.OrderByPopularity='False'|ListCommand.ApprovedOnly='False'| ListCommand.DownloadCacheAvailable='False'| ListCommand.NotBroken='False'| ListCommand.IncludeVersionOverrides='False'| ListCommand.ExplicitPageSize='False'| ListCommand.ExplicitSource='False'| UpgradeCommand.FailOnUnfound='False'| UpgradeCommand.FailOnNotInstalled='False'| UpgradeCommand.NotifyOnlyAvailableUpgrades='False'| UpgradeCommand.ExcludePrerelease='False'| NewCommand.AutomaticPackage='False'| NewCommand.UseOriginalTemplate='False'|SourceCommand.Command='unknown'| SourceCommand.Priority='0'|SourceCommand.BypassProxy='False'| SourceCommand.AllowSelfService='False'| SourceCommand.VisibleToAdminsOnly='False'| FeatureCommand.Name='downloadCache'|FeatureCommand.Command='Disable'| ConfigCommand.Command='Unknown'|ApiKeyCommand.Command='Unknown'| PinCommand.Command='Unknown'|OutdatedCommand.IgnorePinned='False'| ExportCommand.IncludeVersionNumbers='False'|Proxy.BypassOnLocal='True'| TemplateCommand.Command='unknown'|CacheCommand.Command='Unknown'| CacheCommand.RemoveExpiredItemsOnly='False'| 2023-12-05 09:56:58,082 4360 [DEBUG] - _ Chocolatey:ProChocolateyFeatureCommand - Normal Run Mode _ 2023-12-05 09:56:58,082 4360 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers... 2023-12-05 09:56:58,082 4360 [DEBUG] - [Countdown] Determining how long until license expires 2023-12-05 09:56:58,082 4360 [ERROR] - Chocolatey had an error occur: System.ApplicationException: Feature 'downloadCache' is not supported. at chocolatey.infrastructure.app.services.ChocolateyConfigSettingsService.ValidateSupportedFeature(ConfigFileFeatureSetting feature) at chocolatey.infrastructure.app.services.ChocolateyConfigSettingsService.DisableFeature(ChocolateyConfiguration configuration) at chocolatey.infrastructure.app.runners.GenericRunner.Run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs) at chocolatey.infrastructure.app.runners.ConsoleApplication.Run(String[] args, ChocolateyConfiguration config, Container container) at chocolatey.console.Program.Main(String[] args) 2023-12-05 09:56:58,098 4360 [DEBUG] - Exiting with 1 ~~~

Workarounds

  1. N/A

Proposed Solution

  1. N/A

Related Issues and Tickets

Done Checklist

┆Issue is synchronized with this Gitlab issue by Unito

gep13 commented 6 months ago

This is going to ship with Chocolatey Licensed Extension 5.0.4.