Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

failed: Error during WebSocket handshake: Unexpected response code: 301

Hi,

I'm trying to embed qlik sense object with external server using mashup and it raise error like,

SS_ErrorWS.png

In order to cross verify the procedure i followed was correct or not, i tried simple graph visualization and it loaded successfully on external server.

But my extension raises error. also my extension takes some required information from qlik sense itself i.e, GetAuthenticatedUser.  Also It uses websockets inside it's implementation. what is wrong i'm not able to figure out please help.


External Server Configuration:

1. JS file:

var prefix = "/proxyName/"

var config = {

host: "qliksenseServerDomainName.com",

prefix: prefix,

port: 443,

isSecure: true

};

require.config( {

baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"

} );

require( ["js/qlik"], function ( qlik ) {

qlik.setOnError( function ( error ) {

$( '#popupText' ).append( error.message + "<br>" );

$( '#popup' ).fadeIn( 1000 );

} );

$( "#closePopup" ).click( function () {

$( '#popup' ).hide();

} );

//callbacks -- inserted here --

//open apps -- inserted here --

var app = qlik.openApp('cfd7d3b2-c1e3-40aa-abb8-2f41e9d87317', config);

//get objects -- inserted here --

app.getObject('QV01','mwYuAPx');

app.getObject('QV02','PmTFP');

} );


2. HTML file:

<!doctype html>

<html><head>

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<title>Qlik Sense Mashup</title>

<meta charset="utf-8">

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<meta name="HandheldFriendly" content="True">

<meta name="MobileOptimized" content="320">

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">

<meta name="apple-mobile-web-app-capable" content="yes">

<meta name="apple-mobile-web-app-status-bar-style" content="black">

<meta http-equiv="cleartype" content="on">

<link rel="stylesheet" href="https://qliksenseServerDomainName.com/proxyName/resources/autogenerated/qlik-styles.css">

<link rel="stylesheet" href="TestMashup.css">

<script src="https://qliksenseServerDomainName.com/proxyName/resources/assets/external/requirejs/require.js"></script>

<script src="TestMashup.js"></script>

</head>

<body style="overflow: auto">

<div class="qui-buttonset-right"></div>

<div class="flex-container">

<div id="QV01" class="qvobject"></div>

<div id="QV02" class="qvobject"></div>

</div>

<!--Error Popup-->

<div id="popup">

<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="closePopup"><span aria-hidden="true">×</span></button>

<p id="popupText"></p>

</div>

</body></html>



Thanks,

Bhargav Patel

0 Replies