bohua / nprinting-sense-on-demand

NPrinting On-demand extension for Qlik Sense
MIT License
10 stars 13 forks source link

Nothing is happening & browser error in F12 #6

Closed jfortner03 closed 6 years ago

jfortner03 commented 6 years ago

Hello,

I am running Qlik Sense June 2017 Patch 1 and NPrinting June 2017. I just installed this OnDemand extension, and set up the button as the instructions state. I ensured that my App only has 1 connection in NPrinting. I've made a selection in my Qlik Sense sheet, and when I press the button, nothing happens. I've included below the error that the browser is showing. Help with this is greatly appreciated.

require.js?1499952235400:13 OPTIONS https://dev-qlik-p1:4993/api/v1/ondemand/requests 401 () send @ require.js?1499952235400:13 ajax @ require.js?1499952235400:13 (anonymous) @ nprinting-sense-on-demand.js??1499952235400:207 l @ require.js?1499952235400:12 m @ require.js?1499952235400:12 setTimeout (async) (anonymous) @ require.js?1499952235400:12 j @ require.js?1499952235400:12 fireWith @ require.js?1499952235400:12 fire @ require.js?1499952235400:12 j @ require.js?1499952235400:12 fireWith @ require.js?1499952235400:12 d @ require.js?1499952235400:13 (anonymous) @ require.js?1499952235400:13 XMLHttpRequest.send (async) send @ require.js?1499952235400:13 ajax @ require.js?1499952235400:13 getConnections @ nprinting-sense-on-demand.js??1499952235400:271 (anonymous) @ nprinting-sense-on-demand.js??1499952235400:178 g @ require.js?1499952235400:20 (anonymous) @ require.js?1499952235400:20 $eval @ require.js?1499952235400:20 $digest @ require.js?1499952235400:20 (anonymous) @ require.js?1499952235400:20 f @ require.js?1499952235400:18 (anonymous) @ require.js?1499952235400:18 setTimeout (async) k.defer @ require.js?1499952235400:18 $evalAsync @ require.js?1499952235400:20 (anonymous) @ require.js?1499952235400:20 h @ require.js?1499952235400:20 then @ require.js?1499952235400:20 h @ client.js??1499952235400:19 (anonymous) @ client.js??1499952235400:19 c.emit @ client.js??1499952235400:18 value @ client.js??1499952235400:18 analysis:1 XMLHttpRequest cannot load https://dev-qlik-p1:4993/api/v1/ondemand/requests. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://dev-qlik-cn1' is therefore not allowed access. The response had HTTP status code 401.

jfortner03 commented 6 years ago

I found the issue. I simply did not add the Qlik Sense URL as a trusted source in NPrinting!

amibaron commented 6 years ago

I'm having a similar issue, and adding the QS URL as a trusted source on the NP server did not resolve the problem, it just led to a problem similar to the one described in another logged issue ("Only working for creator of object"). Have these issues been resolved yet? I'm facing them with a new customer....

bohua commented 6 years ago

@amibaron Sorry for a late reply. This is due to your configurations under NPrinting permissions. You need to assign your NP user the ability to read this app and also on-demand report creation permission. The settings is under NPrinting:4993=> Admin => Security roles

amibaron commented 6 years ago

Thanks. Managed to get it to work.