Qlik Community

Qlik Sense Integration, Extensions, & APIs

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

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.

"listener must be a function"

I have a mashup extension on a QlikSense 3.1.5 server that works fine from my laptop using IE.  But when using Chrome it seems to go into a loop and repeatedly flashes up this in the console.

Anybody got any suggestion on how I should start investigating this.

Pretty sure it is this line

var app = qlik.openApp('359c76cb-b380-460c-a9b2-a49bc931031d', config);

that repeatedly flashes up this console message :

11 Replies

Re: "listener must be a function"

Hi bill.markham‌,

It looks like the api is not founding the app -- extremly strange that IE is more forgiving than Chrome --

from the code you have : var app = qlik.openApp('359c76cb-b380-460c-a9b2-a49bc931031d', config);

It looks like the first quote is a double-quote while the second quote is a simple quote.

Can IE be so forgiving???

Re: "listener must be a function"

Thanks for the suggestion.

I have double checked and both the first and second quotes are single quotes.  Tried changing them both to double quotes - still no joy, and then changed them both back to single quotes - and still no joy.

I have found this entry in the Proxy log.

"630811.3.2.020170308T180820.755+0000T3QLIKSER4629ef254-e90f-4c35-8d1b-d80696513851Command=Login;Result=0;ResultText=Successaccf27ed-6742-4e7c-b390-e27c954788511f7f0fe6-628e-48e6-b7a0-49b5f7981b650EMEAbill.markham0Not availableSecurity::ffff: authenticated. User 'EMEA\bill.markham' used authentication method 'ticket' and got session 'accf27ed-6742-4e7c-b390-e27c95478851'9508f6e120cc246290b31d5e2116a3c1c506bedd"

Re: "listener must be a function"

Hi Bill,

Can you post a bit more of the code? The 'openApp' code looks ok so it's might be something else throwing the error.



Re: "listener must be a function"

Earlier today I really stripped down the code to just what is pasted below in italics.

Strange that is perfect with IE and only dodgy with Chrome on my laptop.

alert("A1 hi");

var prefix = window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 );

var config = {

  host: window.location.hostname,

  prefix: prefix,

  port: window.location.port,

  isSecure: window.location.protocol === "https:"


//to avoid errors in workbench: you can remove this when you have added an app

var app;

require.config( {

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

} );

alert("B hi");

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

  var app = qlik.openApp('359c76cb-b380-460c-a9b2-a49bc931031d', config);

alert("EEE hi");

} );

alert("FFF hi");

Re: "listener must be a function"

Even weirder is that it works fine via RDP to QlikSense Server using Chrome.

Whilst I am tempted to blame firewalling / closed ports I cannot find any basis for such a finger point.


Re: "listener must be a function"

Yeah, looks like a strange one. The code looks fine and it works in Chrome for me as well. Can you get someone else to test it in Chrome? That should help understand if it's a port/firewall thing.

Re: "listener must be a function"

I get the issue on a VPN connection, and it also been recreated by somebody from our office LAN in Prague.

Strangely it is fine using our original POC server that runs QlikSense Server 3.1.4.

But bad on our new Dev Server running 3.1.5 - although everything else runs perfectly on the new Dev server.  But it is the only mashup I've tried on this new server. Maybe tomorrow I'll knock up a really basic mashup using the Dev Hub and see how that behaves.

The new Dev server does have some somewhat overenthusiastic firewalling around it, which the old POC Server did not.

I have also diarised upgrading the new Dev server to 3.2 tomorrow lunchtime.

Plus I have logged it with Qlik Support as ticket 01035143.


Re: "listener must be a function"

So you might have been hit a bug in previous versions of Qlik Sense in regards to tickets.
As you can see in your initial stack traces you actually have 2 tickets being produced for you when in reality you should only ever just consume one and that will set the session cookie for further requests.

If you also notice the first ticket values contain a . in the middle. This can cause certain browsers to freak out on you.

Re: "listener must be a function"

Qlik contacted me for a webex about the support ticket I raised.

I have learnt on the webex that this is one of the infamous random & intermittent issues, as all was perfect whilst they were watching.  But later I did manage to recreate the issue, they have seen & video'd it on a webex and I have emailed them the stash of logs they requested.