Attempting to publish and share a web map to ArcGIS Online via ArcGIS Pro fails, returning the generic error:
This issue can occur due to the following:
The map contains feature classes with XY Event layers.
Line features in shapefiles exported from CAD are published, but points are not published, as the failure occurs during the service definition creation process when attempting to publish to ArcGIS Online.
The path length of the data being shared is too long.
For versions prior to ArcGIS Pro 1.2, this error occurs if the Symbology pane contains null values. This is a known limitation.
Solution or Workaround
Depending on the cause, apply one of the following workarounds.
When using XY Event layers, export to a stand-alone feature class
Export the feature classes containing the XY event layers to standalone feature classes, and remove the XY Event layers from the map before publishing to ArcGIS Online.
Publish directly using ArcGIS Online
Zip the shapefile using compression software, such as 7-Zip.