This is an exception that you probably won't see that often, but when it does pop up it is not always instantly clear what it means. InvalidElementStateException is thrown when the WebElement that you are trying to interact with is not in a state that would allow you to perform the action that you would like to perform.
Think of a <select> element that gives you a list of countries to select when filling in an address form; this element will allow you to select the country associated with your address.
Now, what if the developers have added some validation that will not let you enter a postcode (or ZIP code) until you have selected a country, so that they can trigger the correct postcode validation routine? In this case, the <input> element where you enter your postcode may be disabled until you have selected your country...