Question

****BUG**** Math multiplication has some serious issues!


image (5)In the following situation, the number variable when set to 2.28 is indeed 2.28 but when multiplying by 100 (specifically 2.28*100), the result is 227.999999999997. Then when converting to a string, the result is 227. This caused a serious issue with a production bot today.


12 replies

Userlevel 3
Badge +7

What version of the package/CR was this @Wilson Wylie​ ?

Userlevel 3
Badge +7

I just tried it and it seemed to work ok - for reference, my CR is on .22 and my package version is 3.1.1-20210821-042642

Screenshot 2022-01-13 171402

Package version 2.3.0-20210118-185335, CR v.19

Userlevel 3
Badge +7

Download and import this bot: https://automationanywhere1-my.sharepoint.com/:u:/g/personal/micah_smith_automationanywhere_com/Ec7f5YLLwo1Dle0gZjQgsokBXKa548GWNVfKK9tO58CipA?e=YIdhbe

 

it includes the version of the package I'm using, and should work fine on anything .18+

Badge +4

Sorry for the long delay in responding Team AAI. Here are our findings on this package, please see attached document for screenshots of all tests. It appears that it may be more related to the version of A360 and not the number package? All instances are On-Prem. We exported a bot built on V23 Cloud ad imported to various other environments, to do the "built on V23" test scenarios.

 

2.01_x_100_tests

Userlevel 3
Badge +7

I believe the issues your seeing with failure to run depend on your bot agent version (and control room). I believe with .21? Packages started having bot agent compatibility included in them - where certain bot agent versions were required to run certain packages. This is a screenshot from a .23 CR, I don't remember all the specific version numbers off the top of my head, but I'm guessing the .19 Bot Agent is older than 20.18? I could be wrong, but that's the first thing I would check here. I'd only tested this issue above on .23 as that's the only CR's I have access to.image

Badge +4

Can we download the latest Bot Agent and manually update it on an older install of A360?

Badge +4

Checking this out, thank you @MICAH SMITH​ !!

Userlevel 3
Badge +7

Only if its one of the listed/supported versions for your CR. In my experience, I haven't been able to use a newer bot agent on an older CR (mainly that testing has come when CE and my own CR are not in sync).

 

Ref for compatible versions: https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/deployment-planning/on-prem-install/cloud-bot-agent-compatibility.html/p>

Badge +4

OK, that makes sense for the failed runs. What do you think the issue is with the failure to round correctly?

 

In my post above with the testing scenarios, bots built using V19 and V22 incorrectly multiplied 2,01 * 100. V19 produced a value of 200, V22 produced 200.9999.....

 

Only when we created the bot in a V23 instance (with latest Bot Agent of course) did it produce a value of 201, regardless of the number package version. This leads me to assume it is either core A360 or Bot Agent related?

 

This problem is NOT consistent across all multiplication actions, it seems random but can be replicated at-will with 2.01*100.

 

Is there any possibility of patching older versions/bot agents to fix this, or is an upgrade the recommended action?

Userlevel 3
Badge +7

An upgrade would be the recommended action. That is the "patching of older versions". You're enough behind that moving up to something like .23 will gain you a lot, and its been pretty battle tested in that major issues are reported on it, so it shouldn't be bad from a deployment perspective.

 

Given I cant really replicate/test this, my only other suggestion would be to try the math package from bot store, or do the calculation in JavaScript/Python...though I'm less excited about those last two suggestions.

Badge +4

Thanks @MICAH SMITH​ we will try to schedule upgrades for the affected client's ASAP. We will have to do a JS/Python work-around temporarily to keep things progressing.

Reply