The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to reigister at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Active IQ Unified Manager Discussions

Object reference not set to an instance of an object error

d_ellis

We are itermittently recieving the error, Error: Object reference not set to an instance of an objec, when invoking the following powershell cmdlets via WFA 3.1? Does anyone have diagnosis, it looks like the commands are applying changes to the storage systems so we are a little confused on the return message from WFA/Powershell.

 

 

 Start-NaSnapvaultSecTransfer

 

4 REPLIES 4

d_ellis

@sinhaa

 

I sent you a couple of messages requesting an email address where I could forward you the results from a failure. Did you see those?

d_ellis

I've had a chance to review solutons in existence on the community, including rolling back the powershell toolkit version and the error still persists.  I'm primarly seing the error when executing the cmdlet Start-NaSnapvaultSecTransfer from WFA. Are there any other suggested solutions?

sinhaa

@d_ellis

 

"Object reference not set to an instance of an object" is a very generic error from powershell and can come in many unique cases. We first need to zero down the source of the problem. In WFA the source can be:

 

1. Windows Powershell

2. DataONTAP Powershell Toolkit

3. The Command's powershell code.

 

And all the 3 can throw this very error "Object reference not set to an instance of an object" I assume its a custom command.. You can send your command dar file for me to have a look.

 

Also, you can start some debugging from your end:

 

 

 At the end of the command code, add the below code and save the command. Run your workflow and wait for it to fail with the mentioned error.

 

-----

trap {

 

$at_line= $_.InvocationInfo.ScriptLineNumber

$at_char = $_.InvocationInfo.OffsetInLine

$at_code = $_.InvocationInfo.Line

Get-WfaLogger -Error -Message "Error Occurred at Code `"$at_code`" Line: $at_line Char: $at_char"

}

 

-----

 

In WFA, debugging a powershell code it very difficult since it only throws the exception, but NOT the location where the exception happened. Bigger the code, so it the problem. The above trap solves it for you.

 

This should now allow us to predict where is the error cmming from.

 

Next steps depends on the outcome. Awaiting your response.

 

sinhaa

 

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public