Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need change in Config parameters to log into Qliksense Enterprise Edition #12

Open
kswamy15 opened this issue Mar 10, 2021 · 7 comments
Labels
enhancement New feature or request

Comments

@kswamy15
Copy link

The current config parameters only allow logging into Qlik Cloud environment. Qlik Enterprise edition log in requires a few other parameters. How to make those changes? Cloning repository and npm run build with changes doesn't work - npm run build fails on motor-ui. Errors like ../motor-ui/src/lib/components/visx/components/axis/BaseAxis.tsx(49,24): semantic error TS2554: Expected 3 arguments, but got 2.
src\lib\components\visx\components\axis\BaseAxis.tsx

I can make changes and request a pull. Not sure how @motor-js/core works when the repository is named motor-ui

@lureilly1
Copy link
Contributor

Hey,

Please give me some more details about your set-up and I can advise:

How is authentication handled on your Qlik Sense site?
Are you hosting on the server or externally?
What additional parameters are you referring to? - like loading certificates or similar?

Thanks,
Luke

@lureilly1
Copy link
Contributor

npm run build should now work fine

@kswamy15
Copy link
Author

We couldn't connect to QlikSense Enterprise using JWT or certificates from a react app. using a JWT token requires sending a header in the Websocket. You can't send a header in a client Webapplication - you can send a header if you run the .js file using the node command. Finally was able to connect using the Engima.js example application where they use the redirect.html in the host name - see here https://github.com/qlik-oss/enigma.js/tree/master/examples/complete/car-models. You have to upload the redirect.html to the Default content library in Qliksense qmc.

Essentially we had to modify the useEngine.jsx to include these lines:
const reloadURI = encodeURIComponent(${location.origin}/content/Default/redirect.html);
const url = ${location.origin.replace(/^http/, 'ws')}/app/engineData?reloadURI=${reloadURI};
also use this session.on for authentication:
session.on('notification:OnAuthenticationInformation', (authInfo) => {
if (authInfo.mustAuthenticate) {
location.href = authInfo.loginUri;
}
I am giving this detail so that it could help others to connect to Qliksense Enterprise. You could also make a change in the library to accomodate this. I can make the appropriate and post a pull request - you could see my code and decide on how best to accomodate these changes.

@lureilly1
Copy link
Contributor

Great, thanks for this. I'll create a branch and implement this into the main library. I'll probably add a new prop to accommodate for this additional log in type.

Worth noting that you can pass the engine object directly to the Motor component. So potentially you can connect via node.js, grab the engine object and pass this to the Motor component in your React app.

@lureilly1 lureilly1 added the enhancement New feature or request label Mar 30, 2021
@ismaelnobregadatascientist

I runned the starter locally and it works! But when I deploy it on Netlify the Websocket connection fails.

https://6078dc30aca5fadfaeaad644--laughing-mccarthy-d3be37.netlify.app/

@lureilly1
Copy link
Contributor

Hey, please can you post your config object and the motor-js version you are using.

@ismaelnobregadatascientist
export const config = {
//Enter your app config here..
  host: 'qap.sebrae.com.br',
  secure: true,
  port: 443,
  prefix: '',
  appId: 'd183a25e-de1d-47a0-b2a0-459dfbbc20d1'
 
};

Version of motor: 0.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants