qlik-demo-team / qdt-components

React Components to be used with Angular 10, React 16 and Vue 2. Connects with the Capability API and Engine API.
MIT License
92 stars 50 forks source link

Getting development started in local environment #30

Closed jonvitale closed 4 years ago

jonvitale commented 6 years ago

Hi,

I'm just getting started trying to develop on my local computer with Angular. I'm, first of all, trying to decide whether I should develop using the localhost and make a duplicate of any QS app I eventually want to deploy to the web or whether I will be able to successfully pull from the app where it sits on our QAP server. We have a current mashup that points to an app that is requires no authentication. https://dashboards.philasd.org/extensions/philadelphia/index.html

I am first trying to point directly to the app used in this mashup. Here is my qConfig settings: const qConfig = { "config": { "host": "dashboards.philasd.org", "secure": true, "port": 443, "prefix": "", "appId": "1f15ad9e-6fee-4f03-b78a-52ed3915bad7" }, "connections": { "vizApi": true, "engineApi": true } }

But this doesn't seem to be working. Here are my error messages (image capture, but text below). Can you let me know what I might be doing wrong? Sorry, this is very noob. Thank you.

image

qdt-components.js:11 Unhandled promise rejection Error: Minified React error #130; visit http://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at i (qdt-components.js:6) at i (qdt-components.js:19) at et (qdt-components.js:19) at qdt-components.js:19 at s (qdt-components.js:19) at u (qdt-components.js:19) at beginWork (qdt-components.js:19) at o (qdt-components.js:19) at a (qdt-components.js:19) at x (qdt-components.js:19) (anonymous) @ qdt-components.js:11 e.exports @ qdt-components.js:6 (anonymous) @ qdt-components.js:11 e.exports @ qdt-components.js:11 b.(anonymous function) @ qdt-components.js:6 m @ qdt-components.js:6 y @ qdt-components.js:6

localhost/:1 Failed to load https://dashboards.philasd.org/api/about/v1/language?_=1532959958681: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

jonvitale commented 6 years ago

Actually, after some investigation it probably seems like a better idea to use a local copy of a Qlik Sense app and the 4848 server produced by desktop with my mashup in the extensions folder. But, getting that to work with Angular is also tricky. I see that you have a template for desktop mashup (and a related closed issue), but I have some questions about getting Angular to work with it. Has Angular been tested in a desktop environment? Can I use the cli to build a working mashup in the extensions folder of Qlik Sense (with a QEXT file)? Also, I'm getting strange errors, like this:

refused to execute script from 'http://localhost:4848/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

This is strange because in index.html the type for man.js is "text/javascript"

vitaly-t commented 5 years ago

Just hit the same issue...

@jonvitale Did you find a solution or work-around for it?

I'm using CLI 7.0.4, plus Angular 7.0.2

fkabinoff commented 5 years ago

This looks like a whitelist issue. Is the whitelist set correctly in your Qlik Sense virtual proxy?

vitaly-t commented 5 years ago

I opened a separate issue that was resolved here - #46

yianni-ververis commented 4 years ago

Closing due to inactivity, please reopen if you still have the issue