Notifications

80 views

Description

Symptoms

Discovery is showing an error: 
error - 'Script error in sensor: ReferenceError: "related_data" is not defined.'

Steps to Reproduce:

  1. Run Discovery on a Windows Desktop Machine.
  2. The Windows- Installed Software probe throws the error

Release

London

 Cause

There have been several code changes over the years.

  • The "Windows - Installed Software" sensor now calls this.prepareJSON(result) to extract the discovered payload and set variables which include a variable named "related_data".
  • The prepareJSON() function is implemented in parent Script Include "DiscoverySensor"
  • You might have customized DiscoverySensor script includes which prevented from getting upgraded. The older DiscoverySensor script include does not have the prepareJSON() function so no variable named "related_data" is initialized, leading to the error. 

Resolution

Revert the DiscoveySensor script include out of box version.

Additional Information

There is a known issue for the same error message documented in PRB1304085. However, this error is related to this PRB only if there is no related_data returned in the payload. See KB0714346 - Sensor error when processing Windows - Installed Software. ReferenceError: "related_data" is not defined for more information.

Article Information

Last Updated:2019-08-02 20:36:59
Published:2019-07-22