Can no longer upload sketches to my Arduino Uno

I am trying to upload sketches to my Arduino Uno from my 64 bit Windows 7 PC, but any sketch I try gets stuck on the "uploading" phase.

I have tried uploaded a blank sketch but nothing completes. Here is my error message:

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. avrdude: ser_open(): can't open device "\.\COM3": Access is denied.

An error occurred while uploading the sketch

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

May be your Arduino Uno is no longer on COM3.

(deleted)

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Louis\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path C:\Users\Louis\AppData\Local\Temp\arduino_build_395103 -warnings=none -build-cache C:\Users\Louis\AppData\Local\Temp\arduino_cache_568902 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Louis\AppData\Local\Temp\untitled1903029009.tmp\sketch_dec01a\sketch_dec01a.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Louis\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=0X2341_0X0043 -ide-version=10805 -build-path C:\Users\Louis\AppData\Local\Temp\arduino_build_395103 -warnings=none -build-cache C:\Users\Louis\AppData\Local\Temp\arduino_cache_568902 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Louis\AppData\Local\Temp\untitled1903029009.tmp\sketch_dec01a\sketch_dec01a.ino Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr Detecting libraries used... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\sketch\sketch_dec01a.ino.cpp" -o "nul" Generating function prototypes... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\sketch\sketch_dec01a.ino.cpp" -o "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\preproc\ctags_target_for_gcc_minus_e.cpp" "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\preproc\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\sketch\sketch_dec01a.ino.cpp" -o "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\sketch\sketch_dec01a.ino.cpp.o" Compiling libraries... Compiling core... Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring_pulse.S.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\WInterrupts.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\hooks.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring_analog.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring_digital.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring_pulse.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\wiring_shift.c.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\CDC.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\HardwareSerial.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\HardwareSerial0.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\HardwareSerial1.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\HardwareSerial2.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\HardwareSerial3.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\IPAddress.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\PluggableUSB.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\Print.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\Stream.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\Tone.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\USBCore.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\WMath.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\WString.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\abi.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\main.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\new.cpp.o Using previously compiled file: C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\core\core.a Archiving built core (caching) in: C:\Users\Louis\AppData\Local\Temp\arduino_cache_568902\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a Linking everything together... "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/sketch_dec01a.ino.elf" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103\sketch\sketch_dec01a.ino.cpp.o" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/core\core.a" "-LC:\Users\Louis\AppData\Local\Temp\arduino_build_395103" -lm "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/sketch_dec01a.ino.elf" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/sketch_dec01a.ino.eep" "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/sketch_dec01a.ino.elf" "C:\Users\Louis\AppData\Local\Temp\arduino_build_395103/sketch_dec01a.ino.hex" Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes. An error occurred while uploading the sketch

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the toolbar).
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Archiving built core (caching) in: C:\Users\Louis\AppData\Local\Temp\arduino_cache_450120\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\Louis\AppData\Local\Temp\arduino_build_935021/sketch_dec01a.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Hmmm, that's only slightly more informative. Usually I would expect AVRDUDE to give more information on the cause of the failure. It's strange that you originally got the "avrdude: ser_open(): can't open device "\\.\COM3": Access is denied." but no longer. That error indicates that another program has the port open, though sometimes it could happen if the port was locked open by a previous upload that went wrong.

Are you sure the Uno is on COM3? Does it show up under the Tools > Port menu? If you unplug the Uno from your computer, wait a little while, and then open the Tools > Port menu again the Uno's COM port should disappear, and vice versa with plugging it in.

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Archiving built core (caching) in: C:\Users\Louis\AppData\Local\Temp\arduino_cache_7568\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a
Sketch uses 444 bytes (1%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\Louis\AppData\Local\Temp\arduino_build_655711/sketch_dec01a.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: ser_open(): can't open device "\\.\COM3": The system cannot find the file specified.



avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

pert: Are you sure the Uno is on COM3? Does it show up under the Tools > Port menu? If you unplug the Uno from your computer, wait a little while, and then open the Tools > Port menu again the Uno's COM port should disappear, and vice versa with plugging it in.

It looks like the Uno is on COM 3. Under Tools > Ports I have Com 3: Arduino Uno.

When I unplug the USB the “Ardunio Uno” part disappears. I have left it unplugged and restarted the PC.

Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 2672 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 250 bytes (12%) of dynamic memory, leaving 1798 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "\\.\COM3": The system cannot find the file specified.


Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Exception in thread "Thread-56" java.util.ConcurrentModificationException
    at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:127)
    at cc.arduino.contributions.libraries.LibrariesIndexer.setLibrariesFolders(LibrariesIndexer.java:106)
    at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:682)
    at processing.app.Base.onBoardOrPortChange(Base.java:1313)
    at processing.app.Editor$DefaultExportHandler.run(Editor.java:2198)
    at java.lang.Thread.run(Thread.java:748)

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.