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.)
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…
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.
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.
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.
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.
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.
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
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.
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 ??
Do we have a way to know that UiPath has an actual official bug issue registered for “On Element Appear” ?
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”
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.