Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
prabhuappu
Creator II
Creator II

Qliksense Mashup not loading properly

Hi,

I have created a Qliksense Mashup with bootstrap and d3 libraries. In Qliksense desktop edition it is working perfectly. I have deployed it in server and open it from there. But, It is giving the below error.

Uncaught TypeError: Cannot read property 'openApp' of undefined

It loads properly after I refreshed the webpage multiple times. if i refresh it again it is showing the same error.

I'm loading many css and js libraries. is this causing the issue. Is there a way to solve this.

Please help me. Thanks in advance.

Regards,

Prabhu Appu

11 Replies
Alexander_Thor
Employee
Employee

Hey,

No you can load external libraries without a problem.

If you can share your code then it would make it easier for us to help you debug the issue.

ErikWetterberg

Sounds like you have some timing issue. If you open the console, do you get any error messages in it?

prabhuappu
Creator II
Creator II
Author

Hi Erik,

Yes. It is due to network latency. The Qlik.js and some of the fonts and css files are not loading and giving time out error. I changed the wait time in require.config, after that it is loading properly. But still some times i'm getting the error as qlik.openapp is not defined. Is there a better way to overcome this.

require.config( {

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

  waitSeconds: 10000,

} );

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

//Code...........

})

Attached the javascript file used in the mashup. if you see the above code only Qlik.js is loaded using require statement and other js and css files are loaded from .html file.

<script src="js/jquery.min.js"></script>

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

<!-- Latest compiled and minified CSS -->

<link rel="stylesheet" href="css/bootstrap.css">

<!-- Optional theme

<link rel="stylesheet" href="css/bootstrap-theme.css">-->

<!-- Latest compiled and minified JavaScript -->

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

<link rel="stylesheet" href="css/jquery.mCustomScrollbar.css" />

<script src="js/jquery.mCustomScrollbar.concat.min.js"></script>

<!-- custom CSS -->

<link rel="stylesheet" href="css/style.css">

<script src="js/d3.v3.min.js"></script>

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

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

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

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

Also i'm getting "Uncaught Error: Mismatched anonymous define() module:" error. even if the page loaded correctly.

Regards,

Prabhu Appu

Anonymous
Not applicable

Looks like you are loading some modules outside require js which also has define() module. Try loading external JS using require.

prabhuappu
Creator II
Creator II
Author

Hi Vishal,

Thanks for the reply. I modified the code to load the files through Require JS. Now i'm not getting that error.

But i'm getting the below error sometimes,

Error2.PNG

The font file is already there in that path. Also i'm getting unsupported media type error while loading the fonts.

Am i missing something

Regards,

Prabhu appu

Anonymous
Not applicable

I think you should be more worried about the js load timeout issue which is no 3 in the image attached. Probably require JS is not able to load the modules mentioned in the error. Check if the path is correct relative to require load directory, if the path is correct then try setting waitSeconds attribute in require.config to 0 and see if the JS are getting loaded or not.

ErikWetterberg

Hi,

Is the link to the font file correct?? That is if you copy the link from the console into a new browser tab do you actually get the file??

Are you using jQuery to load files in your extension? Make sure the paths are correct.

The last error might just be an effect of the second one.

vegard_bakke
Partner - Creator III
Partner - Creator III

Hello prabhu appu,

We are experiencing the same issue, using Qlik Sense 3.2.1. Did you ever solve this?

Or has anyone else had this problem and solved it?

Sometimes, but not always, we get:

    Uncaught TypeError: qlik.openApp is not a function

or Uncaught Error: Mismatched anonymous define() module.



Anyone got any hints, or things to check, it'd be greatly appreciated. 


Regards,

Vegard

prabhuappu
Creator II
Creator II
Author

Hi,

What are all the external js script you are loading in the mashup?

Can you share the error screenshot.

Regards,

Prabhu Appu