Same situation here. Left the map open overnight, came in the next day to publish and error. Saved the map, closed it, immediately reopen and published without error. Had to be a network hiccup or something.
I got this error as well and scrolled through this thread looking for a resolution. It seemed that I had renamed a feature classes attachments and relationship class and it was not happy with me. After blowing it away and re-enabling attachments, I was able to publish with no errors. Also, I was publishing as a hosted feature service on ArcGIS Portal, not ArcGIS Online.