Skip to main content
Solved

JS Function not Opening


Forum|alt.badge.img+2

Trying to run JS function in my AA360. 

function simpleTest() {
    return "Hello, this is a test!";
}

This is simple function, still not running. Error is 

There was an error while opening the JavaScript 'Test'.There was an error while opening the manually input JavaScript. Also tried by opening the function with .js function. 

Best answer by Aaron.Gleason

Yikes. Time to clean up your system.

  1. Uninstall the Bot Agent.
  2. Clear out these folders:
    c:\windows\system32\config\systemprofile\appdata\local\automationanywhere\
    C:\ProgramData\AutomationAnywhere
  3. Reinstall your Bot Agent and try again.

Note that the folders above may be hidden and/or need admin privileges to clean out.

View original
Did this topic help answer your question?

9 replies

Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 539 replies
  • October 2, 2024

I can’t replicate your error, even with your exact JavaScript.

It works fine here. What error are you getting? Can you screenshot your code?


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 5 replies
  • October 2, 2024

Attaching the error screenshot. Please check.


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 539 replies
  • October 2, 2024

I just re-entered this fresh into my CE version and still cannot replicate your error.

It appears you copied and pasted in your JavaScript. Maybe there is a hidden character somewhere because your indention looks different than mine. The editor corrects the indentation, so that is a little suspect.

Maybe try typing in the JavaScript code? Not sure at this point.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 5 replies
  • October 2, 2024

Now, I’m not even able to run Message Box in my CE. It is giving and error message that says, Could not initialize class sun.font.SunFontManager. Attaching my error screenshot. Please help. 

 

 


Aaron.Gleason
Automation Anywhere Team
Forum|alt.badge.img+10
  • Automation Anywhere Team
  • 539 replies
  • Answer
  • October 2, 2024

Yikes. Time to clean up your system.

  1. Uninstall the Bot Agent.
  2. Clear out these folders:
    c:\windows\system32\config\systemprofile\appdata\local\automationanywhere\
    C:\ProgramData\AutomationAnywhere
  3. Reinstall your Bot Agent and try again.

Note that the folders above may be hidden and/or need admin privileges to clean out.


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+9
  • Pathfinder Community Team
  • 95 replies
  • December 3, 2024

@Om Keskar were you able to solve this issue using the fix that ​Aaron recommended?

Aaron.Gleason wrote:

Yikes. Time to clean up your system.

  1. Uninstall the Bot Agent.
  2. Clear out these folders:
    c:\windows\system32\config\systemprofile\appdata\local\automationanywhere\
    C:\ProgramData\AutomationAnywhere
  3. Reinstall your Bot Agent and try again.

Note that the folders above may be hidden and/or need admin privileges to clean out.

 


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 5 replies
  • December 3, 2024
ShreyaKumar wrote:

@Om Keskar were you able to solve this issue using the fix that ​Aaron recommended?

Aaron.Gleason wrote:

Yikes. Time to clean up your system.

  1. Uninstall the Bot Agent.
  2. Clear out these folders:
    c:\windows\system32\config\systemprofile\appdata\local\automationanywhere\
    C:\ProgramData\AutomationAnywhere
  3. Reinstall your Bot Agent and try again.

Note that the folders above may be hidden and/or need admin privileges to clean out.

 

Yes ​@ShreyaKumar.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 5 replies
  • December 3, 2024
Aaron.Gleason wrote:

Yikes. Time to clean up your system.

  1. Uninstall the Bot Agent.
  2. Clear out these folders:
    c:\windows\system32\config\systemprofile\appdata\local\automationanywhere\
    C:\ProgramData\AutomationAnywhere
  3. Reinstall your Bot Agent and try again.

Note that the folders above may be hidden and/or need admin privileges to clean out.

Thanks ​@Aaron.Gleason 


Shreya.Kumar
Pathfinder Community Team
Forum|alt.badge.img+9
  • Pathfinder Community Team
  • 95 replies
  • December 3, 2024
Om Keskar wrote:

Yes ​@ShreyaKumar.

Awesome! 🙌


Reply


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