Hexagon Geospatial
MENU

Smart M.App

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 14
Registered: ‎11-21-2017
Accepted Solution

Mapping Incident Analyzer to external Data

HI,

 

I am pretty familiar working with Incident Analyzer so i tried linking my app with external data source via url. Unofrtunately, i tried giving url of the csv vile and path (same name case) but i still end up with error "An error occurred when using the path specified in the Data URL field". The name an dpacth is correct and in addition full access rights granted to the file.

 

The .csv file sample is locaed in this url   http://pinoagencies.co.ke/Data/Policestationstats.csv

 

What could be the challenge here?

Frequent Contributor
Posts: 93
Registered: ‎04-05-2016

Re: Mapping Incident Analyzer to external Data

Hi Aolali,

 

have you tried using development tools of your browser (F12) and check the console for additional information when refering to the file?

Also I noticed that you are using http protocol. This could potantially lead to a mixed content warning which refuses the connection to your file. I can see that your file can also be called with https, but you have to accept the self-signed certificate in your browser first before you add it to the analyzer.

 

Hope that helps you debugging your problem.

 

Regards,

Sven

Highlighted
Occasional Contributor
Posts: 14
Registered: ‎11-21-2017

Re: Mapping Incident Analyzer to external Data

HI Sven,

 

Thanks for the feedback. Yes i had tried using F12 to assess and the outcomes are as below

 

 

with http the error message is 

ipa_app.min.js?rel=157b2da6d2:535 Mixed Content: The page at 'https://mapp.hexagongeospatial.com/apps/incident-analyzer-sf/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://pinoagencies.co.ke/Data/Policestationstats.csv?corscachehack=1518527173488'. This request has been blocked; the content must be served over HTTPS.

 

When i use https the error message is 

OPTIONS https://pinoagencies.co.ke/Data/Policestationstats.csv?corscachehack=1518527173488 net::ERR_INSECURE_RESPONSE

 

You mentioned accepting the self-signed certificate in the browser first before you add it to the analyzer which we have tried. My challenge woul be to identify whether this is a browser issue or the application configuration.

 

see attached log

Occasional Contributor
Posts: 14
Registered: ‎11-21-2017

Re: Mapping Incident Analyzer to external Data

I have also tried linking the file from google drive but with the same result.

 

Kinldy try this link and see if you are getting the same output.

 

https://drive.google.com/file/d/15t1JzwMIxPCCi4LeVI6yWMwbVagkoafH/view?usp=sharing

 

kind regards

Technical Evangelist
Posts: 24
Registered: ‎05-12-2016

Re: Mapping Incident Analyzer to external Data

Aolali,

 

You'll need to serve the data from a SSL secured site with a valid certificate. The server must also sent the correct CORS headers and must be a direct download link to the data.

 

For your data that's hosted on Google Drive, try this link:

 

https://doc-0k-cc-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/50jq90nc...

 

Hope this helps,

 

Dave

Frequent Contributor
Posts: 93
Registered: ‎04-05-2016

Re: Mapping Incident Analyzer to external Data

You can use the file from googledrive like DaveOke suggested or you can paste the URL with https (https://pinoagencies.co.ke/Data/Policestationstats.csv) into a new tab of your browser and accept the self-signed certificate (make an exception for it) there, then reload the Analyzer and you should be fine.

Occasional Contributor
Posts: 14
Registered: ‎11-21-2017

Re: Mapping Incident Analyzer to external Data

Thanks Dave,

 

Please check the link you sent me. Access is denied to that link

 

https://doc-0k-cc-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/50jq90nc...

 

Frequent Contributor
Posts: 93
Registered: ‎04-05-2016

Re: Mapping Incident Analyzer to external Data

Google drive is probably using sessions which get closed after a while.

 

This works for me right now: https://drive.google.com/uc?authuser=0&id=15t1JzwMIxPCCi4LeVI6yWMwbVagkoafH&export=download

Occasional Contributor
Posts: 14
Registered: ‎11-21-2017

Re: Mapping Incident Analyzer to external Data

Hi,

 

did you manage to make a connection with the link i provided? I have tried your solution but unfortunately still not getting a connection. Its actually not bringing the certificate acceptance. 

 

"Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mapp.hexagongeospatial.com' is therefore not allowed access"

 

if you can connect directly either from the google drive or webserver link do let me know so that i can know if its an error on this end.

 

regards

 

Tony

Frequent Contributor
Posts: 93
Registered: ‎04-05-2016

Re: Mapping Incident Analyzer to external Data

Hi Tony,

 

no I can't put the csv in my analyzer either. Both google and the link you provided don't allow CORS. If you have control over the server that hosts your file, you can enable CORS there.

 

Regards,

Sven

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.