When I try and load an application from AGOL - I get the following error in the console:
XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://[domain].maps.arcgis.com' is therefore not allowed access.
where [domain] is my company domain. The problem occurs only in Chrome and only in certain instances of Chrome. Security folk swear all installs are the same.
I see the threads talking about this when you are writing the JS (i.e. How to use Cross Origin Resource Sharing (CORS) from ArcGIS API Javascript Application? - Geographic Information Systems… ) . Any guesses or suggestions on how to handle / troubleshoot when you are using an AGOL app? Is it possible that this is a red herring and that it is actually masking another problem?
Thanks
Hi Michael,
Is the application publicly available? Are any of the layers in the application coming from ArcGIS for Server? In addition what is the Chrome version being used?
Thanks,
Katie
- No it is not publicly available.
- All layers are hosted feature services on AGOL
- Chrome version 52.0.2743.116
Is now sporadically not working on ie. Could get it to work in Chrome if used the following command line options:
c:\Program Files\Google\Chrome\Application\chrome.exe --disable-web-security --user-data-dir
Here is my console dump:
Load arcgis.com
Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefinedmain.js:59 Uncaught ReferenceError: arcgismicrosite is not definedinit @ main.js:59(anonymous function) @ VM294:1init.js:157 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.VM317:1 GET http://dnn506yrbagrg.cloudfront.net/pages/scripts/0006/8609.js?408709 net::ERR_TOO_MANY_REDIRECTS(anonymous function) @ VM317:1PardotTagManager.js:52 domain www.arcgis.com not found
Click "Sign In"
Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefinedconfig.js:559 cdn server url: //cdn.arcgis.com/cdn/10175about:blank:1 Invalid 'X-Frame-Options' header encountered when loading 'https://www.arcgis.com/sharing/rest/oauth2/authorize?client_id=arcgisonline…display=iframe&parent=https://www.arcgis.com&expiration=20160&locale=en-us': 'ALLOW-FROM https://www.arcgis.com' is not a recognized directive. The header will be ignored.ContentScript.js:84 Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefined
Sign In
Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefined2index.html:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.config.js:559 cdn server url: //cdn.arcgis.com/cdn/101754index.html:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.
My Content
content.html:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.ContentScript.js:84 Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefinedcontent.html:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.config.js:559 cdn server url: //cdn.arcgis.com/cdn/101752content.html:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.
Open Application
item.html?id=d52cfae…:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.ContentScript.js:84 Exception in onResRdy: TypeError: Cannot read property 'htmlRes' of undefineditem.html?id=d52cfae…:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.config.js:559 cdn server url: //cdn.arcgis.com/cdn/101756item.html?id=d52cfae…:1 Redirect at origin 'http://cdn.arcgis.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://nycdohmh.maps.arcgis.com' is therefore not allowed access.
Hi Katie,
Attached is my console dump for navigating to and opening an app on AGOL.
Now it's sporadic in ie as well. I think version 52. All layers are hosted on agol and are pwd protected.
Thanks for your help!
Sent from my iPhone
I apologize for my silence, I was in training the past two days. I will take some time to review this additional information you provided. In the end we may need to create a support case to address this question. If that is the case I can get this created for you.
Thanks!
May be no need. IT called in Proxy folk and it looks like problem is fixed.
I'll update you as this progresses.
I just wanted to circle back with you and see if you are still experiencing any issues. Please let me know if you need to look into this question further.
Hi
How did they resolved the problem? We're facing the same trouble
I've also started having this issue with all browsers. Can someone post a solution?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.