nodejs-qliksense icon indicating copy to clipboard operation
nodejs-qliksense copied to clipboard

JavaScript server path error

Open gabiQlik opened this issue 8 years ago • 4 comments

@websy85 I have a problem with the JS on the server. I've followed the configuration tutorial and I've managed to create the server and successfully authenticate on the hub/qmc. However, I'm not able to display the test object on the index page, as the JavaScript is not loaded.

I think the problem is that the server is trying to load the JS from http://link:port_number/JS files, instead of http://link/JS files. If I remove the port number from script.js, all the files are loaded, but it fails the authentication. I've tried to create the JS files in the Public folder, but they are not loaded.

Could you give me some pointers about this issue or how could I solve it?

gabiQlik avatar Oct 12 '16 15:10 gabiQlik

@gabiQlik Which version of Sense are you running? Am I correct in thinking you're running the solution against Qlik Sense Enterprise as well? If so then you'll need to connect to a virtual proxy that allows anonymous access. If you're authenticating then depending on how you authenticate you'll need to do some additional steps. If by chance you're running desktop then it may be that the path you're providing isn't correct.

Thanks Nick

websy85 avatar Oct 14 '16 19:10 websy85

I'm running the latest version of QlikSense Server. I'm not using QS Enterprise. I've tinkered a little bit with the code and it seems that when it's trying to load the require.js from the server, the authentication part of the script is not running.

gabiQlik avatar Oct 15 '16 14:10 gabiQlik

@gabiQlik the example code only works for anonymous access. I'd recommend creating a new virtual proxy and configuring to be always anonymous. Authentication with the Capabilities API can be tricky so it's best to avoid it at first. You can find more example code and solutions on Qlik Playground which might help.

websy85 avatar Oct 17 '16 12:10 websy85

Thank you for the reply.

It would be a good idea, easy to implement if I'd use anonymous authentication, but I need to log-in at least 2 users simultaneously. If I'd use anonymous authentication, I'd lose the selections and exhaust all the users tokens.

Even tough I'm not able to load the mashup, I'm able to access the Hub or QMC by using your code.

Thank you for the Qlik Playground link, it's a useful resource, but unfortunately there is no back-end code, but there are some nice front-end ideas.

gabiQlik avatar Oct 17 '16 17:10 gabiQlik