Arduino Error when uploading

Does the error occur if the board is only connected to the USB port?

Have you tried a loop-back test?