I read an article about it, saying that there are 2 envelopes (1 that goes to the winner and 1 to the hosts to read it out loud) and someone gave the wrong envelope to Beatty, who was confused.
You can see that the envelope says actress in a leading role with Emma Stone (and the title La La Land). Dunway wasn't paying enough attention, saw the title, said it out loud without seeing Emma Stone's name above it.
Huge blame tho, pretty awkward for everyone involved.