<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://sampleserver1.arcgisonline.com/arcgis/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://sampleserver2.arcgisonline.com/arcgis/rest/services/" matchAll="true" token=""></serverUrl> <serverUrl url="http://server.arcgisonline.com/arcgis/rest/services/" matchAll="true"></serverUrl> <serverUrl url="http://orthogonal.esri.com/arcgis/rest/services/" matchAll="true"></serverUrl>
<serverUrl url="http://services.arcgisonline.com/ArcGIS/rest/services/"
matchAll="true"></serverUrl>
XMLHttpRequest cannot load http://services.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
"Error executing tool.: Layer "layer0": Unable to connect to map server at http://services.arcgisonline.com/Arc..._Map/MapServer. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task)."
What happens when you fire the request directly at the REST endpoint?
ie....
http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export W...
is your application actually using a proxy to make the print request?
Are you certain your proxy is working correctly? I had a similar issue when trying to create a print task to a web map; the first time I clicked the Print button I would get an error, but it would work if I clicked it a second time. It turned out my proxy wasn't set up properly; correcting that fixed the problem.
I believe my error was due to downloading the proxy from an older help page (which had an older version of the proxy). Once I found the newest version of the proxy and had it set up, it fixed my problem.
I just spent a few minutes looking through the new JS API Resources page trying to find the newest version of the proxy for you, but I can't seem to track it down. ESRI really needs to work on getting a search function up and running again!