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 - Get-Gceinstance on project with no VMs #649

Open
TitanRob16 opened this issue Oct 22, 2020 · 0 comments

Comments

@TitanRob16
Copy link

This seems to have stopped working for my entire team overnight (it was working fine yesterday).
When running Get-gceinstance -Project [projectname] against a project without any VM instances, we receive the error:

Get-gceinstance : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-gceinstance -Project [projectname]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-GceInstance], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Google.PowerShell.ComputeEngine.GetGceInstanceCmdlet

The command works fine when there are instances within the project.
I've tried uninstalling and reinstalling the PowerShell module, and I've tried reinstalling the Cloud SDK to no avail.
I expect the command to give nothing rather than an error message.

Any help with this would be greatly appreciated.

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

1 participant