Closed FLeven closed 2 years ago
I've tried to replicate this with the adobereader
package from the Chocolatey Community Repository, and I can't.
On Windows 10, I installed Chocolatey CLI 0.12.0, Chocolatey Licensed Extension 3.0.0, internalized abobereader
and then installed the internalized version. Here is what I had installed:
PS C:\Users\WDAGUtilityAccount> choco list -lo
Chocolatey v0.12.0 Business
chocolatey 0.12.0
chocolatey.extension 3.0.0
Despite the bug in v3.0.0 of Chocolatey Licensed Extension, that you mentioned, the internalized version of adobereader
installed without any issues.
PS C:\Users\WDAGUtilityAccount> choco install adobereader -s .
Chocolatey v0.12.0 Business
Installing the following packages:
adobereader
By installing, you accept licenses for the packages.
KB2919442 v1.0.20160915
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
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.
adobereader v2021.011.20039
adobereader package files install completed. Performing other installation steps.
WARNING: No registry key found based on 'Adobe Acrobat Reader DC*'
True
Configuring manual update checks and installs.
Copying adobereader (update)
from 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDCUpd2101120039_MUI.msp'
Virus checking skipped/turned off. Not verifying 'AcroRdrDCUpd2101120039_MUI.msp'
Copying adobereader
from 'C:\ProgramData\chocolatey\lib\adobereader\tools\files\AcroRdrDC1500720033_MUI.exe'
Virus checking skipped/turned off. Not verifying 'AcroRdrDC1500720033_MUI.exe'
Installing AcroRdrDC1500720033_MUI.exe...
AcroRdrDC1500720033_MUI.exe has been installed.
Progress: 100% - 2/2 completed adobereader may be able to be automatically uninstalled.
The install of adobereader was successful.
Software installed to 'C:\Program Files (x86)\Adobe\Acrobat Reader DC\'
Chocolatey installed 3/3 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
I then started with a fresh Windows 10 sandbox and installed Chocolatey CLI 0.12.0, Chocolatey Licensed Extension 3.1.0, internalized abobereader
and then installed the internalized version. Here is what I had installed:
PS C:\Users\WDAGUtilityAccount> choco list -lo
Chocolatey v0.12.0 Business
chocolatey 0.12.0
chocolatey.extension 3.1.0
2 packages installed.
I'm not going to post the logs of installing the internalized version with Chocolatey Licensed Extension 3.1.0 as it's exactly the same as for 3.0.0.
This is going to need some more investigation to see what the issue you are encountering is. Can I ask you to run choco support
to see what your options are and raise a Support ticket?
What about the unzip to c:\ , should have beend fixed in 3.1.0, but it isn't ?
Then something else has changed, as this runs in a MDT/SCCM task sequence and you are right, a manual install is surprisingly working.
Before I raise a ticket, all I can do is, add another restart after all c4b dependency's and agents are installed and hope it will work.
Also the time to install, chocolatey.extension, Agent etc. has almost doubled, are there any checks made to contact your servers ? What about Air-Gap systems, will there be timeouts if choco can't contact temelemtrie/license servers ?
What about the unzip to c:\ , should have beend fixed in 3.1.0, but it isn't ? Then something else has changed, as this runs in a MDT/SCCM task sequence and you are right, a manual install is surprisingly working.
This was fixed and was released with 3.1.0. The manual install works for both of us so if it wasn't fixed, it would fail there too.
Also the time to install, chocolatey.extension, Agent etc. has almost doubled, are there any checks made to contact your servers ? What about Air-Gap systems, will there be timeouts if choco can't contact temelemtrie/license servers ?
I hadn't noticed the time to install increasing when I did the test earlier. Are you using the /NoContextMenu
parameter (e.g. choco install chocolatey.extension --params='"/NoContextMenu"'
) when you are installing on headless systems? Adding context menus does add to the installation time, but again this hasn't changed from previous versions.
If you have internalized Chocolatey Extension and Chocolatey, and installing it from your internal Nexus repository, then there would be no contact with any Chocolatey servers (for example the Chocolatey Community Repository). Chocolatey doesn't use license servers nor do we collect telemetry. In short, Chocolatey never 'phones' home and has an offline install) to work with air=gapped systems.
2022-01-19 18:05:35,472 5056 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\checksum.exe" -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp"']
2022-01-19 18:05:35,535 5056 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig
This is the first point where the error appears and it appears that the checksum command cannot find C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2101120039_MUI.msp
2022-01-19 18:29:25,611 1968 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\7z.exe" x -aoa -bd -bb1 -o"c:" -y "C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip"']
2022-01-19 18:29:25,689 1968 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig
Here it looks like C:\ProgramData\chocolatey\lib\PSIwms_vgtcl_denby_tst\source\psi_vgtcl_denby_tst.zip
doesn't exist.
The bug in Get-ChocolateyUnzip
in Chocolatey Licensed Extension 3.0.0 only occurred for the root folder if it had a \
at the end. It always worked for C:
for example. 7Zip here is extracting to C:
It all worked on 11.3 and 2.2.1, nothing has changed except chocolatey versions.
Ok, I rolled back everything (including original packages from month ago) and everything is working without any problems. Except adobereader, where I could not find an old package, this demonstrates, that something has changed with everything packaged on newer versions.
choco 0.11.3 extension 2.2.1
my choco config remained the same:
choco source remove --name="'chocolatey'"
choco feature enable --name="'allowGlobalConfirmation'"
choco feature disable --name="'showDownloadProgress'"
choco config set --name="'cacheLocation'" --value="'$env:ChocolateyInstall\choco-cache'"
choco config set --name="'commandExecutionTimeoutSeconds'" --value="'14400'"
choco upgrade chocolatey-license
choco source disable --name="'chocolatey.licensed'"
choco upgrade chocolatey.extension --params="'/NoContextMenu'"
choco upgrade chocolatey-agent
choco feature enable --name="'useChocolateyCentralManagement'"
choco feature disable --name="'reduceInstalledPackageSpaceUsage'"
choco config set --name="'centralManagementReportPackagesTimerIntervalInSeconds'" --value="'1800'"
choco config set --name="'centralManagementServiceUrl'" --value="'https://xxx:24020/ChocolateyManagementService'"
choco config set --name="'centralManagementReceiveTimeoutInSeconds'" --value="'60'"
choco config set --name="'centralManagementSendTimeoutInSeconds'" --value="'60'"
choco config set --name="'centralManagementCertificateValidationMode'" --value="'PeerOrChainTrust'"`
As mentioned before, I am using choco in MDT and that's why I believe that something has changed with "choco pack", "environment variables (TEMP)", packaging or the way choco uses it's own "powershell shell".
Only some internalized packages caused problems like adobereader, fslogix, corretto8jre and vcredist140(2013,2008), pdf24 always worked fine.
Alomst all internal package never had any problems only this chocinstall.ps1 stopped working, beginning with extensions 3.0.0 and 3.1.0;
`$ErrorActionPreference = 'Stop'
$packageName = 'app_tst'
$softwareName = 'app_tst'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = ''
$checksum = ''
$silentArgs = '/S'
$validExitCodes = @(0,1)
$fileLocation = Join-Path $toolsDir 'app_tst.zip'
$packageArgs = @{
packageName = $packageName
Destination = 'c:'
FileFullPath = $fileLocation
}
Get-ChocolateyUnzip @packageArgs
Remove-Item $fileLocation | out-null`
If you consider this an edge case, please close the issue, but I doubt that my environment will only break some packages and not all of them.
Bear in mind that any package that has been internalized with version 3.0.0+ of Chocolatey Licensed Extension will not be able to be installed with Chocolatey open source or a version of Chocolatey Licensed Extension less than 3.0.0.
If you haven't already done so, can I ask you to run choco support
to see what your options are and raise a Support ticket? Mention this issue number. They will be able to gather logs and more information.
I know, that's when all the trouble startet.
@FLeven can you confirm whether you have reached out to the support team regarding this problem?
Yes, before and after I reported the issue on Github.
For future reference, I've updated the original message with the Zendesk ticket.
I still have this problem..
But I believe I got to the root cause of the problem. Past versions (Working): 2021-10-24 10:07:33,684 5804 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\helpers..\tools\checksum.exe' -c="6230414ae6e20555aebecb5291273c4bdcc5aa9a8272691d81c692820c2c1c55b66d68e77b38528e71c9213c5543635618317762ba8fbde93b171a8774a7b24c" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2100720099_MUI.msp"] 2021-10-24 10:07:35,677 5804 [DEBUG] - Command ['C:\ProgramData\chocolatey\helpers..\tools\checksum.exe' -c="6230414ae6e20555aebecb5291273c4bdcc5aa9a8272691d81c692820c2c1c55b66d68e77b38528e71c9213c5543635618317762ba8fbde93b171a8774a7b24c" -t="SHA512" -f="C:\Users\Administrator\AppData\Local\Temp\1\chocolatey\AcroRdrDCUpd2100720099_MUI.msp"] exited with '0'.
Current Version (12.1 still failing): 022-03-01 16:30:41,035 4416 [DEBUG] - Executing command ['C:\ProgramData\chocolatey\tools\checksum.exe' -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\ProgramData\chocolatey\choco-cache\AcroRdrDCUpd2101120039_MUI.msp"] 2022-03-01 16:30:41,035 4416 [DEBUG] - Calling command ['"C:\ProgramData\chocolatey\tools\checksum.exe" -c="8a854f2bd07229cb43901f7cec8755b8dde9eeea5671230cc573970ced299f687af5d22b3c962e454058d09bf6edeb8448aacb56f6fb1bf65ef9017a9b875d61" -t="SHA512" -f="C:\ProgramData\chocolatey\choco-cache\AcroRdrDCUpd2101120039_MUI.msp"']
As this fails in two circumstances on my side 1) checksum.exe 2) 7z.exe is called and in both cases the newer chocolatey versions added single quotes around the full command, I believe this caused the "folder not found" error in my automated installs.
@FLeven As this is a licensed issue and you've already raised a ticket for it, can you deal with Support for any follow-ups? We are unable to support you via this GitHub issue in a timely way. The Support team will be able to troubleshoot the issue and establish the root cause which we then track here into a fix, should it be needed.
Ok, but might happen to other versions too, if the choco install script is startet from a windows task or if a CMD starts a PS1 to install packages etc.
@FLeven I didn't mean for you to close the issue. We can look at the outcome of the Zendesk tickets and update this with the solution / remediation we need to take. But Support can look at things in private that we can't do here.
Workaround is to run chocolatey in CMD only.
Other options would have been to add "--use-system-powershell", but this seems not to be compatible with the license check anymore. I could also stay on version 11.3 for example, it still workks without any problems.
I wanted to confirm that this was closed as we could not reproduce the issue either above or within the Zendesk ticket that was raised.
What You Are Seeing?
I updated to the newest versions and still internalized packages like adobereader, fslogix or Corretti8jre want install anymore. Also internal packages unzipping to "C:\" still don't work #284
5056 [ERROR] - ERROR: Der Verzeichnisname ist ung�ltig -> ?Path/foldername wrong?
2022-01-19 18:05:46,659 5056 [ERROR] - The install of adobereader was NOT successful. 2022-01-19 18:05:46,674 5056 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\adobereader\tools\chocolateyinstall.ps1'. See log for details.
What is Expected?
Flawless installation as before chocolatey.extension 3.0.0
How Did You Get This To Happen? (Steps to Reproduce)
Internalize one of those packages, push to a nexus. install:
System Details
Server 2019 (German Version) Powershell 5.1 Chocolatey 0.12.0 Chocolatey.extension 3.1.0
AdobeReader:
Internal package:
References: