{"code":"SCSX009","description":"Script launch interval time has not elapsed"}
Hello! Please share app if it's possible.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hello! Please share app if it's possible.
Generally, we would not mind, but given the stage of the app, we prefer not to share it at this time. I hope you understand.
If it becomes absolutely imperative that a resolution can only be found by sharing the app, then we'll have to consider it at that point.
Once again, I hope you understand.
Sure, no problem.
Could you clarify how and how often you invoke the script?
I invoke the script on Page Show, and only upon successful completion I invoke it one more time. When I get the error, it is always on the second run.
Hi, I created a simple app "testError" that I shared with you.
It has two buttons. Both invoke server code via AJAX call that upon success invokes server code via .execute({});
Delay adds 500 ms before invoking service in AJAX callback.
W/O delay fails intermittently with the
{"code":"SCSX009","description":"Script launch interval time has not elapsed"}
response.
In my real app, I am calling another REST service in AJAX (it's polling a message service) and depending on results of the poll, I invoke an Appery REST service. It only works reliably with the delay.
Here's Javascript for AJAX calls:
var delaySV2Call = false;
function processAjax(data){
Appery("testStatus").text("Back from SVC1");
if (delaySV2Call){
setTimeout (function (){
SVC2svc.execute({});
}, 500);
} else {
SVC2svc.execute({});
}
}
function doAjaxCall(){
Code: Select all
$.ajax({
url: "[url=https://api.appery.io/rest/1/code/svc1/exec]https://api.appery.io/rest/1/code/svc...[/url]",
type: 'GET',
dataType: 'text',
success : function(data){
processAjax(data);
},
error : function(jqXHR, textStatus, errorThrown) {
console.log( "SVC1 Call Fail: " + textStatus);
}
});
}
Hello! Thank you! We'll take a look.
Thank you William. This is exactly the problem I am experiencing.
This is how it works. There is a limitation on server code invocation. The interval between invocations should be no less than 300 milliseconds (0.3 seconds).
Is this a limitation for the same script or any script that is called by the same app.