Clicking on the error message opens the .run.ps1 and not where the error is

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.
Woody_033
Posts: 19
Last visit: Mon Oct 31, 2022 6:13 pm

Clicking on the error message opens the .run.ps1 and not where the error is

Post by Woody_033 »

Product: PowerShell Studio 2022 (64 Bit) Build: v5.8.211
OS: Windows 10 Pro (64 Bit) Build: v10.0.19044.0
I cannot find where the error is because its pointing to the wrong file when you click on the line number :lol:

Code: Select all

ERROR: You cannot call a method on a null-valued expression.
Search and Discovery.Run.ps1 (21145, 39): ERROR: At Line: 21145 char: 39
ERROR: + ...  $labelArtistsArtistNametos.Text = "$($Artists.ArtistName.tosring())"
ERROR: +                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR:     + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
ERROR:     + FullyQualifiedErrorId : InvokeMethodOnNull
ERROR:
    ...\Documents\PS Projects\Search and Discovery\Search and Discovery.Run.ps1: File submitted
*** Operation completed *** 1 file(s) submitted, 0 file(s) locked
User avatar
brittneyr
Site Admin
Posts: 1264
Last visit: Mon Dec 05, 2022 8:59 am
Answers: 25
Been upvoted: 20 times

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by brittneyr »

Technically, it's not pointing to the wrong file. If you are using a psf or project, your files are automatically exported to a ps1 on run.
For more information about this, the following may be helpful:
https://www.sapien.com/blog/2022/03/15/ ... roduction/
https://www.sapien.com/blog/2022/01/04/ ... ll-studio/

There is normally a conversion process to coordinate between the running file and your psf/project files, but this appears to be failing.
I have been able to reproduce this behavior only with PowerShell 7. Windows PowerShell (V5) does not appear to have any issues.
Can you confirm if you are using V7 or not? If so, what version are you using?
Brittney
SAPIEN Technologies, Inc.
Woody_033
Posts: 19
Last visit: Mon Oct 31, 2022 6:13 pm

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by Woody_033 »

I don't normally do forms so this is a little different for me...

Code: Select all

Name                           Value
----                           -----
PSVersion                      5.1.19041.1682
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1682
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
I will also get negative lines numbers or line Ø some time, but not this time
I have 7 installed, but I don't use it
User avatar
brittneyr
Site Admin
Posts: 1264
Last visit: Mon Dec 05, 2022 8:59 am
Answers: 25
Been upvoted: 20 times

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by brittneyr »

Can you please run your project/psf in console (Ctrl+F8) and provide a screenshot the error here?
Brittney
SAPIEN Technologies, Inc.
Woody_033
Posts: 19
Last visit: Mon Oct 31, 2022 6:13 pm

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by Woody_033 »

brittneyr wrote: Fri Oct 07, 2022 12:06 pm Can you please run your project/psf in console (Ctrl+F8) and provide a screenshot the error here?
Console error
Console error
Untitled.png (11.28 KiB) Viewed 3110 times
I had to recreate it from the zipped .run.ps1 but the error looks the same...
Let me know if you need me to re-create the exact same error with the bad code I had in
User avatar
Olga_B
Site Admin
Posts: 173
Last visit: Mon Dec 05, 2022 10:42 am

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by Olga_B »

We have been able to reproduce this crash bug and have filed a bug report with the development team. It will be fixed in the next service release.
User avatar
brittneyr
Site Admin
Posts: 1264
Last visit: Mon Dec 05, 2022 8:59 am
Answers: 25
Been upvoted: 20 times

Re: Clicking on the error message opens the .run.ps1 and not where the error is

Post by brittneyr »

Please try service build 5.8.212 and let me know if this is resolved for you.

If you are still experiencing issues, can you please submit a script generating the bug here:
https://www.sapien.com/support/upload
Brittney
SAPIEN Technologies, Inc.