UiPath - Value does not fall within the expected range

activities
p_qa

#1

Hello folks.

I am having some issues with a process I have build UiPath and run through the Orcherstrator. Basically, I had a process that had a very low error rate (Application Error) but last Monday the process started throwing the same exception, “Value does not fall within the expected range”. I could normally use this information to debug the process and solve the issue but in this case it threw the error on an “Element Exists” activity, which returns a boolean value. This is the full error:

InnerException: System.ArgumentException: Value does not fall within the expected range.
   at UiPath.UiBrowserClass.get_node()
   at UiPath.Core.Browser.get_Element()
   at UiPath.Core.Activities.Target.<>c__DisplayClass2.<GetBaseElement>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Naturally I did what any VB.NET/UiPath developer would do and try/catch the activity in question. This fixed the issue, but the only issue now is that I am getting the same error one day later (After a whole day of the error not showing up on the new build) on the next activity in the the sequence on my UiPath.Core.Activities.Click which simulates a double left click on the selector:

<webctrl id='DataTable_tblProduct' tag='TABLE' />
<webctrl isleaf='1' tableCol='3' tag='TD' />

I am starting to lose hair over this issue, please do tell if any of you have any clue how this happens or if it has happened to you.


#2

I have not touched the code in production since and the error has stopped appearing since last monday. What on earth causes this?


#3

Two ideas:

  • target application not responding, network issues or more than 30 secs for the button to load
  • are you performing the click via Simulate Type or plain Hardware Events? maybe you were moving the mouse or interfered with the process.

#4

It happened consistantly in the same place every time in the code.

Even if there were issues clicking anything or the UI/Desktop being unresponsive it shouldn’t give that exception and definately not fail on an “element exists” activity.


#5

i was trying to extract data using data scraping and am also getting the same error… how can i fix this issue
…??


#6

Hey guys, did anyone have a resolution for this? I am getting the same error when attaching to an IE browser. I was working fine last week, but now it throws this error every time I try to attach, even when I indicate the screen as the target and then run the attach straight away. Selector seems fine too…


#7

Please check this topic:


#8

I am also getting the same error “Value does not fall within the expected range” with Get Text activity. Any idea on what triggered with this error would be appreciated.


#9

Hi @whyyouandi

We need more details. What element are you indicating? Maybe you should take a look into the selector(using UiExplorer) to make it more reliable.

Also, check on the possible explanations provided by Badita:


#10

Hi @ovi, thank you for your response.

I am trying to get a text value from a PDF file with an Anchor Element, inside it I used Find Element and Get Text.

  1. Checked the Selectors: I am not really sure whether the selector is working or not, but if the selector is not working I supposed the Exception would be some kind like Selector Not Found, not “Value does not fall within the expected range”.

  2. Target application is responding I think, and below 30s. And then again, if the application is not responding I expected to see another kind of error (perhaps like Selector Not Found was better)

  3. I don’t really get this input method, but there is no Simulate Type options for Find Element or Get Text.

(XAML and sample PDF used in this XAML is attached).EXC3 Read PDF.xaml (7.1 KB)
EXC3ReadPDF.pdf (430.8 KB)


#11

I have the same issue with a “Get attribute” from a list in a browserbased Application (specific IE).
The robot finds a list of datablocks with attachments, if there are attachments these shall be downloaded. But on checking the “aaname” of the uielement, sometimes (1 in 10 and not always the same element) this exception is thrown.

I hope somebody have an idea of how to fix this.

Best regards Mikkel


#13

I was getting this error right after my open browser activity where I was using Element exist.
So I just added a 1 second delay inside open browser and before element exist. And now process seems to be running smoothly.
Now I am using 4 workflows in parallel activity and all set to isolated mode and it is working fine for me.

Not sure if this gonna work in every scenario but for my case after looking for multiple ways and raising tickets with Ui path support , when nothing worked, adding this delay seems to be a workaround for now.


#14

Sounds like a stupid idea, but it work fine. :neutral_face:
Delay fix crash after opening the browser and after navigating to a new page.
Thank!


#15

if idea is working fine then why would you call that stupid.
Sorry but I would not appreciate this.


#16

I’t stupid, because the activity “element exists” must not be crushed, it is created in order to return the true or false.
And after the tests it turned out that it does not always work (we can not know how much to expect).


#17

for that I agree there is a bug in Uipath for sure that element exists doesn’t work properly all the time.
For this problem it took me almost 15 days and even Uipath support could not find the solution so this is just the small workaround.


#18

Having same issue now. Just replying to report this problem to UiPath.