I had a similar issue trying to publish a hosted feature layer from a GeoJSON file. Kept getting the mostly unhelpful "There was an error" message on some files but not others. After hours of troubleshooting I found the error in my case. My GeoJSON data has several features. One of the fields (GeoJSON "properties") has values that can be a combination of numbers and letters, so it needs to be a Text field. It appears when you publish a hosted feature layer from GeoJSON, ArcGIS Online infers the field types based on the first feature. In cases where my GeoJSON's first feature had a value that was all numbers, ArcGIS Online sets that field type to Integer. Then when it gets to a feature that has letters in that field, it can't put a string in an Integer field and...mostly unhelpful error message. My workaround was to rewrite my GeoJSON file and stick a "_s" at the end of the value for that field in the first feature. Not ideal to mess up the data, but in my case that field is relatively unimportant, so I can live with it.
... View more