Skip to main content

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Skip the ticket, Chat with Qlik Support instead for instant assistance.
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik server stuck at SESSION_ATTACHED stage

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.


  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.

2 Replies
Not applicable

This issue has been fixed by closing the websocket every time the sequence exit, success or not.

Not applicable

Winnie and I found in further testing that we were still seeing this when we made two concurrent WebSocket connections to the same Qlik Sense Engine API endpoint. After reviewing "Connecting to the Qlik Engine API" at

we realized that we needed to append the Qlik app ID to the Engine API URLs when making our WebSocket connections to get an isolated Qlik Engine session for each Qlik app.