Page 2 of 8

{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Tue Dec 24, 2013 4:06 pm
by Maryna Brodina

Hello! Please share app if it's possible.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Tue Dec 24, 2013 4:47 pm
by bahar.wadia

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.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Tue Dec 24, 2013 4:51 pm
by Maryna Brodina

Sure, no problem.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Tue Dec 24, 2013 5:13 pm
by Maryna Brodina

Could you clarify how and how often you invoke the script?


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Tue Dec 24, 2013 5:16 pm
by bahar.wadia

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.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Wed Dec 25, 2013 3:02 pm
by William Bradee

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);
    }
});

}


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Wed Dec 25, 2013 3:19 pm
by Maryna Brodina

Hello! Thank you! We'll take a look.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Wed Dec 25, 2013 3:22 pm
by bahar.wadia

Thank you William. This is exactly the problem I am experiencing.


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Wed Dec 25, 2013 4:13 pm
by Maryna Brodina

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).


{"code":"SCSX009","description":"Script launch interval time has not elapsed"}

Posted: Wed Dec 25, 2013 4:47 pm
by bahar.wadia

Is this a limitation for the same script or any script that is called by the same app.