Discovery error message 'Script error in sensor: ReferenceError: "related_data" is not defined.'Issue <!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --> Symptoms Discovery is showing an error: error - 'Script error in sensor: ReferenceError: "related_data" is not defined.' Steps to Reproduce: Run Discovery on a Windows Desktop Machine.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.