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

Upgrading packages fails with: Object reference not set to an instance of an object. #3299

Closed
5 tasks done
r0ckarong opened this issue Aug 9, 2023 · 3 comments
Closed
5 tasks done

Comments

@r0ckarong
Copy link

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.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

When I try to perform a package upgrade (single or all) the choco CLI fails with an error.

What is Expected?

choco CLI upgrades packages normally

How Did You Get This To Happen?

choco upgrade all or choco upgrade chocolatey

System Details

  • Operating System:
    Windows 10 10.0.19045.0

  • Windows PowerShell version:

PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

  • Chocolatey CLI Version:
    2.2.0

  • Chocolatey Licensed Extension version:
    n/a

  • Chocolatey License type:
    n/a

  • Terminal/Emulator:
    Microsoft Windows Terminal, cmd.exe

Installed Packages

7zip 23.1.0
7zip.commandline 16.2.0.20170209
7zip.install 23.1.0
7zip.portable 23.1.0
adobereader 2023.3.20269
autohotkey.portable 2.0.4
choco-cleaner 1.1.1
chocolatey 2.2.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-dotnetfx.extension 1.0.1
chocolatey-windowsupdate.extension 1.0.5
cleanup-desktop-shortcuts.hook 0.1.0-alpha-20221103
docker 99.0.0
docker-cli 24.0.5
docker-desktop 4.22.0
DotNet4.5.2 4.5.2.20140902
dotnet-5.0-desktopruntime 5.0.17
dotnetfx 4.8.0.20220524
dropbox 179.4.4985
eclipse 4.28.0
etcher 1.18.11
Firefox 116.0.1
fontforge 2023.1.1
foxitreader 12.1.3.15356
gh 2.32.1
Ghostscript.app 10.0.0.20230317
gimp 2.10.34
git 2.41.0
git.install 2.41.0
greenshot 1.2.10.6
imagemagick 7.1.1.1500
imagemagick.app 7.1.1.1500
InkScape 1.3.0
javaruntime 8.0.231
jre8 8.0.381
KB2533623 2.0.0
KB2919355 1.0.20160915
KB2919442 1.0.20160915
KB2999226 1.0.20181019
KB3033929 1.0.5
KB3035131 1.0.3
KB3063858 1.0.0
keepassxc 2.7.5
libreoffice-fresh 7.5.3
make 4.4.1
microsoft-windows-terminal 1.17.11461
mingw 12.2.0.3042023
nodejs-lts 18.17.0
notepadplusplus 8.5.4
notepadplusplus.install 8.5.4
openjdk 20.0.2
openssl 3.1.1
OptiPNG 0.7.7
pandoc 3.1.6
poppler 0.89.0
putty 0.78.0
putty.portable 0.78.0
tortoisegit 2.14.0.1
tortoisesvn 1.14.5.29465
vcredist140 14.36.32532
vcredist2008 9.0.30729.616104
vcredist2010 10.0.40219.32503
vcredist2015 14.0.24215.20170201
vcredist2017 14.16.27033
vlc 3.0.18
vlc.install 3.0.18
vscode 1.80.1
vscode.install 1.80.1
winmerge 2.16.32
wsltty 3.6.4
x-mouse-button-control 2.20.5
xsltproc 1.1.28
youtube-dl 2021.12.17
74 packages installed.

Output Log

https://gist.github.com/r0ckarong/324d1840d9fd13b7d8d8a560ac2027c1

Additional Context

I've pinned the poppler package to version 0.89.0 as a hard dependency for asciidoctor testing.

@r0ckarong r0ckarong added the Bug label Aug 9, 2023
@gep13
Copy link
Member

gep13 commented Aug 9, 2023

@r0ckarong sorry to hear that you are having problems!

The issue that you are facing was called out on the release notes in our docs as well as on the GitHub Release. The issue that you are seeing was introduced in v2.0.0 of Chocolatey CLI and it was fixed in v2.2.2, but in order to workaround it you will unfortunately need to do some manual steps.

These are called out in the comment on the linked issue from the release notes.

Based on the packages that you have installed, I suspect that it is the presence of the cleanup-desktop-shortcuts.hook package that is causing the. problem. If you go ahead and uninstall that, then perform the upgrade of Chocolatey CLI, you should then be able to install the hook package again.

For now, I am going to close off this issue, as it has already been addressed,, but let me know if you have any follow up questions/concerns.

@gep13 gep13 closed this as completed Aug 9, 2023
@gep13
Copy link
Member

gep13 commented Aug 9, 2023

Duplicate of #3292

@gep13 gep13 marked this as a duplicate of #3292 Aug 9, 2023
@gep13 gep13 added Duplicate Issue and removed Bug labels Aug 9, 2023
@r0ckarong
Copy link
Author

Sorry, my bad. I didn't find this specific issue in the docs and didn't think to check the release notes because I was under the impression this was a problem with the installed version not part of the upgrade process. Thanks for the info. Problem is resolved for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants