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.
This topic is 1 year and 4 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
Woody_033
Posts: 111
Last visit: Wed Nov 15, 2023 3:46 pm
Been upvoted: 1 time

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
Face piles of trials with smiles and coffee :D
User avatar
brittneyr
Site Admin
Posts: 1653
Last visit: Tue Mar 26, 2024 1:23 pm
Answers: 38
Been upvoted: 30 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.
User avatar
Woody_033
Posts: 111
Last visit: Wed Nov 15, 2023 3:46 pm
Been upvoted: 1 time

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
Face piles of trials with smiles and coffee :D
User avatar
brittneyr
Site Admin
Posts: 1653
Last visit: Tue Mar 26, 2024 1:23 pm
Answers: 38
Been upvoted: 30 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.
User avatar
Woody_033
Posts: 111
Last visit: Wed Nov 15, 2023 3:46 pm
Been upvoted: 1 time

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 4182 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
Face piles of trials with smiles and coffee :D
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Mon Mar 25, 2024 11:57 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: 1653
Last visit: Tue Mar 26, 2024 1:23 pm
Answers: 38
Been upvoted: 30 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.
This topic is 1 year and 4 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.