About 6 months ago I built a prototype JavaScript app which uses the spatial analysis service; FindNearest. Find Nearest. I've posted this on GeoNet but haven't had much joy there.
The app ran fine for a few months, prompting users to log in to ArcGIS online, before submitting a task and returning results.
Now my geoprocessing job is failing with: Select appropriate helper services url from Portal for requested operation","params". See below for full JSON response. You can also debug yourself at Rig Planner . Look at arcgis.js lines 215 to 255 to see me build my parameters object and submit the task. So what's changed? And what do I need to change to get my app returning results again?
{
jobId: "j1d25d7282f4b43fab8bd626a59908963",
jobStatus: "esriJobFailed",
results: { },
inputs: { },
messages:
[
]
{},
type: "esriJobMessageTypeError",
description: "{"error": {"code" : 0, "messageCode": "GPEXT_015","message": "Select appropriate helper services url from Portal for requested operation","params": {}}}"
{},
type: "esriJobMessageTypeError",
description: "{"messageCode": "AO_100030", "message": "FindNearest failed."}"
{},
type: "esriJobMessageTypeError",
description: "Failed to execute (FindNearest)."
{}
type: "esriJobMessageTypeError",
description: "Failed."
}
Steps to reproduce:
- Go to http://www.deloitte-geospatial.com/rigplanner/
- Open your browser's developer tools (I'm using Chrome) and show the network tab
- Search by Filter > Search. You do not need to change any of the default filter values
- Enter a valid ArcGIS Online username and password and hit OK. I've setup a temp account for debugging
- You should be able to see the api submit the gp task, then check it's status a few times before failing. When I examine the output of the final output I see jobStatus: esriJobFailed with an array of 4 messages. See the output from my original posting the JSON object.
As I say this app was working fine up until a couple of months ago, and should return 2 objects when successful. i) The nearestLayer containing the 10 nearest points to the little rig marker, and also ii) the connecting lines from the marker to each point. It's a fun little proof of concept that we'd love to get working again.