Discovery is showing an error:
error - 'Script error in sensor: ReferenceError: "related_data" is not defined.'
- Run Discovery on a Windows Desktop Machine.
- The Windows- Installed Software probe throws the error
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.
Revert the DiscoveySensor script include out of box version.
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.