Cancelling Get-Credential Throws NullReferenceException

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
itopsphi@favors.com
Posts: 2
Last visit: Thu Apr 15, 2021 12:12 pm

Cancelling Get-Credential Throws NullReferenceException

Post by itopsphi@favors.com »

Product, version and build: Powershell Studio 2017 5.3.149
32 or 64 bit version of product: 64 Bit
Operating system: Windows 10
32 or 64 bit OS: 64 Bit
PowerShell Version: V5 64 bit

Cancelling a Get-Credential prompt throws the below error when run via Powershell Studio but not when run via the console.

Error:
>> Running (Test.ps1) Script...
>> Platform: V5 64Bit (STA)
ERROR: Object reference not set to an instance of an object.
Test.ps1 (14, 1): ERROR: At Line: 14 char: 1
ERROR: + Get-Credential
ERROR: + ~~~~~~~~~~~~~~
ERROR:     + CategoryInfo          : OperationStopped: (:) [], NullReferenceException
ERROR:     + FullyQualifiedErrorId : System.NullReferenceException
ERROR:

>> Execution time: 00:00:02
>> Script Ended
Steps to reproduce:
  1. Create blank PS1 file.
  2. Insert Get-Credential
  3. Run PS1 file.
  4. Cancel Get-Credential prompt.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Cancelling Get-Credential Throws NullReferenceException

Post by davidc »

FYI, this issue was resolved in 5.4.140 service release.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.