Here is a summary of the issue:

We’ve built a native application using the Ionic framework which uses Cordova to wrap a web application into a native binary. We’re using the LightStreamer Web Client (JavaScript) version 6.1.4. When attempting to connect to non-production servers the connection works fine and streaming proceeds as expected. When attempting to connect to our production servers the connection consistently times out with no errors or response from the server.

Also, when running the code in a desktop browser the connection succeeds as expected, the issue is only when running natively on the phone.

Below is the code we’re using to connect, you can see a few lines commented out where we tried changing the timeout and streaming methods.

Lightstreamer.LightstreamerClient.setLoggerProvide r(new DebugLogProvider());
var lsClient = this.lsClient = new Lightstreamer.LightstreamerClient(this.config.host , this.config.adapter);
lsClient.addListener({
onStatusChange: function(status) {
console.log(status);
}
});

lsClient.addListener({
onServerError: function(errorCode, errorMessage) {
console.log('LS Error! Code: ' + errorCode);
console.log('LS Error! Message: ' + errorMessage);
}
});

lsClient.connectionOptions.setCookieHandlingRequir ed(true);
//lsClient.connectionOptions.setConnectTimeout(10000 );
//lsClient.connectionOptions.setForcedTransport('HTT P-POLLING')
lsClient.connect();

From the server side, this is all we see in the logs (Lightstreamer Server 5.1.1 build 1623.2):

03-Oct-17 15:36:45,649|DEBUG|LightstreamerLogger.connections |NIO READ SELECTOR 1 |Reread HTTP connection on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,649|DEBUG|htstreamerLogger.connections.ht tp|SERVER POOLED THREAD 1 |Parsing request:
GET /lightstreamer/create_session.js?LS_phase=705&LS_cause=timeout.2. 0&LS_polling=true&LS_polling_millis=0&LS_idle_mill is=0&LS_client_version=6.1&LS_adapter_set=JustAnsw er&LS_eng=s0& HTTP/1.1
Host: 192.168.54.123
Accept: */*
Accept-Language: en-us
Connection: keep-alive
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60

on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating KEEPALIVE - no result configured
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.connections |SERVER POOLED THREAD 1 |Processing push request:
/lightstreamer/create_session.js on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,650|INFO |LightstreamerLogger.requests |SERVER POOLED THREAD 1 |Serving request: /lightstreamer/create_session.js?LS_phase=705&LS_cause=timeout.2. 0&LS_polling=true&LS_polling_millis=0&LS_idle_mill is=0&LS_client_version=6.1&LS_adapter_set=JustAnsw er&LS_eng=s0& on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating use_compression - no result configured
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating use_http_11 - result from base rule: true
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating use_http_11 - result from base rule: true
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating USE_CACHE_HEADERS - no result configured
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating content_length - result from base rule: 500000
03-Oct-17 15:36:45,650|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating max_streaming_millis - no result configured
03-Oct-17 15:36:45,651|DEBUG|LightstreamerLogger.requests |SERVER POOLED THREAD 1 |evaluating KEEPALIVE - no result configured
03-Oct-17 15:36:45,653|DEBUG|LightstreamerLogger.pump |SERVER POOLED THREAD 1 |Pump for session Sb5b49d2131c8bcabT3645652 added
03-Oct-17 15:36:45,653|INFO |LightstreamerLogger.requests |SERVER POOLED THREAD 1 |Starting new session: Sb5b49d2131c8bcabT3645652 on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,654|INFO |LightstreamerLogger.connections |SERVER POOLED THREAD 1 |Reused HTTP connection on "Lightstreamer HTTP Server" from 10.40.1.27:55402
03-Oct-17 15:36:45,687|INFO |LightstreamerLogger.requests |FOR PUMPS PARKING DESTROYER|Closed session Sf4dde7f2328a790aT3625678 with internal cause code: 39 (Timeout).
03-Oct-17 15:36:45,688|DEBUG|LightstreamerLogger.pump |FOR PUMPS PARKING DESTROYER|Pump for session Sf4dde7f2328a790aT3625678 removed