<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Node JS WebSocket error in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82647#M1170</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you guys have any other pointers or tips for me to try out?&lt;/P&gt;&lt;P&gt;No one encountered this websocket error except me? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jun 2018 09:01:16 GMT</pubDate>
    <dc:creator>gabineaq</dc:creator>
    <dc:date>2018-06-28T09:01:16Z</dc:date>
    <item>
      <title>Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82642#M1165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to crate a custom login for my mashup and I'm using NodeJS as a server running on port 3000.&lt;/P&gt;&lt;P&gt;I have created a virtual proxy, whitelisted the domains and set the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Access Control Allow Origin to *.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I'm using ticket authentication following the idea posted by Alexander &lt;A href="https://qlikcommunity.qliktech.com/thread/184777"&gt;here:&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Process&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1. Browser requests ticket from server component.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2. Server component issues ticket to user/browser&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;3. Browser consumes ticket by requesting &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/discussion/https:" rel="nofollow" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;"&gt;https://&lt;/A&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;lt;your QS server&amp;gt;/resources/img/dark_noise_16x16.png?qlikTicket=&amp;lt;yourticket&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;4. QS Server returns the image and a Set Cookie header.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;5. Discard the image and just load the qlik.js API&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My virtual proxy name is "login". After I use the custom NodeJS login page and I successfully login, NodeJS redirects me to my extension, but I'm also able to access:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myserver/login/extensions/myextension" rel="nofollow" target="_blank"&gt;http://myserver/login/extensions/myextension&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A class="jive-link-external-small" href="http://myserver/login/hub" rel="nofollow" target="_blank"&gt;http://myserver/login/hub&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3. &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;A class="jive-link-external-small" href="http://myserver/login/qmc" rel="nofollow" target="_blank"&gt;http://myserver/login/qmc&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I try to display a QlikSense object using DIV integration in a Node JS page I encounter a websocket error.&lt;/P&gt;&lt;P&gt;I am able to load all the js/css dependencies (require.js, qlik.js, etc.), but I am unable to display de QS object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The usual qlik.openApp(..,...) function is trying to access this link: ws://&lt;SPAN style="font-size: 13.3333px;"&gt;myserver:3000/login, instead of ws://&lt;SPAN style="font-size: 13.3333px;"&gt;myserver/login and this is the error that I receive: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;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&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;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.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;var config = {&lt;/P&gt;&lt;P&gt;host: window.location.hostname,&lt;/P&gt;&lt;P&gt;prefix: '/login/',&lt;/P&gt;&lt;P&gt;// port: window.location.port,&lt;/P&gt;&lt;P&gt;isSecure: window.location.protocol === "https:"&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I edited even the baseUrl like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;baseUrl: (config.isSecure ? "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://" rel="nofollow" target="_blank"&gt;https://&lt;/A&gt;&lt;SPAN&gt;" : "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;") + config.host + config.prefix + "resources",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have whitelisted the server address, server ip address, server address:3000, server ip address:3000, but still the websocket handshake error persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2018-06-26 at 6.24.35 PM.png" class="jive-image image-1" src="/legacyfs/online/206289_Screen Shot 2018-06-26 at 6.24.35 PM.png" style="height: 444px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2018-06-26 at 6.24.49 PM.png" class="jive-image image-2" src="/legacyfs/online/206290_Screen Shot 2018-06-26 at 6.24.49 PM.png" style="height: 345px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screen Shot 2018-06-26 at 6.24.58 PM.png" class="jive-image image-3" src="/legacyfs/online/206291_Screen Shot 2018-06-26 at 6.24.58 PM.png" style="height: 279px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you guys point me in the right direction, or maybe suggest another route to follow in order to integrate QS objects in external webpages?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82642#M1165</guid>
      <dc:creator>gabineaq</dc:creator>
      <dc:date>2018-06-26T15:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82643#M1166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;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&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 16:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82643#M1166</guid>
      <dc:creator>Vincenzo_Esposito</dc:creator>
      <dc:date>2018-06-26T16:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82644#M1167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that if the port would not be present in the link, there would be no websocket error.&lt;/P&gt;&lt;P&gt;But the port has to be specified, so that NodeJS can listen on that port and trigger the custom login page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 19:22:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82644#M1167</guid>
      <dc:creator>gabineaq</dc:creator>
      <dc:date>2018-06-26T19:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82645#M1168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you able to use Qlik Sense without your custom authentication from the same browser?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 08:24:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82645#M1168</guid>
      <dc:creator>Vincenzo_Esposito</dc:creator>
      <dc:date>2018-06-27T08:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82646#M1169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can access the hub/qmc/extensions using the standard QS login form.&lt;/P&gt;&lt;P&gt;I can also access the hub/qmc/extensions using my custom login form by using the virtual proxy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I can't use div integration in a NodeJS page because of that WebSocket error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2018 08:28:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82646#M1169</guid>
      <dc:creator>gabineaq</dc:creator>
      <dc:date>2018-06-27T08:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Node JS WebSocket error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82647#M1170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you guys have any other pointers or tips for me to try out?&lt;/P&gt;&lt;P&gt;No one encountered this websocket error except me? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2018 09:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Node-JS-WebSocket-error/m-p/82647#M1170</guid>
      <dc:creator>gabineaq</dc:creator>
      <dc:date>2018-06-28T09:01:16Z</dc:date>
    </item>
  </channel>
</rss>

