Closed nylentone closed 4 years ago
I am also receiving the same error message as mentioned above when running the Get-ODStatus cmdlet on certain Windows 10 1909 devices, however the cmdlet runs on other Win10 1909 devices (all with similar software installed) without issue. When run on the devices that are impacted, the cmdlet returns this error in every case: "Get-ODStatus : Object reference not set to an instance of an object".
I have referred to the previously reported issues for the module and based on that I have checked .NET version on the impacted devices versus those that are working and the .Net versions are the same in both cases.
I have also checked the file hash of the OneDriveLib.dll against a current download stream using the method that you provide, and do have matching hashes which return this:
"94AE163BC9FAE9CC8E831140080076A88C06B5382EA28B644673C7BDA10420D5".
Also, an Import-Module of the DLL does not return any errors on either the impacted devices or otherwise.
Would you be able to advise if there may be other things that I could check? Also, would you be able to confirm that the file hash above is the current file hash for the DLL (it does appear to be base a new download of the file)?
@rodneyviana , I work with @ShellGame and we were able to find and fix the issue.
I submitted the PR #17 with the fix.
I added Eduardo's fix to Object reference not set to an instance of an object. Please use the latest release.
I can import-module onedrivelib.dll on any computer successfully.
On the first computer I tried it out on, I can run Get-ODStatus successfully.
On any other computer, I get "Object reference not set to an instance of an object."
It doesn't matter whether I'm logged into OneDrive or not.
I can't find a single difference between the computer it works on and the others. Is there some dependency I'm missing?