Are you sure COM4 is the right port? Check your Windows device manager if you have multiple ones.
Also make sure that nothing is connected to the D0 and D1 pins, since those are the bootloader / serial pins.
If possible, disconnect all external circuitry from the board.
Another cause could be that you need a different upload_speed
to talk to the bootloader, usually 115200 baud, but sometimes different like 74880.