Due appears as COM6 port but gives error "No device found on COM6" on upload

I have the same problem and i solve it by pressing the erase button during the bigining of the upload. Now everything iscorrect.