you don't have the layers yet, that's the thing.
<pre>
map.getLayers().getArray() = [];
</pre>
at this point.

In this sense the event name is quite confusing...