Chrome functions error handling

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
MarcinW
Junior Coder
Posts: 23
Joined: Thu Jul 23, 2020 11:24 pm

Chrome functions error handling

Post by MarcinW » Wed Dec 02, 2020 6:46 pm

Hi, I've recently noticed an issue with Chrome bots, they work completely fine on my pc, they work 90% of the time on the AWS Windows Server 2019 VM that they're supposed to run on.

The problem there is that sometimes bots get stuck on Chrome functions such as 'ChromeFindELements' or 'ChromeNavigate'. I've added logging to these bots so the last status message is written to a file right before either one of these functions is called. Session ID and url of the website are both correct going into it. In case of 'ChromeNavigate' bot even successfully navigates to the website. The problem is that even after it navigates it never exits this function.

I tried testing Chrome functions by breaking them on purpose (passing non existing session ID) and I found one thing, if the function outputs an error "HTTP/1.1 404 Not Found", then even after clicking "OK" button, the bot never terminates, nor does it continue to the next line of code.

In the case of them getting stuck on the AWS VM, there's no error message displayed but probably the issue is related to an error happening within Chrome function that is not handled and thus next line of code is never ran.

Since it only happens on the AWS VM I'm thinking this might be caused by either CPU being too slow, or some security or firewall setting blocking some part of the function. Would rather bet on the CPU not being able to handle it since it only happens from time to time. Any ideas? Maybe I should add waiting times between Chrome functions, possibly next one is ran before previous one is complete?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Chrome functions error handling

Post by Marcus Tettmar » Wed Dec 09, 2020 9:14 pm

Really hard to say what is causing this. Could be resources as you say. Is the session left running uninterrupted, or is it getting minimised/locked?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts