Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

OOB Widget causing an warring

Snowdevloper
Tera Expert

HI,

I have a requirement there that I have to Clear the warring s in the Logs table that was caused by one of the OOB Widget sp_widget.3c29786e87133200e0ef0cf888cb0bdf(SC Catalog Item).
Can anyone please assist me with how to clear the warnings and, Where should I check to understand if the widget is in the portal?

Widget link from my PDI:
https://dev187513.service-now.com/sp_widget.do?sys_id=3c29786e87133200e0ef0cf888cb0bdf&sysparm_recor...


Warnings 1:
org.mozilla.javascript.EcmaError: Cannot read property "variables" from null
Caused by error in  sp_widget.3c29786e87133200e0ef0cf888cb0bdf.script at line 459

Warnings 2:
org.mozilla.javascript.EcmaError: Cannot read property "variables" from null
Caused by error in  sp_widget.3c29786e87133200e0ef0cf888cb0bdf.script at line 458
Warnings 3:
org.mozilla.javascript.EcmaError: Cannot read property "variables" from null
Caused by error in  sp_widget.3c29786e87133200e0ef0cf888cb0bdf.script at line 232

3 REPLIES 3

Mayur2109
Kilo Sage

Hi @Snowdevloper ,

 

Check if there are any changes made on OOTB widget SC Catalog Item. For checking follow steps & refer screenshots attached

Search Service Portal > Widgets > SC Catalog Item > Right click & open in widget editor > check the lines mentioned in warning message > see if there is anything declared as variables in server script which is returning null.

 

Please check and Mark Helpful and Correct if it really helps you.

Regards,
Mayur Shardul

  • HI @Mayur2109 ,
    As you suggested I have opened the widget and seen the lines of scripts for you Ref I am just sharing them with you here below can you please have a look and assist me in fixing the warnings.

    Script:
    from line 458 to 464
    var mespOpenPopupUnregister = $rootScope.$on("mesp.popup.open", function() {
    // Timeout is to give a better user experience otherwise when this popup opens,
    // the cabrillo buttons will be displayed immediately giving a bad user experience.
    $timeout(function(){
    removeCabrilloButtons();
    });
    });

Hi @Snowdevloper ,

 

Check in server script as it seems issue in server script.

 

Regards,

Mayur