I am getting the error below as a result of using the each() method in protractor. It has worked fine in the past but is now consistently failing with this error.
Try using this code before your error statement:
browser.wait(function() { return element.all(bars).isPresent().then(function(result) { return result; }); }, 5000);