English

Error: Publishing failed to complete. Unable to add feature service definition. Error code 400

Error Message

Attempts to publish a survey with Survey123 for ArcGIS returns the following error message:

Error:   
Publishing failed to complete. Unable to add feature service definition. Error code 400

Image of the error message

Cause

This issue occurs if the survey worksheet contains two or more questions with the same value. For example, in the survey worksheet, there are two unique rows with the exact same value in the 'name' column.

Solution or Workaround

To resolve this issue, ensure none of the fields contain the same value. Additionally, a folder in ArcGIS Online is created in the Content tab with files from the failed publication of the survey. This causes attempts to republish the survey to fail even after changing the values.

  1. Log in to ArcGIS Online and navigate to the Content tab.
  2. Search for the survey folder created from the first publishing attempt and delete the entire folder.
  3. Open and check the survey worksheet to ensure there are no duplicate questions.
  4. Republish the survey.

Related Information