Service Portal stuck on Submit

Vaughan Irwin1
Giga Contributor

I've found a problem with Record producers in the Service Portal:

When clicking on Submit, it hangs on the Submitting (before the message appears at the top) and doesn't go any further.

Happens on any Record Producer

Works ok on Catalog Items

Works fine with Admin role account, any other account it doesn't work on

Has anyone come across this before?

1 ACCEPTED SOLUTION

Vaughan Irwin1
Giga Contributor

Logged a job with HI and they fixed it.



Found out it was to do with a ACL rule which carried over from Express migration.



Have to disable the rule sc_cat_item_producer (read) and it worked!


View solution in original post

8 REPLIES 8

dravvyramlochun
ServiceNow Employee
ServiceNow Employee

Can you check the logs and share them with us?


Try a cache.do also


Sure, I did a cache.do but still no job.



Here is the error log related to when I click submit (2 errors).



First one:


JavaScript evaluation error on:


(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {



var recordProducerId = request.pathParams.sys_id;


var request_body = request.body.nextEntry();


var catalogUtil = new RestCatalogUtil();


var isMobile = false;



if (request.queryParams.sysparm_view) {


var viewType = '' + request.queryParams.sysparm_view;


viewType = viewType.toLowerCase();


if(viewType == 'mobile')


isMobile = true;


}



if(!catalogUtil.isValidItem(recordProducerId, 'sc_cat_item_producer'))


throw new sn_ws_err.NotFoundError('Record Producer does not exists');



var catalogItem = new sn_sc.CatItem(recordProducerId);



if(!catalogItem.canView(isMobile))


throw new sn_ws_err.BadRequestError("Security Constraints prevent access to the Item");



var variables = request_body.variables || {};


//Mandatory Variables Check


if(!catalogUtil.checkMandatoryVariables(recordProducerId, variables))


throw new sn_ws_err.BadRequestError('Mandatory variables are not filled');



request_body.sysparm_id = recordProducerId;


request_body.sysparm_action = 'execute_producer';


request_body.sysparm_item_guid = gs.generateGUID('');



return catalogItem.submitProducer(request_body);



})(request, response);


: org.mozilla.javascript.JavaScriptException: [object NotFoundError] (sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script; line 17): org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355._c_process_1(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script:17)


org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355.call(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script)


org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2648)


org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590)


org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)


org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355._c_script_0(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script:1)


org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355.call(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script)


org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:563)


org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3421)


org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355.call(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script)


org.mozilla.javascript.gen.sys_ws_operation_4b9f0a8967101200d22b794717415a30_operation_script_1355.exec(sys_ws_operation.4b9f0a8967101200d22b794717415a30.operation_script)


com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:263)


com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:110)


com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:76)


com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:343)


com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:263)


com.glide.script.fencing.GlideScopedEvaluator.evaluateScript(GlideScopedEvaluator.java:250)


com.glide.rest.service.custom.CustomService.runScript(CustomService.java:95)


com.glide.rest.service.custom.CustomService.execute(CustomService.java:82)


com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:36)


com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:228)


com.glide.processors.AProcessor.runProcessor(AProcessor.java:474)


com.glide.processors.AProcessor.processTransaction(AProcessor.java:199)


com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:178)


com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:167)


com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:31)


com.glide.sys.Transaction.run(Transaction.java:2037)


java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)


java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)


java.lang.Thread.run(Thread.java:748)





Second One:


Root cause of JavaScriptException: com.glide.rest.service.custom.errors.ScriptableNotFoundError


JavaScript evaluation error on:


(function process(/*RESTAPIRequest*/ request, /*RESTAPIResponse*/ response) {



var recordProducerId = request.pathParams.sys_id;


var request_body = request.body.nextEntry();


var catalogUtil = new RestCatalogUtil();


var isMobile = false;



if (request.queryParams.sysparm_view) {


var viewType = '' + request.queryParams.sysparm_view;


viewType = viewType.toLowerCase();


if(viewType == 'mobile')


isMobile = true;


}



if(!catalogUtil.isValidItem(recordProducerId, 'sc_cat_item_producer'))


throw new sn_ws_err.NotFoundError('Record Producer does not exists');



var catalogItem = new sn_sc.CatItem(recordProducerId);



if(!catalogItem.canView(isMobile))


throw new sn_ws_err.BadRequestError("Security Constraints prevent access to the Item");



var variables = request_body.variables || {};


//Mandatory Variables Check


if(!catalogUtil.checkMandatoryVariables(recordProducerId, variables))


throw new sn_ws_err.BadRequestError('Mandatory variables are not filled');



request_body.sysparm_id = recordProducerId;


request_body.sysparm_action = 'execute_producer';


request_body.sysparm_item_guid = gs.generateGUID('');



return catalogItem.submitProducer(request_body);



})(request, response);


: no thrown error


Vaughan Irwin1
Giga Contributor

Logged a job with HI and they fixed it.



Found out it was to do with a ACL rule which carried over from Express migration.



Have to disable the rule sc_cat_item_producer (read) and it worked!


Hello, I have a similar problem, but the fact is that with any Role, when a variable is set as "Mandatory", when clicking on "Submit" it hangs on the in message "Sending ..." and does not go any further.


Works ok on Catalog Items but does not happen on any Record Producer, and the Record Producer work from the instance, from the Call module, but they do not work from the Service Portal.


Apparently this happens from the Jakarta update to London, I would appreciate any idea.

 



Thanks in advance!!!