02-13-2018 03:50 AM
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?
Solved! Go to Solution.
02-13-2018 04:57 AM
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.
02-13-2018 06:31 AM
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
02-13-2018 06:53 AM
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.
02-13-2018 07:55 AM
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:
Hope this helps,
02-13-2018 08:03 AM
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.
02-14-2018 04:19 AM
Please check the link you sent me. Access is denied to that link
02-14-2018 05:16 AM
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
02-14-2018 05:32 AM
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.
02-14-2018 06:47 AM
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.