Device encryption fails, but no error
There was a similar issue in Android 4.2 whereby encryption failed as described if the phone was plugged into a computer's USB port, but worked if plugged into a charger. I don't know when this bug first appeared or whether it has been fixed in a more recent version, but it's worth trying a plain charger.