You should debug this line, most likely the findByName method doesn’t manage to find the entity you would like to clone. So the .clone() correctly is not defined.
Also you should be careful of cloning entities in the update method of your script, you will get quickly thousands of new entities (one per frame) that can slow down or even crash your app.
Also, your code for getting a random index of the array is flawed. It produced a range of 1-3, which will ignore your first element and then break when it tries to find the element with index 3 (arrays are 0-indexed) Either subtract 1 from that calculation or just use Math.floor(pc.math.random(0, 3)); or better yet, Math.floor(pc.math.random(0, object_array.length));
EDIT: i see you already subtract 1 from that calculation, my bad.
And another note, your code won’t clone a new entity every second, it’ll clone one every frame with a delay of a second. Either use setInterval() in your initialize function or use a looping tween (nicer because they’ll get paused when the tab is inactive or timeScale is 0
i.e.
this.app.tween({}).to({}, 1.0, pc.Linear).loop(true)
.on('loop', function () {
// spawning code here
}, this);