Offline Packaging "Failed" - how to attain error messages

9630
8
09-30-2021 11:15 PM
GlenShepherd
Esri Contributor
11 8 9,630

The Premise

So we're trying to create an offline map area for our web map.

As far as we know, all the layer configuration and web map settings are correct but for some reason, when we create an offline map area in the ArcGIS Field Maps web application, we're getting the message: "Failed"

The workflows below can be used to narrow down which layers in your map might be the source of the error and grab an error message (and HTTP traffic code) that might shed more light on why this issue is occurring...

NOTE: if we're looking for further troubleshooting steps, please see - ArcGIS Field Maps: Offline Map Areas Packaging/Download "Failed" - Let's Troubleshoot

Fieldy_Failed.png

 

The Workflow

The following is carried out using ArcGIS Online in a Google Chrome browser. However these concepts can be pretty easily adapted to ArcGIS Enterprise (versions supporting ArcGIS Field Maps web app) and with any other network traffic capture methods you utilise...

Open your web map in the ArcGIS Field Maps web application, navigate to the "Offline" tab, then under "Map Areas", choose to "Manage Areas". Once we're on this page, press F12 on your keyboard to open the Google Chrome developer tools window.

Ensure the "Network" tab is open in the developer tools window and then replicate your failing packaging process when trying to create an offline map area:

networktraffic1.png

 

Once packaging has "Failed", we want to look for the last activity that comes from the "packaging.arcgis.com" domain. Please note, that you may need to add the 'Domain' column to your developer tools window to see this.

In the image above, we've identified the network request. Now, if we click on the square to the far left, then this will open the header for the request URL and we can copy and paste this into a new browser tab.

networktraffic2.png

 

Going to this URL in a new browser tab, reveals the JSON response for the packaging job that we have just requested ArcGIS Online web servers to carry out.

networktraffic3.png

 Sometimes the JSON response can reveal an error message indicating what has gone wrong with your particular layers and their compatibility with being packaged into a replica. One common example of this is when ArcGIS Enterprise Portal users have default basemaps in their web map that are not enabled for export. In this instance we might receive a message similar to the following: "could not be authenticated"

However, sometimes the JSON looks completely fine, like in the example above. So we need to look a little deeper...

Remove the ?f=json parameter from your URL and anything following it (such as the token):

networktraffic4.png

 

This will bring you to the REST services directory for this particular packaging job:

networktraffic5.png

 If we click on the 'packages' directory, indicated above, then this will take us to the result parameters for each individual source within your web map.

Here, I can see if there are any error messages associated with any of the services present within my web map:

networktraffic6.png

 

Scrolling along this page, I can identify the following error message associated with this particular feature service: 

networktraffic7.png

 

Unfortunately, sometimes these messages are still not very descriptive. A HTTP response code 500, indicates an internal server error and this is a good time to work through the configuration of this particular service and possibly reach out to Esri technical support with the results of your troubleshooting. In the example show above, the feature service in question was affected by a defect, where an incorrect GDA94 to WGS84 transformation causes incompatibility with creating replicas from a web portal.

Once again, please take a look at the following blog, to look at other options for diagnosing the issue: ArcGIS Field Maps: Offline Map Areas Packaging/Download "Failed" - Let's Troubleshoot

 

Additional notes

  • If we're carrying out this workflow for an ArcGIS Enterprise deployment, then the URL we will be looking for will take the following format: https://portal.domain.com/serverWebAdaptor/rest/services/Utilities/OfflinePackaging/GPServer/SetupMa...<AlphanumericJobID>/results/packages?f=pjson
  • Using an app like 'Fiddler' is great for monitoring and filtering network traffic.
  • This works best for narrowing down which layer might be causing the issue if we have multiple layers in our web map and are unsure which one to blame for the errors during packaging
8 Comments
MahoosucMaps
New Contributor

This is super helpful, thank you for posting it.

A brief summary of my own experience with the identical problem in creating offline areas in Field Maps:

Following your directions, I too discovered the HTTP 500 code on 2 layers with the identical "Unable to create replica. Please check your parameters."

These 2 layers turned out to be the only layers that had been published as independent web layers and added to the webmap after it was first published, all other map layers (those with no errors) existed in the original WFL1 hosted feature layer accompanying the webmap.

As a fix, I deleted the entire webmap from AGOL and republished it including the 2 problem layers in the webmap and the hosted feature layer. No problems in creating an offline area.

GlenShepherd
Esri Contributor

Hi @Jcordovafredes ,

It looks like you're using an ArcGIS Enterprise portal and trying to take the default world imagery basemap offline. Those basemaps are not enabled for exporting tiles.

You will need to use the 'World Imagery (For Export)' basemap service: https://www.arcgis.com/home/item.html?id=226d23f076da478bba4589e7eae95952

You should add this service to your Portal content and store it with ArcGIS Online credentials for automatic authentication in ArcGIS Field Maps. The tile service can then be used as the basemap within your web maps for offline purposes.

RobertThomas3
New Contributor

Thank you so much for this. I was losing my mind as to why my offline areas wouldn't generate, and it turned out not to be what I'd expected – two lines that were initially drawn by hand in GPX files and therefore had no elevation somehow made it unhappy, despite showing no obvious sign of being different in the converted shapefile.

It is utterly infuriating though that such an incredibly complex process (which still doesn't give a real answer!) is necessary.  I've spent all day trying to get this stupid map to work, just the BARE MINIMUM of what this expensive, complicated system is supposed to be able to do.  How many work days are wasted around the world in trying to detect hidden errors because there is no error logging or reporting?

GlenShepherd
Esri Contributor

Hi @RobertThomas3 , I absolutely agree. There needs to be more clarity around these failures in the GUI, as so much more impacts a successful packaging job than just the 'sync' capability.

Please throw a "Kudo" to this ArcGIS Idea: https://community.esri.com/t5/arcgis-field-maps-ideas/more-transparent-informative-messages-when/idi.... And feel free to comment your experience there as well. The developers monitor the ideas pages.

danbecker
Occasional Contributor III
"source": "https://ourdomain.com/portal/sharing/servers/8227a14cb3704f4bba79df3963bf297c/rest/services/World_Imagery/MapServer",
"error": "{\"code\": 35, \"messageCode\": \"OffPkg_ 35\", \"message\": \"Export tile operation https://tiledbasemaps.arcgis.com/arcgis/rest/directories/arcgisoutput/World_Imagery_MapServer/_ags1642778840_ch failed error {\\\"code\\\": 30, \\\"messageCode\\\": \\\"OffPkg_ 30\\\", \\\"message\\\": \\\"Accessing url https://tiledbasemaps.arcgis.com/arcgis/rest/directories/arcgisoutput/World_Imagery_MapServer/_ags1642778840_ch?token=longtokenhere.. returned error <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)>\\\", \\\"params\\\": {\\\"url\\\": \\\"https://tiledbasemaps.arcgis.com/arcgis/rest/directories/arcgisoutput/World_Imagery_MapServer/_ags1642778840_ch?token=longtoken..

 

New Enterprise site on Azure is having above issues when generating offline areas. Is this a cert. trust issue between our Server machine and https://tiledbasemaps.arcgis.com?

GlenShepherd
Esri Contributor

@danbecker - it certainly looks that way

May need to double-check that the root certificate and all intermediates have been imported to both Portal and Server components. Perhaps look at importing the certificates from arcgis.com as well.

It might pay to reach out to your region's tech support.

AmeWunderle
New Contributor III

So helpful!!! Saw that it was a filter that I had on one layer that caused the issue. Posting in case anyone else has a similar issue!

JoabelBarbieri
Occasional Contributor II

One of the most annoying things on AGOL is working with Offline maps. Packing doesn't work and fails so often, download offline areas fail most of the time, auto packing fails...it's so frustrating!!!

About the Author
Esri Australia Client Success team member