Hello,
I have a couple hosted feature layers in AGOL that I am trying to export. The issue is that the "status" endpoint <agol URL>/items/<itemid>/status) sometimes returns
{"status":"failed","statusMessage":null,"itemId":"2602e0c0c0904b478dae9772ecc0b2e7"}
for certain items, when in actuality the export is completed successfully.
This seems to happen whether the user tries the export using the AGOL user interface, or whether the export is attempted using the REST API. From the user interface, after you complete the fields in the "Export to Shapefile" Popup and click the "Export" button, the text "Exporting...." appears in the popup, but then goes away and the popup remains on the screen. Watching the above steps in the browser's network activity console, you can see that the status endpoint has incorrectly returned the above error. However, when you close the popup and go to your "My Content" section, the shapefile is actually there.
So this appears to be some sort of issue with the /status endpoint returning "failed" even when the export shapefile is successfully created. I'm not sure why this only happens with certain hosted feature layers. Any advice from ESRI?
Solved! Go to Solution.
As it turns out, after working with ESRI support, this is indeed a bug with AGOL. A report has been filed here:
BUG-000117320: Export to shapefile fails in ArcGIS Online if the at..
PROBLEM: Export to shapefile fails in ArcGIS Online if the attribute table contains a field name 'OBJECTID' that is not an ObjectID field type.
ALTERNATE SOLUTION: Delete the OBJECTID field from the Item Details page > Data > Fields.
Hello Jeff,
I've seen instances where an export process returns a "failed" state even when an item appears to be created in Content, ready for download. Usually this occurs because the export process first creates a container for the data, and then loads the data into the container. It appears that likely the first part of the process is working (an item is made to which the content needs to be added) but then the second part doesn't work. If you actually download and open the resulting items, does it contain the data requested?
While this may explain why you're getting a discrepancy in results, it certainly doesn't explain why you're getting a failure in the first place. Is your content public? If so, can you provide the URL to an item you're trying to download? If not, go ahead and give us a call at Support Services and we can chat with you on the phone to figure out what's going on.
Thank you!
Best regards,
Rachel
Esri Support Services
As it turns out, after working with ESRI support, this is indeed a bug with AGOL. A report has been filed here:
BUG-000117320: Export to shapefile fails in ArcGIS Online if the at..
PROBLEM: Export to shapefile fails in ArcGIS Online if the attribute table contains a field name 'OBJECTID' that is not an ObjectID field type.
ALTERNATE SOLUTION: Delete the OBJECTID field from the Item Details page > Data > Fields.