Upload fails: avrdude: ser_open(): can't set com-state for "\\.\COM6"

Some causes of Exit Status 1 uploading error:

  • Arduino board is not connected properly
  • COM port is not selected
  • Right Arduino board is not selected
  • USB port of computer is not working
  • Using a USB mini charging cable instead of data cable
  • Serial COM port drivers missing.
  • Arduino Tx and Rx pins are under use by any other sensors
  • Outdated version of Arduino IDE
  • Wrong selection of COM port
  • In case of Arduino Nano using a new processor bootloader