Ports are greyed out

I got a weird problem that I can't get my head around.
Win 11 Pro IDE 1.8.19
All of a sudden the ports select field in is greyed out.
The weird thing is that IDE v2.3.4 still works fine, printing and uploading.
Also Putty works fine.
Tried it with An old Uno and several ESP boards.
The boards show up fine in Windows device manager.
I tried deleting and re-installing.
The ESP packages were still there after that, so uninstalling did not fully uninstall.
There must be something corrupted.
Question is what to delete and re-install.
Leo..

Hi @Wawa. Do you have the "STM32 MCU based boards" platform (AKA "STM32duino") installed? There was a bug in an older version of that platform that caused it to break the Tools > Port menu of Arduino IDE 1.x:

No STM32 boards installed.
It happened all of a sudden, without making changes to the IDE.

After trying out Wokwi the problem started.
But I don't see any connection with that.

The strange thing is that only v1.x is affected, not v2.x
Leo..

Try this experiment:

  1. Select File > Quit from the Arduino IDE menus if it is running.
    All Arduino IDE windows will close.
  2. Rename the folder at the following path on your hard drive:
    C:\Users\<username>\AppData\Local\Arduino15\
    
    (Where <username> is your Windows username)
    :red_exclamation_mark: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  3. Start Arduino IDE.

Does the problem still occur after you do that?

If you installed them via Boards Manager, they are installed to that Arduino15 folder. Uninstalling Arduino IDE only removes the application installation, and doesn't affect the Arduino15 folder, so this is why any platforms you installed via Boards Manager will still be present after reinstalling the IDE.

More rarely done, but it is also possible to manually install boards platforms to the hardware subfolder of the sketchbook folder. As with the Arduino15 folder, the sketchbook folder is also not affected by uninstalling the IDE.

Yes, renaming that folder did the trick.
Not sure which file in that folder was corrupted, but that doesn't matter.
Over the years it had grown to almost 20GB.
I will delete and re-install again.
Thank you.
Leo..

I recently experienced the port select field greyed out with a Xiao esp32-c3 Win 11 and IDE 1.8.19 when installing esp core version from 3.3.0 to 3.3.1.

The issue was that the boards.txt file in 3.3.1 is too large/too long for 1.8.19.

The issue was reported and discussed on github

https://github.com/espressif/arduino-esp32/issues/11883

https://github.com/espressif/arduino-esp32/issues/11798

IDE 2.3.6 does not have the boards.text file size issue.

The work around for me was to remove some not likely to be used esp32 boards from the boards.txt file.

@ptillisch
Can you explain root cause of the issue, and is there a way that 1.8.19 can be modified on the computer where it runs to correct the issue?

There is also a problem caused by the ESP32 board package by Expressif Systems version 3.3.1, vid with no pid for the FoBE Quill ESP32S3 Mesh FH4R2. Commenting out the two vid lines with no accompanying pid corrects the problem.

52128 ##############################################################
52129 
52130 # FoBE Quill ESP32S3 Mesh FH4R2
52131 
52132 fobe_quill_esp32s3_mesh.name=FoBE Quill ESP32S3 Mesh
52133 fobe_quill_esp32s3_mesh.vid.0=0x303a
52134 fobe_quill_esp32s3_mesh.pid.0=0x82f4
52135 fobe_quill_esp32s3_mesh.vid.1=0x303a
52136 fobe_quill_esp32s3_mesh.vid.1=0x82f5
52137 fobe_quill_esp32s3_mesh.vid.2=0x303a
52138 fobe_quill_esp32s3_mesh.pid.2=0x82f6

It appears that the root cause of the port option being greyed out was the FoBe Quill entry in boards.txt with the "vid" error.

Fixed with this commit which will be included in 3.3.2.

There is an explanation here, in the context of the same class of bug that was present in the "STM32 MCU based boards" platform:

And perhaps a bit more information in the description of the fix I submitted for that bug: