Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    do you receive the call on the node adapter?

    If not please verify if all the required configurations are set based on your case: https://docs.google.com/a/lightstrea...rive_web#gid=1

    In some cases you'll see that <protected_js> set to N might be required (e.g. Different Hosts + Same Protocol + Cookie Require + Old Browser). I'm not sure if I can help you in these cases. Which browser are you testing with?

  2. #12
    Hi yes,

    I am recieving the call just fine. Here is my code:

    var HOST = 'localhost';
    var METADATA_PORT = 6662;
    var REQ_RESP_PORT = 6663;
    var WRITE_PORT = 6664;

    var reqRespStream = net.createConnection(REQ_RESP_PORT, HOST);
    var notifyStream = net.createConnection(WRITE_PORT, HOST);
    var metadataStream = net.createConnection(METADATA_PORT, HOST);

    var MetadataProvider = require('lightstreamer-adapter').MetadataProvider,
    DataProvider = require('lightstreamer-adapter').DataProvider,
    dataProvider = new DataProvider(reqRespStream, notifyStream, function(){return true;}),
    metadataProvider = new MetadataProvider(metadataStream,{
    distinctSnapLen: 30,
    itemAllowedModes: {distinct: true},
    userAllowedModes: {distinct: true}
    });

    metadataProvider.on('notifyUser', function(request, response){
    console.log('doneNotifyUser');
    response.success(1000000,false);
    });

    doneNotifyUser is repeatedly logged to the console.

    In the client the StatusWidget displays 'Connecting...' and i see the following logs repeatedly (as it keeps attempting to establish the session):

    GET https://localhost/lightstreamer/create_session.js [HTTP/1.1 200 OK 7ms]
    GET https://localhost/lightstreamer/create_session.js [HTTP/1.1 200 OK 4ms]
    GET https://localhost/lightstreamer/xhr.html [HTTP/1.1 304 Not Modified 2ms]

    Again, to be clear, if when the above is happening I simply remove the following line:

    client.connectionOptions.setCookieHandlingRequired (true);

    and refresh the cleint (without ever restarting my server or the lightstreamer server)

    The LS client connects just fine.

    I also added the following listener:

    client.addListener({
    onServerError:
    function
    (errorCode,errorMessage) {

    console.log('Lightstreamer server error');
    console.log(errorCode);
    console.log(errorMessage);
    }
    });

    but again i do not see any error messages logged from here.

    So in summary, the problem seems very related to the line: client.connectionOptions.setCookieHandlingRequired (true);

    When this is there I get the call in notifyUser but the subscription is never successful. When i remove this line without changing anything else the client connects perfectly.

    As I mentioned with details in a previous post the only thing that is different in the request is the headers. They are different by more than just the cookie which is quite confusing.

    Please let me know what you think I should try next?

    my conf is as follows:

    <use_protected_js>Y</use_protected_js>
    <forward_cookies>Y</forward_cookies>

    I am using the latest version of firefox: 29.0.1

  3. #13
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    regarding the document I linked (this one: http://goo.gl/kwREX ) which one is your case (ie your row)?

    can you paste a snippet from the Lightstreamer server log?

 

 

Similar Threads

  1. NotifyUser Header
    By milad.j in forum Adapter SDKs
    Replies: 1
    Last Post: November 4th, 2013, 10:23 AM
  2. How to get SessionId in .NET client code?
    By cwt237 in forum Client SDKs
    Replies: 6
    Last Post: September 19th, 2013, 02:05 PM
  3. Send data from DataAdapter based on user/sessionID
    By gal_nitzan in forum Adapter SDKs
    Replies: 1
    Last Post: February 12th, 2013, 10:16 PM
  4. Cookie support in android library
    By eoinoc in forum Client SDKs
    Replies: 1
    Last Post: October 15th, 2012, 10:21 AM
  5. Delay in notifyUser() causes erratic create_session behavior
    By brianjohnson in forum Adapter SDKs
    Replies: 2
    Last Post: April 5th, 2010, 01:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 01:20 PM.