vscode: "Something went wrong while getting the serial port list"

ersatz
Posts: 4
Joined: Sat Feb 20, 2021 2:19 am

vscode: "Something went wrong while getting the serial port list"

Postby ersatz » Sat Feb 20, 2021 2:32 am

Hi, I'm trying to get up and running using the ESP-IDF explorer in VS Code (Windows 10), and I believe I've gone though the plugin's automatic installation flow successfully, but when I try to select a port with the plug icon in the bottom left, I get the message "Something went wrong while getting the serial port list". I'm not sure how to debug this or what I should try next, there is no additional logging in the ESP-IDF output window in vscode, and the message doesn't give any pointers about where I should look for logs.

Any Ideas what I should try next?

Some additional background info in case it might be helpful:
- I have been able to successfully connect to and flash my ESP32 by way of the Arduino IDE and using the Arduino VSCode plugin.
- I've tried disabling the Arduino VSCode in case that was somehow interfering with the ESP-IDF plugin. I've also restarted vscode after doing this. these actions did not help.
- I've tried restarting my machine since installing the ESP-IDF plugin (and since going through it's automatic installation of the other required build tools). That did not help either.

Any ideas most appreciated! Thanks!

ersatz
Posts: 4
Joined: Sat Feb 20, 2021 2:19 am

Re: vscode: "Something went wrong while getting the serial port list"

Postby ersatz » Sat Feb 20, 2021 8:16 pm

Another update: I uninstalled the Arduino and ESP-IDF vscode plugins and deleted the folder where the ESP-IDF build tools where saved, then did a clean install. I'm still getting the same error and cannot select any boards. Ideas and help most appreciated! :)

ESP_bignacio
Posts: 229
Joined: Wed May 02, 2018 12:12 pm

Re: vscode: "Something went wrong while getting the serial port list"

Postby ESP_bignacio » Mon Feb 22, 2021 6:38 am

Can you take a look at the extension log to see any related error

- Windows: `%USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log`

Maybe you have a missing PySerial package in the virtual environment. Can you run the ESP-IDF: Install ESP-IDF extension Python Packages command (CTRL + Shift + P and type the command)

prateekn9
Posts: 4
Joined: Mon Feb 22, 2021 11:38 am

Re: vscode: "Something went wrong while getting the serial port list"

Postby prateekn9 » Mon Feb 22, 2021 11:40 am

Facing the same issue, tried cleaning and fresh installation, any help and support is appreciated.

ersatz
Posts: 4
Joined: Sat Feb 20, 2021 2:19 am

Re: vscode: "Something went wrong while getting the serial port list"

Postby ersatz » Mon Feb 22, 2021 6:46 pm

ESP_bignacio wrote:
Mon Feb 22, 2021 6:38 am
Maybe you have a missing PySerial package in the virtual environment. Can you run the ESP-IDF: Install ESP-IDF extension Python Packages command (CTRL + Shift + P and type the command)
Hmmm, I wrote another follow up reply about this a couple days ago, but I guess it didn't go through...

Yes, the issue was that PySerial and several other python packages were missing. I was able to discover this by pressing the little flame icon (build+flash) in the bottom left set of icons -- that button logs things to the console, so I was able to see that missing python packages were the cause of the problem. The error message also recommended running a file to install the missing packages (I think it was `install.bat`, but I cannot recall the full path -- for anyone else that encounters this problem, click the flame icon and look at the error message -- on my system it told me the path to the file). Running this .bat file solved my problems *BUT* i think the bat file was not designed to be able to handle directory names with spaces... so I did have to do one more full delete of everything and reinstall to a path with no spaces in the names of any folders in the path. Then I was able to run the .bat file suggested by the error message from the flame icon, and then finally everything worked.

Having figured all this out, I have a couple feature suggestions for this excellent VS-Code plugin to make installation a bit easier:

1) have the installer scripts double check that all the correct python packages are installed, and if not, let the user know at that time that their installation has failed and prompt the user to take additional action (run the .bat file automatically if possible, or tell the user that they should run it manually at this time, not later when there is an error)

2) In general when there is an error: in addition to VSCode alerts have full error messages print to the console or esp-idf output panel -- when I used the flame button, the debug information I needed was readily available in the console, so it must exist behind the scenes and was just swallowed by the vscode GUI.

3) update the .bat file that installs python dependencies to enable it to deal with paths that have folders with spaces in their names (on Windows).

Thanks Espressif team, and good luck to anyone else who encounters this problem! :D

Who is online

Users browsing this forum: No registered users and 34 guests