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

Object reference not set to an instance of an object. #27

Open
jbne opened this issue Jul 10, 2024 · 10 comments
Open

Object reference not set to an instance of an object. #27

jbne opened this issue Jul 10, 2024 · 10 comments

Comments

@jbne
Copy link

jbne commented Jul 10, 2024

I'm getting this error when trying to perform a Windows update using Packer to build a win11-23h2-ent VM in Azure:

2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: Install-WindowsUpdate : Something goes wrong: Update for Windows Security platform antimalware platform - KB5007651
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: (Version 1.0.2402.27001); Object reference not set to an instance of an object.
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: At C:\Windows\Temp\script-668de296-dc4e-939c-b1ea-098a3fa74e58.ps1:18 char:1
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: + Install-WindowsUpdate -AcceptAll -AutoReboot
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1:     + CategoryInfo          : CloseError: (:) [Get-WindowsUpdate], Exception
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1:     + FullyQualifiedErrorId : Debug,PSWindowsUpdate.GetWindowsUpdate
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1:
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]
2024-07-09T18:24:25-07:00: ==> azure-arm.autogenerated_1: Step "StepProvision" failed

This is a similar error to the packer-plugin-windows-update described in this issue that I recently opened, so maybe they are somewhat related - something that was never expected to be null is now null maybe?

rgl/packer-plugin-windows-update#144

@callworthp
Copy link

I'm suddenly seeing this same error on a wide range of machines.

@jbne
Copy link
Author

jbne commented Jul 11, 2024

This issue is most likely caused by KB5040442, similar to the one I posted in the packer-plugin-windows-update issue. A workaround is to use a previous Windows version that does not include that update and/or exclude installing KB5040442 for now until there's a fix for it from Microsoft.

@plao
Copy link

plao commented Jul 18, 2024

I'm suddenly seeing this same error on a wide range of machines.

same issue for me...

@callworthp
Copy link

It's on multiple machines with multiple updates. It's not just one problematic update from Microsoft.

@plao
Copy link

plao commented Jul 18, 2024

Have a look here, I suppose, it's related...

https://learn.microsoft.com/en-us/windows/release-health/status-windows-11-23H2#the-june-2024-preview-update-might-impact-applications-using-windows-update-apis

@HoffmannTom
Copy link

It happens with all users I tried.
system account, Administrator accounts ,normal account.
Same error message as above.

@callworthp
Copy link

callworthp commented Jul 22, 2024

Updating PSWindowsUpdate to version 2.2.1.5 resolved the issue for me.

@plao
Copy link

plao commented Jul 22, 2024

Updating PSWindowsUpdate to version 2.2.1.5 resolved the issue for me.

Thanks a lot! I will try also and I will give here feedback!

@plao
Copy link

plao commented Jul 22, 2024

Updating PSWindowsUpdate to version 2.2.1.5 resolved the issue for me.

Seems to working, yes! Thanks a lot again ;-)

@gen2k1
Copy link

gen2k1 commented Jul 27, 2024

Thanks, that also worked for me! :)

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

No branches or pull requests

5 participants