Project runs in 2023.4.4 - fails in 2023.6.1

I have an attended script that has been working in production on 2023.4.4 (enterprise) until I updated my development workstation to 2023.6.1 to see what is “coming down the pipeline”.

The code immediately returns:

System.Exception: Object reference not set to an instance of an object
at System.Activities.Presentation.Validation.ValidationService.MarkParents(ValidationError validationError, IEnumerable1 errorParents, ModelItem source) at System.Activities.Presentation.Validation.ValidationService.MarkError(ValidationError validationError, List1 errorSourcePath, ModelItem source)
at System.Activities.Presentation.Validation.ValidationService.MarkErrors(ICollection1 errors, ValidationReason reason, Activity rootActivity) at System.Activities.Presentation.Validation.ValidationService.OnValidationWorkCompleted(Tuple3 input)
at System.Activities.Presentation.Validation.BackgroundValidationSynchronizer`1.<>c__DisplayClass26_0.b__0()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2147467261

I re-checked it in another machine back on 2023.4.4 and it is still fine.
I don’t recognize anything in the error to give me enough of a clue to where to start looking.
I attached the project (with some internal URL’s redacted - otherwise it’s intact.)

Main -REDACTED.xaml (119.3 KB)

Hi @Mike_Campbell

Can it be that the System activity package remained as 23.4? Does upgrading to System 23.6 help?

Thanks for looking. I had tried removing and re-adding all dependencies.
In manage packages I just went through and tried again and all are showing they are fully up to date…

Could you enable the preview packages via the filter menu of the package manager? There should be System 23.6 available for you to try).

Ok, I enabled preview packages and found 23.6.0
I did System - same error.
Also tried same for UIAutomation activities.
Still same error.

Still no luck.
Just to check, I have now also updated all packages to newest available.

Also, the project does not actually use mail activities or testing activities, so I removed those in case that was the issue. new package screenshot attached.


Main -REDACTED.xaml (119.3 KB)

@Mike_Campbell

May be the package is corrupted

You can go to the following location and delete the package files and reopen the project it wouls download the dependencies fresh again

C:\Users\<Username>\.nuget\Packages

Cheers

Sorry it took me until this am to try this - and I was super hopeful this would be the issue - but it was not. Once the package finished downloading, it produced the same error.

I will tuck this “.nugget” location/tip away for any future unexplained behavior, seems like a good refreshing protocol.

Now I’m really at a loss.

I’ve now also removed/reinstalled Studio and put back 2023.4.4 again and it STILL works fine there.

@Mike_Campbell

One thing you can do is analyze the project

and then check all the folders from project window…even the tests folder etc…they might have some issues sometimes

chees

Thanks Anil,
When I do that, initially it throws the same error, when I click ok, the window for “Checking project for validation errors” just stays there with full progress bar at 99.9% and only cancel button. I’ve left that go for up to 5 minutes - it does not appear to finish or reveal any new clues.

@Mike_Campbell

In the project panel do you see a red circle or re mark on any xaml or file or fiolder?

cheers

Thanks Anil,
Main.xaml (119.4 KB)
nothing is flagged/marked.

project

I removed mail activities to simplify - it’s not used.

PS: yes, I really named my robot/process “ralphie” - long story haha.

@Mike_Campbell

Can you probably send the whole project …instead of only main…

Cheers

Thanks Anil,
The project only consists of Main. - It is a simple linear workflow:
Ask user to select environment, (Staging, test, Prod) select a spreadsheet, open a web portal to our app, search for a record in the spreadsheet row, add a note from the spreadsheet row.
(Write lots of log entries along the way)
That’s it.

In 2023.4.4 if you place main.xaml in an empty folder of your choice and open it with Studio, it will build out the rest of the folders and run – perfectly.

In 2023.6.1 it fails 100%.

One suggestion to debug this would be to have a copy of the project, and then start deleting activities one by one from the end of the workflow, and trying to run it each time.

There is a big chance that there is a single activity that is causing this.

Maciej,
Maybe some progress: I sort of started trying this, but in reverse:

I made a new empty Windows/vb project and started copying blocks of the old code into the new container from the outside and top, building in and down, and running it periodically as I went.

Other than declaring variables as I come across them so they exist again, with correct scope and type, all was well UNTIL my main data processing block. “Block User and Process Data” which is all nested in Try/Catch/Exception.

This may have to do with the origin of the script being from a couple years old, originally in “windows legacy” - in 23.4.4 it was updated to the new “Windows vb” and was perfectly happy.

I see in the legacy upgrade article there is a reference to incompatibility of “Exception” in legacy vs “ex”
https://docs.uipath.com/studio/standalone/2023.10/user-guide/deprecation-of-the-windows-legacy-compatibility

Not sure I understand how/where this might apply to be changed in my code though if it does turn out to be the issue.

@Mike_Campbell

There has been a serious good progress…did you happen to check further to see any property differences between the block user input activity in the new one and the old

Cheers

Continuing to rebuild the block that complains, subsection by subsection.
I created the outer try/catch/exception and that does not appear to be the issue as suspected.

I moved through the other blocks and the first sub-block that complains is an On Element Appear:

UiPath.Core.Activities.OnUiElementAppear

Even when I try to MANUALLY add one of those activities now it is not found…
Has that function been replaced or deprecated? (Inward panic and holding breath for response)

I use these EVERYWHERE for reliability of clickability - before I began using these the script would not reliably wait for the element to appear before clicking.

@Mike_Campbell

There has been some small bug going on on on elmenet appear reported

We can instead use check app state activity which works exactly as on element appear activity

Cheers

1 Like

Anil,
THANK YOU - I would love to mark this post as “Solution” however it turns out this is more like “Validation of the issue” …

I see it is “reported” in the thread referenced, and this is absolutely the problem- but the thread appears cold and untouched for 27 days and no comments from a UiPath staffer -

The thread also mentions - a bit flippantly - “you should be working in Modern” - which disregards existing scripts and many HUNDREDS of element locators in use. I am petrified to think of other scripts I have not even looked at yet - that appear to all be headed for breakage ??

  1. Do we have a way to know that UiPath has an actual official bug issue registered for “On Element Appear” ?

  2. If Element Appear is identical in function, is that still in classic experience, and would I expect it might also break soon as it’s not “Modern”

  3. I understand the nudge to move to Modern, and by the demos I’ve seen, I’m all on board to get there too, but what can I do with all of my legacy scripts? I don’t see a recommended path to refactor to “Modern” once a script is already well established with legacy locators and functions.

This feels like a strong-armed approach to move everyone to Modern- even though classic and “On Element Appear” is not advertised as End of Life.