I was hit with an error `EPIPE write EPIPE` when running protractor with control flow turned off. https://github.com/angular/protractor/issues/4294. It is caused by misusing await somewhere in the code.
tsline/Intellij is pretty good at warning developer that a promise returned has been ignored. However, one that it didn’t catch and caught me as a surprise is the `ElementArrayFinder` returned by `element.all()`. It’s not a promise, but if you try to use it directly, like `element.all().find()` or my favorite `element.all().getText()`, you’ll have about 0.1% of the time running into the EPIPE error.
Unfortunately, the test I’m working on, calls that for about 8000 times… so it always fails after an hr of running.
Anyway, from the github issue, it appears to be a bug in the selenium driver and it’s fixed in the latest 4.0.0-beta driver which protractor is not using. The solution is to `await` on the `ElementArrayFinder` too, it’ll return `ElementFinder` which you can loop through.