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

PowerShell 7.4.6 Operation Stopped when installing Chocolatey #3569

Open
6 tasks done
TechGuy419 opened this issue Nov 19, 2024 · 4 comments
Open
6 tasks done

PowerShell 7.4.6 Operation Stopped when installing Chocolatey #3569

TechGuy419 opened this issue Nov 19, 2024 · 4 comments
Labels
0 - Waiting on User Bug Pending Closure This issue has been marked as having no response or is stale and will soon be closed.

Comments

@TechGuy419
Copy link

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • 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.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

PS C:\Users\username> 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'))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0 to C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall

GAC Version Location


False v4.0.30319 C:\Program Files\PowerShell\7\WindowsBase.dll
OperationStopped:

What is Expected?

The expectation is for the installation to complete without errors.

How Did You Get This To Happen?

My PC attempted to update to PowerShell 7.4.6 yesterday and failed. This resulted in the removal of PowerShell 7 from my PC. As a part of the troubleshooting, I removed the C:\ProgramData\chocolatey folder. I finally was successful with installing PowerShell 7.4.6 and attempted to reinstall Chocolatey. Below is the output of the attempt.

PS C:\Users\username> 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'))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0 to C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\username\AppData\Local\Temp\chocolatey\chocoInstall

GAC Version Location


False v4.0.30319 C:\Program Files\PowerShell\7\WindowsBase.dll
OperationStopped:

It appears the MS has updated the file version of the WindowsBase.dll to 8.0.1024.46810 and I believe that this is why the install is failing.

Image

System Details

  • Operating System: Windows 11
  • Windows PowerShell version: 7.4.6
  • Chocolatey CLI Version: N/A
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: Community
  • Terminal/Emulator: MS Terminal

Installed Packages

N/A

Output Log

Since the install is failing, C:\ProgramData\chocolatey does not exist.

Additional Context

No response

@TechGuy419 TechGuy419 added the Bug label Nov 19, 2024
@corbob
Copy link
Member

corbob commented Nov 20, 2024

I have tried on a fully patched Windows 11 system with PowerShell 7.4.6 installed, and the Chocolatey installation worked without issue. This feels like an environment issue, but I'm not sure what aspect of the environment might be causing it. If you try with Windows PowerShell do you encounter the same issues?

@TechGuy419
Copy link
Author

TechGuy419 commented Nov 20, 2024

It appears to have completed with errors. What version of WindowsBase.dll is on your PC?

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows                                                                                                                                                       Loading personal and system profiles took 5055ms.                                                                       PS C:\Users\UserName> 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'))
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/2.4.0 to C:\Users\UserName\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Users\UserName\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Users\UserName\AppData\Local\Temp\chocolatey\chocoInstall
New-Object : Exception calling ".ctor" with "3" argument(s): "End of Central Directory record could not be found."
At
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1:934
char:23
+ ... ipArchive = New-Object -TypeName System.IO.Compression.ZipArchive -Ar ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

Installing Chocolatey on the local machine
& : The term 'C:\Users\UserName\AppData\Local\Temp\chocolatey\chocoInstall\tools\chocolateyInstall.ps1' is not
recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:538 char:3
+ & $chocoInstallPS1
+   ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\UserName...ateyInstall.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
PS C:\Users\UserName>

@corbob
Copy link
Member

corbob commented Nov 21, 2024

The WindowsBase.dll from PowerShell 7.4.6 is the same version that you have. Looking at the errors and where it stopped in both instances, it looks like the line that is causing issues is: Microsoft.PowerShell.Archive\Expand-Archive -Path $file -DestinationPath $tempDir -Force. Out of curiosity: are you able to use Expand-Archive to unzip any other files on your system? Or perhaps view them with Windows Explorer?

Copy link

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue will be closed in 14 days if it continues to be inactive.

@github-actions github-actions bot added the Pending Closure This issue has been marked as having no response or is stale and will soon be closed. label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Waiting on User Bug Pending Closure This issue has been marked as having no response or is stale and will soon be closed.
Projects
None yet
Development

No branches or pull requests

2 participants