Comments (6)
Hi
Sorry for the late answer. I have tried the linked tutorial, and I'm able to connect to a QCS app after adding the host
to web-integration (in my case https://127.0.0.1:8080
)
Do you have any example code you can share?
What kind of devServer are you using?
from enigma.js.
@axelssonHakan We are using firebase's hosting emulator for local development. As for our frontend web framework, we are using React. Our team has been able to log in successfully with qlik as shown above, however even when we whitelist our dev domain for the web-integration we are unable to connect via websockets to our qlik domain.
In Chrome Console:
const webIntegrationId = ""
const csrfToken = ""
const appId = ""
const tenantUri = ""
let wsurl = `${tenantUri.replace(
'https',
'wss'
)}app/${appId}?qlik-web-integration-id=${webIntegrationId}&qlik-csrf-token=${csrfToken}`
new WebSocket(wsurl);
It's my understanding that similar code is called by enigma here. I have verified that calling the enigma library leads to the same result as the above code.
Could you see if the above snippit works for you in the developer console? We have a temporary solution right now with embedded sheets, so I was able to verify that this worked in the domain context of our qlik saas tenant.
from enigma.js.
I just installed the hosting emulator and it seems fine to "integrate" the tutorial you mentioned.
I'm using the config from the tutorial:
try {
// fetch the CSRF token:
const res = await request('/api/v1/csrf-token', false);
const csrfToken = res.headers.get('qlik-csrf-token');
// fetch the list of available apps:
const apps = await request('/api/v1/items?resourceType=app');
if (!apps.data.length) {
titleElement.innerHTML = 'No apps available';
return;
}
// grab the first app id in the list:
const appId = apps.data[0].resourceId;
// build a websocket URL:
const url = `${tenantUri.replace(
'https',
'wss'
)}/app/${appId}?qlik-web-integration-id=${webIntegrationId}&qlik-csrf-token=${csrfToken}`;
// fetch the engine API schema:
const schema = await (
await fetch('https://unpkg.com/[email protected]/schemas/12.612.0.json')
).json();
// create the enigma.js session:
const session = window.enigma.create({ url, schema });
const global = await session.open();
// open the app, and fetch the layout:
const app = await global.openDoc(appId);
const appLayout = await app.getAppLayout();
// finally, present the app title in your web app:
titleElement.innerHTML = appLayout.qTitle;
} catch (err) {
window.console.log('Error while setting up:', err);
}
from enigma.js.
@axelssonHakan Hmmm I'll test this over the weekend and post my findings. What version of chrome are you on? I know with recent updates with cookies, we have issues with incognito browsers not authenticating end users. Our whitelabed solution is using JWT authentication and maybe the qlik cookies are not being passed with the request.
from enigma.js.
@axelssonHakan I went back and did the tutorial again. My issue was as a tenant admin I am able to see all apps across spaces, but I was not explicitly added to the space of the app i wanted to connect to. Interestingly, I am able to embed an iframe and calling the Qlik api while in our Saas UI via the browser console worked fine regardless of my space access. That does not seem to be related to enigma, but I appreciate your timely responses. Closing this issue.
from enigma.js.
Thanks for responding with updated status
from enigma.js.
Related Issues (20)
- Enigma js connection failed in new chrome browser HOT 11
- Error: Session suspended while connecting Qlik one environment but it is working other environment
- Remove/update link for schemas when API Insights is removed
- Unable to close app HOT 2
- Npm update - schema 12.936.0.json is missing HOT 1
- Remove dependency to after-work.js
- Failed to construct 'WebSocket': The subprotocol '[object Object]' is invalid. HOT 2
- Question: How can I get the sheet name by passing the sheet id HOT 1
- Question: How to connect to Qliksense Enterprise from the browser HOT 6
- flaky test `qix-logging` > `should log qix traffic`
- Incorrect Result for getHyperCubeData when using Master Measures in Viz Expressions HOT 8
- multiselect using enigma HOT 1
- Property 'openDoc' does not exist on type 'IGeneratedAPI HOT 5
- OnMaxParallelSessionsExceeded HOT 1
- upgrade to rollup v3
- Action Required: Fix Renovate Configuration
- TypeScript Support Broken HOT 2
- getDocList in Qlik Cloud instance HOT 2
- No use of providing appId to enigma session creation?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enigma.js.