thows write EPIPE and publish stops in ejected app.

I am getting this error when I am trying to publish the project. I don’t see any stacktrace other than write EPIPE. Is there a way to get more stacktrace? Also this is inconsistent. Sometime it happens and sometimes it doesn’t.