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?

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