Description
Describe the bug
From time to time, the IDE exhibits the follow symptoms when I open it:
- No ports are shown under the IDE's board/port menu
- The "Select Board" dialog (accessed via "Select Other Board & Port") shows "NO PORTS DISCOVERED"
- The Tools > Port menu is missing
However there are multiple detectable Arduino boards and generic serial ports on my computer and other times when I start the IDE the ports are detected just as expected.
To Reproduce
- Start Arduino IDE
- Check if ports are listed. If so, then exit IDE and start again at step 1.
Command line looks like this when the issue occurs:
Click to expand
daemon INFO starting discovery builtin:serial-discovery process
daemon INFO starting discovery builtin:mdns-discovery process
daemon INFO started discovery builtin:serial-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:serial-discovery
daemon INFO started discovery builtin:mdns-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:serial-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO from discovery builtin:mdns-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO sending command START_SYNC to discovery builtin:serial-discovery
daemon INFO sending command START_SYNC to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:mdns-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM3
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM255
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM1
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM7
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM6
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM254
root WARN Frontend EditorNavigationContribution.onStart is slow, took: 6466.7 ms
root WARN Frontend WorkspaceService.onStart is slow, took: 175.1 ms
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156) starting instance
root INFO [8115205c-c018-490d-b338-36be2ff33303] Sync of 5 plugins took: 512.1 ms
root ERROR Could not restore layout
root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
root INFO [8115205c-c018-490d-b338-36be2ff33303][marus25.cortex-debug]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][arduino.vscode-arduino-tools]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.cpp]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json-language-features]: Loaded contributions.
root INFO [8115205c-c018-490d-b338-36be2ff33303] Load contributions of 5 plugins took: 145.0 ms
root WARN Frontend EditorPreviewTreeDecorator.onDidInitializeLayout is slow, took: 146.0 ms
root WARN 'cpp' language is remapped from 'source.cpp.embedded.macro' to 'source.cpp' scope
root WARN a registered grammar configuration for 'cpp' language is overridden
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/init()
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing([email protected] with C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 6156] Debugger contribution has been registered: cortex-debug
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing([email protected] with C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing([email protected] with C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing([email protected] with C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): initializing([email protected] with C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\node_modules\@theia\plugin-ext-vscode\lib\node\plugin-vscode-init)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/loadPlugin(C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\plugins\vscode-builtin-json-language-features\extension\client\dist\jsonMain)
root INFO [hosted-plugin: 6156] PLUGIN_HOST(6156): PluginManagerExtImpl/loadPlugin(C:\ide 2\arduino-ide_2.0.0-beta.11-snapshot.846c22c_Windows_64bit\resources\app\plugins\vscode-arduino-tools\extension\dist\bundle)
root INFO Changed application state from 'initialized_layout' to 'ready'.
root INFO [8115205c-c018-490d-b338-36be2ff33303][marus25.cortex-debug]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][arduino.vscode-arduino-tools]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.cpp]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303][vscode.json-language-features]: Started plugin.
root INFO [8115205c-c018-490d-b338-36be2ff33303] Start of 5 plugins took: 914.5 ms
(note that the ports were discovered even though not shown in the IDE)
Command line looks like this when the issue does not occur:
Click to expand
daemon INFO starting discovery builtin:serial-discovery process
daemon INFO starting discovery builtin:mdns-discovery process
daemon INFO started discovery builtin:serial-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:serial-discovery
daemon INFO started discovery builtin:mdns-discovery process
daemon INFO sending command HELLO 1 "arduino-cli 0.19.1" to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:serial-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO from discovery builtin:mdns-discovery received message type: hello, message: OK, protocol version: 1
daemon INFO sending command START_SYNC to discovery builtin:serial-discovery
daemon INFO sending command START_SYNC to discovery builtin:mdns-discovery
daemon INFO from discovery builtin:mdns-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: start_sync, message: OK
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM3
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM255
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM1
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM14
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM7
daemon INFO from discovery builtin:serial-discovery received message type: add, port: COM254
root WARN Frontend EditorNavigationContribution.onStart is slow, took: 5815.9 ms
root WARN Frontend WorkspaceService.onStart is slow, took: 180.9 ms
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
root INFO [hosted-plugin: 12360] PLUGIN_HOST(12360) starting instance
root INFO Attached boards and available ports changed:
root INFO - New port is available on COM255
root INFO ------------------------------------------
root INFO [3d74c3ec-e34f-45d3-9f3b-f98baa68c6de] Sync of 5 plugins took: 582.2 ms
root INFO Attached boards and available ports changed:
root INFO - New port is available on COM1
root INFO ------------------------------------------
root ERROR Could not restore layout
root INFO Attached boards and available ports changed:
root INFO - Attached board: Arduino MKR WiFi 1010 [arduino:samd:mkrwifi1010] on COM14
root INFO ------------------------------------------
root INFO Attached boards and available ports changed:
root INFO - Attached board: Arduino Mega or Mega 2560 [arduino:avr:mega] on COM7
root INFO ------------------------------------------
root INFO Changed application state from 'attached_shell' to 'initialized_layout'.
root INFO [3d74c3ec-e34f-45d3-9f3b-f98baa68c6de][marus25.cortex-debug]: Loaded contributions.
Expected behavior
All connected ports and boards are always shown in the IDE.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 10
- Version: 2.0.0-beta.11-snapshot.846c22c
Date: 2021-10-06T15:50:55.015Z
CLI Version: 0.19.1 alpha [718bbbf2]
Additional context
Possibly related:
- Can't connect to serial port of Raspberry Pi Pico #365
- Cannot manually access port number #540
- https://forum.arduino.cc/t/not-possible-to-setup-a-coms-port-for-uploading-sketch/918369
Unfortunately, the issue occurs intermittently (maybe once every 10 open/close cycles) and I have not been able to identify any pattern to its occurrence. I have not noticed any correlation with
I have never had this problem with the Java IDE, even when I check it at the same time IDE2 is failing.
Thanks to a tip from @RudolfAtHome, I learned that new ports are still discovered when the IDE is in this condition, including previously unrecognized ports after disconnecting and then reconnecting the board.