Obviously misssing the obvious?

I'm trying to run the basic AnalogInOutSerial example in the IDE 2 and I'm getting nothing. The LED isn't turning on and when I try to bring up the serial monitor the error is:

Port monitor error: EOF. Could not connect to COM1 serial port.

AVRDude compiles and uploads the program just fine. Upon completion, the IDE throws the COM port error. I've never seen this before and I don't know where to even begin troubleshooting. Connections have been checked a dozen times. WTF am I missing?

Which Arduino board are you using and what, if anything, is connected to it ?

Sorry. It's an UNO, and I've got a pot and an LED connected as per the instructions at the top of the program.

Have you got the pot connected to pin A0 or perhaps to pin 0 by mistake ?

No, it's connected to A0. And the LED is on 9.

UNO R3 or R4?

It's an R2.

UNO WiFi REV2 or really a very very old Arduino UNO pre-dating the R3?

The latter.

if you upload a simple code like

void setup() {
  Serial.begin(115200);
  Serial.println("Hello World"); 
}
void loop() {}

does it work ? (do you see Hello World in the Serial Terminal (configured at 115200 bauds) ?)

Double check that port. Shouldn't be port 1. Windows reserves COM1 I think.
With the Arduino connected, go to Device Manager > Ports (COM & LPT) and click the drop down to see what's listed.

Mine says
Arduino NANO Every (COM5)
Communications Port (COM1)
Printer Port (LPT1)

It acted like it was going to work, but when I tried to open the serial monitor, suddenly the IDE says it can't connect to COM1. Even though it says that it's connected when I check the menu.

is the Arduino connected to COM1 ??

Yes, and the program uploads and the RX LED pulses. AVRdude says good to go.

Device Manager concurs. Everything seems normal. COM1 is the only port listed, and it shows Arduino UNO on it.

Did you select the right board?
Selector

Certainly did.

I though OP said very old Arduino, not the UNO Wifi REV2

It isn't. Just a regular UNO 2. And here's what happens when I switch to COM2:

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Boyenlil\AppData\Local\Temp\arduino\cores\arduino_avr_uno_84dcc0124026480ecb5b87cf345b9144\core.a
Linking everything together...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp.o" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/..\\..\\cores\\arduino_avr_uno_84dcc0124026480ecb5b87cf345b9144\\core.a" "-LC:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E" -lm
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.eep"
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.hex"

"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf"
Sketch uses 1486 bytes (4%) of program storage space. Maximum is 32256 bytes.
Global variables use 200 bytes (9%) of dynamic memory, leaving 1848 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM2" -b115200 -D "-Uflash:w:C:\Users\Boyenlil\AppData\Local\Temp\arduino\sketches\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

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



avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

...And, when I switch to either port, the IDE automatically updates by itself.

And this is what I get when on COM1:

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp" -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\Boyenlil\AppData\Local\Temp\arduino\cores\arduino_avr_uno_84dcc0124026480ecb5b87cf345b9144\core.a
Linking everything together...
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E\\sketch\\sketch_apr22d.ino.cpp.o" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/..\\..\\cores\\arduino_avr_uno_84dcc0124026480ecb5b87cf345b9144\\core.a" "-LC:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E" -lm
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.eep"
"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf" "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.hex"

"C:\\Users\\Boyenlil\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\Boyenlil\\AppData\\Local\\Temp\\arduino\\sketches\\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.elf"
Sketch uses 1486 bytes (4%) of program storage space. Maximum is 32256 bytes.
Global variables use 200 bytes (9%) of dynamic memory, leaving 1848 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM1" -b115200 -D "-Uflash:w:C:\Users\Boyenlil\AppData\Local\Temp\arduino\sketches\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Boyenlil\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM1
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 3.3
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Boyenlil\AppData\Local\Temp\arduino\sketches\AF4F5821F28B5D80EDAF5B18F321767E/sketch_apr22d.ino.hex"
avrdude: writing flash (1486 bytes):

Writing | ################################################## | 100% 0.29s

avrdude: 1486 bytes of flash written

avrdude done.  Thank you.

This is really starting to piss me off....