Ansys Free Student Software

Ansys Free Student Software

Topics cover installation and configuration of our free student products.

JavaScript Runtime Error in AQWA Pre on Windows 11 (Version 24H2)

    • upendar.bobba
      Subscriber

      Hello,

      I'm encountering a JavaScript runtime error when trying to open AQWA through Workbench on a Windows 11 machine (version 24H2). The issue occurs after importing or creating geometry within the Hydrodynamic Diffraction system and then double-clicking on the model in the project schematic to open AQWA Pre. After this, I'm unable to proceed with several tasks in AQWA Pre, including:

             Adding mass
             Meshing
             Viewing the details window
      Interestingly, I’ve tested the same geometry on a different PC running Windows 10, and everything works fine without any issues.

      I’ve already attempted the following troubleshooting steps:

      Renaming the V242 folder to V242.old in the %appdata% folder, but the issue persists.
      Checked for updates to both Windows and AQWA/Workbench, with no resolution.
      Has anyone encountered a similar issue on Windows 11, and can anyone suggest any further troubleshooting steps or potential solutions?

      Thanks in advance for any guidance!

       

       

       

       

       

       

    • 21103072
      Subscriber

      I have the same issue as well have you found a way to fix it?

       

    • upendar.bobba
      Subscriber

      I haven't found a solution to fix it yet. I'll keep looking into it and let you know if I come across anything.

    • Mike Pettit
      Ansys Employee

      Hello,

      We have had a few customers reporting this issue - it seems to be related to the Windows 11 24H2 update, where the default JavaScript library version has been changed. The problems that this has caused are not limited to Ansys products! We are not sure if this was intentional, or if it is a bug in Win11, so it may or may not be resolved by a subsequent Windows update.

      Strictly, Ansys does not support Release 2024 R2 on this newest version of Windows. However, you can fix the problem for yourself (in Aqwa Workbench, at least) by following the instructions below. You will need to edit two files in the Ansys installation, and I strongly recommend that you create copies of these files before you start.

      • Close the Aqwa Workbench editor, if it is still open
      • Navigate to C:\Program Files\ANSYS Inc\v242\aisol\aqwa\AQWAPages\scripts
      • Open context_functions.js with a text editor
      • Search for the string "paramset = ", without quotes; there should be 2 places in this file
      • After each line which starts "var paramset = ..." add a new line and type "if (paramset != null)", without quotes (don't worry about adding spaces at the start of the line, javascript doesn't care about whitespace)
      • Save the file.

      Repeat these steps for ListView.js, in the same folder. There should also be 2 places. Here's the change applied for the second location in ListView.js:

      After you have made these changes, you should be able to open the Aqwa Workbench editor without any problems. Please let me know if this works for you, or if you encounter any other issues.

      Mike

    • pooyakhoshi2000
      Subscriber

      what about v 241

    • pooyakhoshi2000
      Subscriber

      "Please be quick to respond, I'm facing an issue in the middle of an important project and need help urgently."

      • Mike Pettit
        Ansys Employee

        Hello,

        Please follow the same instructions as given above. The only difference is the path to the scripts folder, which for your install will be

        C:\Program Files\ANSYS Inc\v241\aisol\aqwa\AQWAPages\scripts

        Every previous release of Aqwa Workbench will be affected in the same way if the operating system has been updated to Windows 11 24H2 (version 26100). The same changes should also be applied in every previous release.

        Please let me know if you have any further questions.

        Mike

        • pooyakhoshi2000
          Subscriber

          I followed the steps, but the error still persists. My operating system is Windows 11 Pro, and it's updated to the latest version available. However, the issue hasn’t been resolved. Do you have any other solutions?

    • pooyakhoshi2000
      Subscriber

      • Mike Pettit
        Ansys Employee

        Hello,

        Please confirm that you have changed both of the files context_functions.js and ListView.js, and you changed each file in two places.

        Mike

    • dimme32
      Subscriber

      I am using Fluent. I open Design Modeler and import the geometry, after creating the functions of interest, I open the mesh section and encounter this error. Should I follow the same procedure described above? Specifically, I noticed that this error occurs if and only if, in boolean subtract, I click yes on preserve tool bodies. Otherwise, this error is not observed.

      • Mike Pettit
        Ansys Employee

        Hello,

        To start, please can you tell me which version of the Ansys software you are using?

        You are correct that the problem also occurs when we open the Mesh component, which is using the Ansys Mechanical editor. However, you need to modify a different file to those I mentioned in my previous post: the relevant file here is C:\Program Files\ANSYS Inc\v242\aisol\DesignSpace\DSPages\scripts\DSTreeScript.js (change 'v242' to your installed version as necessary).

        The Script Error dialog box tells you which line needs to be modified; follow these instructions if you want to try and fix the problem for yourself. Check that the script error is a 'Type mismatch' - these instructions are not relevant for other kinds of error. Finally, do not try to modify your install if you do not understand these instructions clearly!

        • Close the Mesh editor.
        • Navigate to C:\Program Files\ANSYS Inc\v242\aisol\DesignSpace\DSPages\scripts, and create a back-up copy of DSTreeScript.js before you make any changes to the file.
        • Open DSTreeScript.js with a text editor, and search for the line of code which appears in the 'Script:' section of the Script Error dialog box. For example, if the script error refers to:
        g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

        then I might search for 'RemoveAndFillChildNodes' in DSTreeScript.js.

        • Before this line in DSTreeScript.js, add a new line with the text 'if ([word in brackets] != null)'. For example: if the Script Error refers to
          g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

          Then the line you add in should read (in bold):

          if (parentNode != null)
          g_UIHandler.TreeHandler.RemoveAndFillChildNodes(parentNode)

           

        • Save the file, then re-open the Mesh editor to see if the problem goes away.

        Please reply on this thread if you cannot find the referred line of code in DSTreeScript.js - if you are using an older version of Ansys the problem may occur in other places. Let me know if you run into any other issues.

        Mike

         
    • dimme32
      Subscriber

      I am using Fluent, specifically Ansys 2024 R2 v242.

      • Mike Pettit
        Ansys Employee

        Thanks - in this case, the changes should only need to be made in DSTreeScript.js. If possible, please share a screenshot of the Script Error dialog box just to confirm that we are talking about the same problem.

        Cheers, Mike

    • dimme32
      Subscriber

      This is the error that pops up. I had also already tried entering the commands in the prompt (as suggested in some posts for this type of issue) and renaming the V242 folder to V242_old, as well as doing the same with the Ansys folder. However, none of these steps worked.

      • Mike Pettit
        Ansys Employee

        Hello,

        Thanks for that. In this case I can give you specific instructions to fix the issue:

        • Close Ansys Workbench and all Workbench editors
        • In Windows Explorer, navigate to C:\Program Files\ANSYS Inc\v242\aisol\DesignSpace\DSPages\scripts
        • Make a back-up copy of DSTreeScript.js
        • Open DSTreeScript.js with a text editor
        • Search for the text 'TreeHandler.RemoveAndFillChildNodes'
        • You should have 2 matches, at line numbers 210 and 218. Add a new line before each match, and add the text 'if (parentNode != null)'. The modified lines should look like this:

        • Save the file, then re-open Ansys Workbench and try to re-open the Mesh editor.

        I hope this helps.

        Mike

    • tsige
      Subscriber

      I recently encountered the same issue and eagerly followed the discussions in this thread. I attempted to edit the DSTreeScript.js file but was unable to modify and save it in the designated folder. Could anyone provide guidance on how to resolve this problem?

      • Mike Pettit
        Ansys Employee

        Hello,

        I guess this is because of restrictions placed by your institution's IT department - you may need to contact them to resolve the issue.

        The only other way to work around the script error is to modify the Windows registry so that Windows uses the old jscript.dll (see this page), though I haven't tested that approach myself. Having said that, I think you are very unlikely to be allowed to modify the registry if you cannot modify C:\Program Files.

        Sorry I can't be more help... I hope you get it fixed.

        Mike

    • sungrg777
      Subscriber

      I'm also having same problem not solved yet please reply soon

       

      • Mike Pettit
        Ansys Employee

        Hello,

        Have you already tried to back-up and modify the script file, DSTreeScript.js, in the Ansys installation? If not, please read through the instructions further up in this thread. If you do not have permission to modify the file, you will need to contact your IT department.

        Mike

    • Gary_S
      Ansys Employee

       

       

       

       

      If anyone is experinecing this issue on Windows 11 24H2, please try this suggestion and provide feeback. 

      Search the internet for “JScriptReplacement” or “jscript9legacy.dll” and you will get several hits on the issue which is affecting many commercial software programs. 

      Windows 11 24H2 has begun setting a local policy that, by default, causes applications to use the JScript9Legacy.dll instead ofJScript.dll. 
      This issue can be resolved by changing the default registry key to load the classic jscript.dll instead of the JScript replacement DLL jscript9legacy.dll.
      To load jscript.dll by default:

       

      1. Launch regedit.

      2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main
        (Create the folder Keys for Internet Explorer and Main if they do not exist)

      3. Right-click the Main key and select New | DWORD (32-bit) Value.

      4. Name the new value JScriptReplacement.

      5. Set the value of JScriptReplacement to 0.

      6. Reboot the computer. 

      Users can directly modify the registry key in either HKEY_LOCAL_MACHINE (as shown above) or HKEY_CURRENT_USER.

       

       

       

       

    • matthew.vermeulen
      Subscriber

       

      Not Aqwa, but just Mechanical 2025 R1. Tried the registry change mentioned in HKEY_LOCAL_MACHINE, and the Internet Explorer and Main keys had to be created, but after a restart this made the error go away.

       

    • aklaibi
      Subscriber

      This error appears during choosing the appropriate parameters in the mesh field 

      Mr. Gary can you please set the procedure in a similar manner to the error mentioned above

       

    • Gary_S
      Ansys Employee

      Hi Aklaibi
       The Jscript error for which I address with the above Registry entry only applies to Windows 11 24H2. 
       Your error does not seem to be related to this. Please confirm.
       

    • aklaibi
      Subscriber

      Hi Mr Gary thank you for your response.

      This error (I mentioned before) occurs on the same day that window was updated to 24H2. I opened all the files I made and I found that what was working with no error now gives this message and when the meshing finished, it finished with errors. It never ended successfully.   

    • Gary_S
      Ansys Employee

      My best advice is to try the Windows registry entry as described above. 

Viewing 17 reply threads
  • You must be logged in to reply to this topic.