However, when I try to display a QlikSense object using DIV integration in a Node JS page I encounter a websocket error.
I am able to load all the js/css dependencies (require.js, qlik.js, etc.), but I am unable to display de QS object.
The usual qlik.openApp(..,...) function is trying to access this link: ws://myserver:3000/login, instead of ws://myserver/login and this is the error that I receive:
WebSocket connection to 'ws://myserver:3000/login/app/adb96e4a-ba87-40d3-8f1f-17892109b29c?reloadUri=http%3A%2F%2Fmyserver%3A3000%2Ftest.html' failed: Connection closed before receiving a handshake response
I tried editing the require config, removing the port, but still the openApp function is adding port 3000, even though I remove it from the config variable.
Does your Nodejs web app run on a server different from QlikSense? It seems there is something in the middle between QS, your Nodejs app and the browser which cut off the web socket protocol. Something like a firewall or a load balancer
My NodeJS server runs on the same machine as the QlikSense Server. I don't have a load balancer set and the port 3000 is opened in the Windows firewall. In fact, I turned off the firewall for a quick test and the same error occurred.
I think that if the port would not be present in the link, there would be no websocket error.
But the port has to be specified, so that NodeJS can listen on that port and trigger the custom login page.