I have shared a map service from ArcMap to my ArcGIS Server (10.5.1).
Then I created a new map in my Portal for ArcGIS, and added the maps ervice just created.
I then enabled the popup for the map service and saved the map
Everything was fine.
The problem occurred after updating the map service.
From ArcMap I overwrote the map service because I updated some features in my mxd.
When I opened the map in Portal, the map service was there showing the new/changed geometries correctly, but the popups were placed randomly (e.g. clicking a point will cause a popup of another feature to show up, not the one I clicked on).
I could fix this by removing and enabling the popups back again, but I have so many layers inside that it takes me plenty of time jut to activate all of them.
If it matters, the ArcGIS Server is NOT federated with thw Portal.
Is this a bug?