What I'm using: ArcGIS For Server 10.4, ArcMap 10.4, ArcGIS Online
I created a geoprocessing service using ModelBuilder that selects points from a layer based on a certain field, "XYZ". It buffers those points and returns the polygons as the output. My input schema in the service definition is set to only check for field "XYZ" (and the default ObjectID and Shape).
If I access the service in ArcMap, it will run on any points layer I supply it with as long as it has the field "XYZ". If I take a layer that it successfully processed in ArcMap and upload it to ArcGIS Online and then try running it with the service via a Geoprocessing widget, it fails (both Synchronous and Asynchronous). However, if I turn all of the fields except for "XYZ" off before pushing the layer to ArcGIS Online, the gp service will work correctly on that layer.
Is there some sort of schema change I'm missing when publishing layers to ArcGIS online to be hosted? Or what could be the possible reason it only fails on layers that have all of the fields? I've also tried having the input schema including all of the fields, but it shows the same behavior.