Error Message
After changing the source of a layer view in ArcGIS Online, opening the layer view in Map Viewer fails and returns the following error message:
Error:
Unable to add layer: Unable to establish a secure HTTPS connection to the layer. The layer, <layer name>, cannot be added to the map.
Cause
- The layer ID for the source layer view is different.
- The layer is corrupted.
Solution or Workaround
Match the layer ID in ArcGIS Pro
- Open the ArcGIS Pro project.
- In the Contents pane, right-click the map and click Properties to open the Properties dialog box.
- In the Map Properties dialog box, click the General tab.
- Check the Allow assignment of unique numeric IDs for sharing web layers check box.
- Click OK.
- In the Contents pane, right-click the layer with the mismatching layer ID, and click Properties.
- In the Layer Properties dialog box, click the General tab.
- For the Layer ID parameter, input the matching layer ID of the source data.
- Click OK.
- Overwrite the layer. Refer to ArcGIS Pro: Overwrite a web feature layer for further instructions.
Recreate and republish the layer
Delete the corrupted layer from ArcGIS Online and recreate the layer before republishing.