ERROR

Creating map packages for offline use in Field Maps fails with error: "Failed to add item error: Portal request addItem failed with error ERROR: code: 400, Invalid 'dataUrl' parameter, Bad syntax in request"

Last Published: October 11, 2022

Error Message

When packaging areas of a web map for download (offline use) in the Field Maps application from an ArcGIS Enterprise portal, the packaging fails with a generic error message 'Failed', as shown in the image below.

2022-05-19_12-55-02.png

When viewing the network traffic in the browser the following error message is seen:

Failed to add item error: Portal request addItem failed with error ERROR: code: 400, Invalid 'dataUrl' parameter, Bad syntax in request.

The web map and underlying data is configured as required for offline use, and no errors or warnings are logged in the portal or server logs.

Cause

The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error.

Viewing the network traffic when the packaging fails, it's observed that the 400 response is returned from the Sharing/Proxy endpoint. 

By default, the portal's proxy capability is unrestricted, however it is possible to restrict the portal's proxy capability by defining a list of approved web addresses. The ArcGIS Enterprise portal is then only able to proxy requests to the addresses in the list; all others are blocked.

Viewing the security configuration of portal from the REST admin endpoint, the 'allowedProxyHosts' was configured, but the internal domain (xxxxxx.local) was not added to the list of allowed hosts.

Solution or Workaround

Update the allowedProxyHosts security configuration parameter from the portal REST admin endpoint to include the internal domain in the list of web addresses to proxy requests. As in this example and shown in the image below:

"allowedProxyHosts": "gisserver1.domain.com,gisserver2.local"
Update Portal Security Configuration

Article ID:000027689

Software:
  • ArcGIS Field Maps Android
  • ArcGIS Field Maps iOS

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic