Skip to main content
Question

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


Forum|alt.badge.img+5
  • Navigator | Tier 3
  • 15 replies

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

Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • January 13, 2022

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


Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • January 13, 2022

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


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 15 replies
  • January 13, 2022

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


Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • January 13, 2022

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+


jimfrost
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 19 replies
  • February 11, 2022

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


Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • February 11, 2022

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


jimfrost
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 19 replies
  • February 11, 2022

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


jimfrost
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 19 replies
  • February 11, 2022

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


Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • February 11, 2022

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>


jimfrost
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 19 replies
  • February 11, 2022

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?


Micah.Smith
Automation Anywhere Team
Forum|alt.badge.img+13
  • Automation Anywhere Team
  • 428 replies
  • February 11, 2022

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.


jimfrost
Most Valuable Pathfinder
Forum|alt.badge.img+5
  • Most Valuable Pathfinder
  • 19 replies
  • February 14, 2022

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings