Users are unable to invoke the required script includes from pre-sensor pattern script "Handle Model and Manufacturer for HMC", resulting in CIs not being created (PRB1385164/KB0818846: Discovery of HMC servers fail with error: Running pre sensor script- Handle Model and Manufacturer for HMC failed due to: TypeError: Cannot convert null to an object)

This issue is due to the different scopes of pre-sensor script and script includes that are being invoked from the pre-sensor pattern. The pre-sensor script 'Handle Model and Manufacturer for HMC' is in the Discovery and Service Mapping Patterns scope. The Script Includes 'CI' and 'MakeAndModelJS' which are being invoked from the pre-sensor script are in global scope.

Steps to Reproduce

Run quick Discovery for HMC server.


This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

If a workaround is needed, change the scope of the required Script Includes to 'All application scopes'.

Related Problem: PRB1391015

Seen In

There is no data to report.

Intended Fix Version

New York Patch 10 (NP10)

Fixed In

Orlando Patch 5

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-07-21 00:33:22