First check the action that corresponds to the error id, if everything is ok with it then check the if conditions that are above this action and most likely there is a syntax error there. There is an old bug in bas when the id indicates an incorrect error number
Thanks Morpheus.
I will add the "wait for page load" on the most critical failures and see how it behaves.
Will also migrate the script to a better VM.