Arduino Stuck in "Uploading..."

My arduino is stuck in uploading, then sometimes it says, “An error occurred while uploading the sketch”

Here is my code, I’m trying to do an LED strip.

#include <Adafruit_NeoPixel.h>

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1:
#define LED_PIN    5

// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 11

// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_RGB + NEO_KHZ800);
// Argument 1 = Number of pixels in NeoPixel strip
// Argument 2 = Arduino pin number (most are valid)
// Argument 3 = Pixel type flags, add together as needed:
//   NEO_KHZ800  800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels are wired for GRB bitstream (most NeoPixel products)
//   NEO_RGB     Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
//   NEO_RGBW    Pixels are wired for RGBW bitstream (NeoPixel RGBW products)

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  strip.setPixelColor(6, 255, 255, 0);
}

Send help

File -> Preferences, under verbose output during, check Upload. Then attempt upload again, copy the full text of the error message, and post it here.

Also, what kind of arduino are you trying to upload to?

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

Sketch uses 2240 bytes (7%) of program storage space. Maximum is 30720 bytes.
Global variables use 41 bytes (2%) of dynamic memory, leaving 2007 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 -PCOM1 -b57600 -D -Uflash:w:C:\Users\Jack\AppData\Local\Temp\arduino_build_542085/LEDStrip.ino.hex:i 
An error occurred while uploading the sketch

avrdude: Version 6.3-20171130
         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                    : COM1
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600

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

Yeah I'm currently using an Arduino Nano

(deleted)

spycatcher2k:
Is there a different COM port? COM1 is very unusual, also try using the non 'old bootloader' version.

So I switched off the bootloader version (I remember switching to it because it didnt work with my nano for some reason) and I switched to COM4, and I still wind up with the same problem, heres the error messages:

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P"

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\Jack\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10809 -build-path C:\Users\Jack\AppData\Local\Temp\arduino_build_542085 -warnings=none -build-cache C:\Users\Jack\AppData\Local\Temp\arduino_cache_895260 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Jack\Documents\Arduino\LEDStrip\LEDStrip.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\Jack\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=1A86_7523 -ide-version=10809 -build-path C:\Users\Jack\AppData\Local\Temp\arduino_build_542085 -warnings=none -build-cache C:\Users\Jack\AppData\Local\Temp\arduino_cache_895260 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\Jack\Documents\Arduino\LEDStrip\LEDStrip.ino
Using board 'nano' 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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp" -o nul
"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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Adafruit_NeoPixel-master" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp" -o nul
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master\Adafruit_NeoPixel.cpp
Using cached library dependencies for file: C:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master\esp8266.c
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 -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Adafruit_NeoPixel-master"

Error output was too long so I'm splitting it up, I'll post it in the next comment

"C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp" -o "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\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\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\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 -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "-IC:\\Program Files (x86)\\Arduino\\libraries\\Adafruit_NeoPixel-master" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp" -o "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp.o"
Compiling libraries...
Compiling library "Adafruit_NeoPixel-master"
Using previously compiled file: C:\Users\Jack\AppData\Local\Temp\arduino_build_542085\libraries\Adafruit_NeoPixel-master\esp8266.c.o
Using previously compiled file: C:\Users\Jack\AppData\Local\Temp\arduino_build_542085\libraries\Adafruit_NeoPixel-master\Adafruit_NeoPixel.cpp.o
Compiling core...
Using precompiled core: C:\Users\Jack\AppData\Local\Temp\arduino_cache_895260\core\core_arduino_avr_nano_cpu_atmega328_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\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.elf" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\sketch\\LEDStrip.ino.cpp.o" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\libraries\\Adafruit_NeoPixel-master\\Adafruit_NeoPixel.cpp.o" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085\\libraries\\Adafruit_NeoPixel-master\\esp8266.c.o" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/..\\arduino_cache_895260\\core\\core_arduino_avr_nano_cpu_atmega328_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085" -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\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.elf" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.eep"
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.elf" "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.hex"
Using library Adafruit_NeoPixel-master at version 1.2.4 in folder: C:\Program Files (x86)\Arduino\libraries\Adafruit_NeoPixel-master 
"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-size" -A "C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_542085/LEDStrip.ino.elf"
Sketch uses 2240 bytes (7%) of program storage space. Maximum is 30720 bytes.
Global variables use 41 bytes (2%) of dynamic memory, leaving 2007 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 -PCOM4 -b115200 -D -Uflash:w:C:\Users\Jack\AppData\Local\Temp\arduino_build_542085/LEDStrip.ino.hex:i 
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

avrdude: Version 6.3-20171130
         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                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200

The output in first of most recent two posts is irrelevant - it's compilation output, and the compile is working fine, it's the upload that's a problem.

The output in the second of those posts is the start of the relevant part, but it appears cut off.

The upload part part starts here, when it invokes avrdude to upload the compiled sketch. :
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\Jack\AppData\Local\Temp\arduino_build_542085/LEDStrip.ino.hex:i

DrAzzy:
The output in first of most recent two posts is irrelevant - it's compilation output, and the compile is working fine, it's the upload that's a problem.

The output in the second of those posts is the start of the relevant part, but it appears cut off.

The upload part part starts here, when it invokes avrdude to upload the compiled sketch. :
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\Jack\AppData\Local\Temp\arduino_build_542085/LEDStrip.ino.hex:i

Alright, I switched off compilation since it can compile no problem, heres the upload error output:

Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 5114 bytes (16%) of program storage space. Maximum is 30720 bytes.
Global variables use 369 bytes (18%) of dynamic memory, leaving 1679 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 -PCOM5 -b115200 -D -Uflash:w:C:\Users\Jack\AppData\Local\Temp\arduino_build_654355/3ButtonCode.ino.hex:i 
An error occurred while uploading the sketch

avrdude: Version 6.3-20171130
         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                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200

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

Problem solved, just took a quick re-install of the IDE

Thanks for taking the time to post an update with your solution StutteringJack! I'm glad to hear it's working now.