Random forest (not the same length)

Ok, can you provide a reprex ?
You showed you had the error even with 128 records of datatest, so that should be enough and not too much to share.

Please have a look at this guide, to see how to create one: