Jump to content
zedd

Client application stops working randomly

Recommended Posts

Dear community,

I'm using client written on NodeJs. And today i figured out that my application stopped working. After turning on log appender for lightstreaming client i figured out that 

LS_window.alert('License not valid for this Client version');

Minimal client version for NodeJS is 6.1.4

Then i checked webtrader application and it has lightstreamer client v 6.0

Another fact is that my application works for some period of time and then suddenly it stops working without any code modification from my side.

I think that it's probably problem on forex lightstreamer servers. Probably some servers have lightstreamer server version compatible with lightstreamer client 6.1.4, others are not compatible. I can not verify this theory so this is only my suggestion

Please help me with resolving of this issue

Thanks

Share this post


Link to post

Hi Zedd,

As a check, are you using the URL https://push.cityindex.com/ for your streaming connection?

We're currently still using the older Lightstreamer version 5.1.2 on our servers, (although their is a project in the works to upgrade Lightstreamer to the latest version). It's somewhat puzzling that your client application worked previously. 

I assume you are using Lightstreamer 6.10. client SDK? 

It may be that the only solution at this time is to move down to Lightstreamer 5.1.2 client so that it matches our servers.

Kind Regards, PM

 

Share this post


Link to post

Hi PM,

Thank you for response!

That's right, i'm using

const FOREX_API_URL = 'https://ciapi.cityindex.com/tradingapi';
const FOREX_STREAMING_URL = 'https://push.cityindex.com/';
 
My nodejs lightstreamer client version is
 
"lightstreamer-client": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/lightstreamer-client/-/lightstreamer-client-6.1.4.tgz",
"integrity": "sha1-VOUIE9oa28AE+28Y4PYesyyU9Fw=",
"requires": {
"faye-websocket": ">=0.9.2",
"xmlhttprequest": "^1.7.0"
}
},
 
I've contacted lightstreamer techsupport and they've confirmed that lightstreamer server v 5.1.2 should work with client v 6.1.4.
 
Another my check showed that FOREX.com Web Platform uses lightstreamer client v 6.0
 
 
 
lightstreamer techsupport told me that they can not provide me with lightstreamer client v 6.0

Share this post


Link to post

Hi Zedd,

I recalled awhile back that another user encountered the same issue that you are with the "License not valid for this Client version" error message. 

They contacted LS Support who confirmed the error message was due to a version mismatch between our servers and the client version. We resolved the issue with the user reverting to version 5.1.2 client side to match what we're using server side. 

On the LS site, you can still download LS 5.1.2 which includes a version appropriate Node.js Adapter SDK at https://lightstreamer.com/download/#ls5. I think this is the quickest way to resolve the error message and get you back up and running. 

Kind Regards, PM

 

Share this post


Link to post

Hi PM,

Thank you for your suggestion,

Unfortunately i already use lightstreamer client compatible with server version 5.1.2 and i don't have a possibility to downgrade it

More detailed investigation from my side confirmed that https://push.cityindex.com uses server version < 5.1.2

Screenshot is attached.

Please note that 

Server: Lightstreamer/5.1.1 build 1623.2 (Lightstreamer Push Server - www.lightstreamer.com) Vivace edition
 
Please suggest

Screen Shot 2018-08-20 at 22.59.18.png

Share this post


Link to post

Hi Zedd,

One possibility assuming it is not an incompatibility issue is something we found from the Lightstreamer change log for their latest version. https://www.lightstreamer.com/repo/distros/Lightstreamer_7_0_0_20180228.zip%23/Lightstreamer/CHANGELOG.HTML

 

Limited the responses of the form "License not valid for this Client version", which were issued also in cases in which the client version was not correctly specified in the request (which, actually, could also be due to request corruption). These cases are now treated as normal syntax errors (which are notified in different ways depending on the client type).

Relieved the above license notifications for all clients based on the Web and Node.js client SDKs, also for old versions. Instead of issuing an alert (Web) or a console log (Node.js), a suitable error code is now reported; where not available, the issue is notified as a syntax error.

 

The much more likely possibility is incompatibility of versions though. The earliest available version of LS client NPM package is as you mentioned previously 6.1.4, which has the note: "legacy server 5.1.2"https://www.npmjs.com/package/lightstreamer-client

Since as we've discovered, the servers are on LS 5.1.1 that is where the incompatibility error message arises in all likelihood. 

We do have a project to upgrade our servers to the latest LS version, but we're looking in the timeframe of months rather than weeks.

Kind Regards, PM

Share this post


Link to post

Dear PM,

Thank you for information.

I've modified lightstreamer library and fixed lightstreamer client version to 6.0.

Now my client works again.

Just for information, i had to format obfuscated code and replace existing code with next one:

ra: function (a, b, d, l, k) { a.Ac = a.Ac.replace("LS_client_version=6.1", "LS_client_version=6.0"); if (this.k) return null; this.W = r ? new r : new XMLHttpRequest;
 

Share this post


Link to post

Dear PM,

Regarding this topic, is there any updates or estimates regarding LightStreamer server upgrade to more fresh version? I'm asking that because current LightStreamer JS library has a big problem with memory leaks and that creates problems for my application, so i hope this bug is fixed in latest versions of LightStreamer client for JS

Thank you very much indeed
Cheers
zedd

Share this post


Link to post

Hi Zedd,

I have good news. We have rolled out onto the latest Lightstreamer 7 on the Live servers so you can upgrade your client to v7 as well now. 

There may need to be some updates on your code to work correctly - please allow for some time to do any changes and for other bedding in issues that may arise. Theoretically, it should be a seamless transition but better safe than sorry.

Kind Regards, PM

Share this post


Link to post

Hi PM,

Wow! thanks for a such a great news! I was waiting this for a long time and now i can remove my monkey patch from lightstreamer client.

I've upgraded lightstreamer client to version 7.3.1 and tried to start my app. Then i got an error:

onStatusChange CONNECTING
onStatusChange DISCONNECTED
onServerError 60 License not valid for this Client version

Additionally i've checked create_session request for webtrader and webtrader2 platforms. Both still show client version 6.0

Maybe i should use some specifc version of client? There are 15 versions of 7.*.* in npm repository

Thanks
zedd

Share this post


Link to post

Hi Zedd,

I just checked by logging into the trading platform and I can see Lightstreamer Server 7.0.1 returned in the create_session request. What URL are you using for the streaming? It should be "https://push.cityindex.com"?

image.png

Kind Regards, PM

Share this post


Link to post

Hi PM,

First of all thank you for pointing me to the correct place where to check server version.

Yes, i'm using this url

FOREX_STREAMING_URL=https://push.cityindex.com/

By experimenting with different versions, i've figured out that latest compatible version is 

"lightstreamer-client": "7.2.4"

Thanks for assisting with resolving of this problem!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×