000039175 - Tenable Data Feed failed due to an uncaught exception in the script in RSA Archer

Document created by RSA Customer Support Employee on Jul 30, 2020
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000039175
Applies ToRSA Product Set: RSA Archer
RSA Version/Condition: 6.4,6.5,6.6,6.7,6.8
IssueWhen trying to use Tenable.sc Integration Package from 6.4 SP1, the following error is thrown in the Data Feed execution:

The script execution failed due to an uncaught exception in the script
User-added image

In addition, when investigating logs to find out the issue you see an error:

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <SubType Name="Critical">0</SubType>
        <Source Name="Archer.NET" />
        <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
        <Execution ProcessName="ArcherTech.JobFramework.Job" ProcessID="5492" ThreadID="8" />
                <TraceRecord Severity="Critical" xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord">
                    <Description>SCRIPTUNCAUGHTEXCEPTION: Unexpected token u in JSON at position 0</Description>
                        <ExceptionType>System.Exception, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
                        <Message>SCRIPTUNCAUGHTEXCEPTION: Unexpected token u in JSON at position 0</Message>
                        <StackTrace>   at ArcherTech.ScriptRuntime.ScriptExecutor.EdgeJSScriptExecutor.ExecuteAsync()
   at ArcherTech.ScriptRuntime.ScriptRuntime.ExecuteInternal()
   at ArcherTech.ScriptRuntime.ScriptRuntime.ExecuteScript()</StackTrace>
CauseThe cause of the issue is that the Javascript Transport file failed to run due to one of a few potential issues.
ResolutionTo figure out what is going on we will need to do the following and test from both your local machine and the server running your job engine.
  1. Download and install node.js: https://nodejs.org/en/download/
  2. Download and install Visual Studio Code: https://code.visualstudio.com/Download
  3. Confirm from command prompt (there is 2 dashes): node --help
  4. Install required packages from Visual Studio Code terminal tab/window.
  5. npm install request
  6. npm install xpath
  7. npm install xmldom
  8. npm install xml2js
  9. Load custom javascript file
  10. Modify the variable values in the javascript file around lines 42-47.
  11. Run. You can set breakpoints as well if wanted.
Running the JS script using Visual Studio Code and Node.JS will allow for expanded debugging of the .JS script. Based on your findings when running the script in Visual Studio Code you will have everything that is required to resolve issue with the script. This normally manifests as either a connection or licensing-related issue in your Debugger log within Visual Studio Code.