I have searched all over amazon for how to fix it, but there's nothing I can find fo work out the issue!
It is a known problem but has various causes, if your friend bought it from Amazon and did not mark it as a gift then it will come registered to his account. If he deregisters it that sometimes causes the problem and you can register it.
That error code also sometimes happens if it is blocked by Amazon, not in your case, but it is done if one is lost or stolen.
If getting your friend to deregister it does not work contact Amazon using the contact link in my signature they may be able to help or replace it. If they will not deal with you if it is registered to someone else you may have to get your friend to contact them.
The other option is to return it to Amazon (assuming it was bought from them) recipients can return gifts even if it was not bought as a gift.
The above answer is correct in my experience, buyers from 3rd party sources should be aware that if the parcel has been declared as lost or stolen the Echo will not be able to register, rendering it useless.
The echo will need to be activated by Amazon support.
Although frustrating, as this answer is not immediately obvious it does stop the dishonest people out there.
As already answered above this error is basically a registration error, either your device is a gifted device, second-hand device, either you are trying to register the device with a different amazon echo or Amazon has blocked your device as its reported stolen or lost.
In some cases user faced this issue as the device they try to register is reported undelivered in Amazon account, however, fix in each case is different. the complete guide to error 12:2:15:10:1 ,