object reference not set

22 views
Skip to first unread message

Jon Parodi

unread,
Jul 19, 2018, 12:05:12 PM7/19/18
to gshell-discuss
suddenly, one of the machines with gshell has started throwing the following errors for any gshell command.  I am running the most recent build (10.1.4) and have tried uninstalling and completely removing the left over configuration files as well.
I suspect this may not be directly related to gshell but its the only module in which I am seeing this error.  This also occurs under different user profiles

env is server 2012, psversion is 5.1


get-gauser : Object reference not set to an instance of an object.
At line:1 char:1
+ get-gauser jparodi
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-GAUser], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,gShell.Cmdlets.Directory.GAUser.GetGAUserCommand

PS C:\Windows\system32> $error[0] | fl -force


Exception             : System.NullReferenceException: Object reference not set to an instance of an object.
                           at gShell.Cmdlets.Utilities.OAuth2.OAuth2CmdletBase.GetFullEmailAddress(String account,
                        AuthenticatedUserInfo authInfo)
                           at gShell.Cmdlets.Directory.GAUser.GetGAUserCommand.ProcessRecord()
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-GAUser], NullReferenceException
FullyQualifiedErrorId : System.NullReferenceException,gShell.Cmdlets.Directory.GAUser.GetGAUserCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :

I am still searching other locations for fixes (maybe a update to .net is needed?) and will report back if I find anything.

Spencer Varney

unread,
Jul 20, 2018, 12:12:42 AM7/20/18
to Jon Parodi, gshell-discuss
The good news is I'm not ignoring you. The bad news is I've taken a new job, moved to the other side of the country and currently do not have a windows machine to either continue my development of new gshell or to troubleshoot the existing. :D

For now, try renaming or moving the existing config files and reconfiguring gShell on that machine (reentering the client secrets, etc), does that help? What about moving the oauth json file that is on a working machine to this one, or vice versa? Same with the config file. That will help rule out the files, at least.

Regards,

Spencer

--
You received this message because you are subscribed to the Google Groups "gshell-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gshell-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon Parodi

unread,
Jul 25, 2018, 3:31:18 PM7/25/18
to gshell-discuss
crud.  makes me want to send you a windows machine :)
Congrats on the new position though and to the west (?) coast

i've tried uninstalling the module and clearing out all things 'gShell' related from $env:PSModulePath and still no luck.   

Jon Parodi

unread,
Jul 30, 2018, 12:45:52 PM7/30/18
to gshell-discuss
double posting from the reddit thread:

Issue is resolved as of this point.  It appears you were correct in your original suspicions that the oauth json file was empty or somehow corrupted.

best,
Jon
Reply all
Reply to author
Forward
0 new messages