I am reeving a 404 error that my config.json cannot be found, I have added the JSON mime type to my IIS configuration at the site and server levels and have restarted IIS. This error appears as so in my console with other errors which I think are caused by the initial 404 of the config.json. What other steps can be taken to remedy this? Additionally when I hit the index.html I receive an "Unexpected token < in JSON at position 0" error
GET http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/css/fonts/c4352a95-7a41-48c1-8... main.js?wab_dv=2.1:1521 jimu.js init... init.js:140 GET http://gisdev01/LifeSupportApplication/LifeSupportApplication/config.json?wab_dv=2.1 404 (Not Found)h @ init.js:140_tryLoadConfig @ main.js?wab_dv=2.1:236loadConfig @ main.js?wab_dv=2.1:227loadConfig @ main.js?wab_dv=2.1:11f.initApp @ main.js?wab_dv=2.1:1522(anonymous function) @ init.js:200ia @ init.js:28(anonymous function) @ init.js:28ja @ init.js:28ga @ init.js:28b @ init.js:29f @ init.js:151d @ init.js:152 init.js:113 TypeError: Cannot read property 'portalUrl' of undefined(…) "TypeError: Cannot read property 'portalUrl' of undefined at _addDefaultPortalUrl (http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/main.js?wab_dv=2.1:32:492) at _addDefaultValues (http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/main.js?wab_dv=2.1:31:416) at .<anonymous> (http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/main.js?wab_dv=2.1:11:456) at http://js.arcgis.com/3.17/init.js:63:209 at h (http://js.arcgis.com/3.17/init.js:107:279) at k (http://js.arcgis.com/3.17/init.js:107:205) at g.resolve (http://js.arcgis.com/3.17/init.js:109:280) at a (http://js.arcgis.com/3.17/init.js:108:148) at h (http://js.arcgis.com/3.17/init.js:107:419) at k (http://js.arcgis.com/3.17/init.js:107:205) ---------------------------------------- rejected at a (http://js.arcgis.com/3.17/init.js:108:174) at h (http://js.arcgis.com/3.17/init.js:107:438) at k (http://js.arcgis.com/3.17/init.js:107:205) at g.resolve (http://js.arcgis.com/3.17/init.js:109:280) at a (http://js.arcgis.com/3.17/init.js:108:148) at h (http://js.arcgis.com/3.17/init.js:107:419) at k (http://js.arcgis.com/3.17/init.js:107:205) at g.w.reject (http://js.arcgis.com/3.17/init.js:109:488) at a (http://js.arcgis.com/3.17/init.js:108:174) at h (http://js.arcgis.com/3.17/init.js:107:452) ---------------------------------------- Error at then.c.then (http://js.arcgis.com/3.17/init.js:110:97) at loadConfig (http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/main.js?wab_dv=2.1:11:361) at Object.f.initApp (http://gisdev01/LifeSupportApplication/LifeSupportApplication/jimu.js/main.js?wab_dv=2.1:1522:55) at http://gisdev01/LifeSupportApplication/LifeSupportApplication/init.js:200:24 at ia (http://js.arcgis.com/3.17/init.js:28:3) at http://js.arcgis.com/3.17/init.js:28:256 at ja (http://js.arcgis.com/3.17/init.js:28:125) at ga (http://js.arcgis.com/3.17/init.js:28:198) at b (http://js.arcgis.com/3.17/init.js:29:177) at f (http://js.arcgis.com/3.17/init.js:151:195)"
Solved! Go to Solution.
Geoffery,
OK, so the url http: //gisdev01/LifeSupportApplication/LifeSupportApplication/config.json?wab_dv=2.1 seems to be the issue.
you state:
I have the app in a folder called LifeSupportApplication and the
index.html is in there.
So if that is the case the url you should be using is:
http://gisdev01/LifeSupportApplication/config.json?wab_dv=2.1
not
http://gisdev01/LifeSupportApplication/LifeSupportApplication/config.json?wab_dv=2.1
Geoffery,
Sounds like you have a syntax error in your config.json. Can you zip and attach it using the advanced editor?
Geoffery,
I can find nothing wrong with your config.json. The main thing I do see is that you have "portalUrl": "your true orgs address" in the map object and "portalUrl": "http://myorg.maps.arcgis.com", in the main portion. In all my apps they are the same url. Another thing that looks odd is "icon": "widgets/MyLocation/images/icon.png?wab_dv=2.1",. What did you use to create this app (WAB Dev or AGOL)?
Hi Robert,
Thanks for your insight; I used AGOL to create the app. I was using my.org.maps.arcgis as a placeholder bc I didn't want the org address to be public, but I mistakenly left that in there. Do you mind removing it from your message?
OK, Have you tried to just bring up the config.json for your site in the url?
http://gis.calhouncounty.org/WAB/V2.0/widgets/eSearch/config.json
I just tried, same error, I am using IIS6. So something is not correct on my configuration, do I need a proxy as suggested?
Geoffery,
The site should be made public via arcgis online, correct?
Error below
Geoffery,
I think you are a little confused.