0 Replies Latest reply: Nov 17, 2017 5:41 PM by Winnie Chan RSS

    Qlik server stuck at SESSION_ATTACHED stage

    Winnie Chan

      I'm new on qlik integration. I'm trying to implement dynamic data from our app to Qlik for custom visualization, and here the sequence of it:

      1. Using Qlik REST API, copy from a template app and get the new app_id
      2. Create a websocket connection to qlik server
      3. Using Qlik Engine API, open the app with app_id from step #1 using OpenDoc method
      4. Set script to the app by using SetScript method
      5. Reload the app by DoReload method
      6. Save the app by DoSave method
      7. In the 'Finally' clause, I always close the connection from step #2
      8. Lastly, using Qlik REST API, publish the app before client can see it from our application

       

      Sometimes on step #2, the create connection result in " {u'jsonrpc': u'2.0', u'method': u'OnConnected', u'params': {u'qSessionState': u'SESSION_ATTACHED'}}" instead of "SESSION_CREATED". And it result in step #3 with {u'jsonrpc': u'2.0', u'id': 1, u'error': {u'code': 1002, u'parameter': u'b4d8fd05-6280-460b-a1df-b72247a956e9', u'message': u'App already open'}} and failed the subsequent steps and subsequent custom viz generation.

       

      Questions:

      1. What is causing SESSION_ATTACHED on step #2 ?
      2. How to list out all opened session and close the one that is not being used ?
      3. Once it gets into this SESSION_ATTACHED stage, it will be stuck in such stage, how can I fix it?

       

      Thanks in advance.