Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Can't select Arduino serial port (again) #1198

Closed
dariocs78 opened this issue Feb 7, 2021 · 28 comments
Closed

Can't select Arduino serial port (again) #1198

dariocs78 opened this issue Feb 7, 2021 · 28 comments
Labels
serial Issues with serial ports

Comments

@dariocs78
Copy link

Hello,

Related to previous issues: #922 #1105 #1104 #1101 #1099 #1104

I can't select the Arduino serial port by clicking on the bar button. It works only by editing arduino.json as a workaround.

It seemed this was solved back in version 0.3.3, but it's happening to me again with version 0.3.4 under VS Code 1.53.0 in Windows 10.

Anyone experiencing the same problem?

BR

@0xStarcat
Copy link

0xStarcat commented Feb 7, 2021

i am on 0.3.4 w/ vscode on ubuntu and also did the same manually edited "path" workaround the OP mentions but now get:

Failed to open serial port /dev/ttyUSB0 due to error: + Error: The module '/home/<redacted>/.vscode/extensions/vsciot-vscode.vscode-arduino-0.3.4/out/node_modules/usb-detection/build/Release/detection.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 67. This version of Node.js requires NODE_MODULE_VERSION 85. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install).

@AlphaSierraHotel
Copy link

AlphaSierraHotel commented Feb 7, 2021

Same for me on a Windows platform

Failed to open serial port COM7 due to error: + Error: The module '\\?\c:\Users\<redacted>\.vscode\extensions\vsciot-vscode.vscode-arduino-0.3.4\out\node_modules\usb-detection\build\Release\detection.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 80. This version of Node.js requires NODE_MODULE_VERSION 85. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install).

EDIT: I was trying to open the serial monitor when I got the error, having manually added the port to arduino.json.

@AlphaSierraHotel
Copy link

Also, possibly relevant as there was an update applied recently

Version: 1.53.0 (user setup)
Commit: 8490d3dde47c57ba65ec40dd192d014fd2113496
Date: 2021-02-03T20:36:38.611Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.19041

@0xStarcat
Copy link

0xStarcat commented Feb 7, 2021

Seems like the NODE_MODULE_VERSION bug was fixed in 0.3.5 #1074 (comment)

so if this is your issue like me, to fix it I downloaded the vsix file from https://github.com/microsoft/vscode-arduino/releases/tag/v0.3.5

and run code --install-extension /path/to/.vsix then reload vscode

or wait until 0.3.5 gets pushed to the vscode extension library for download

@emily-curry
Copy link

so if this is your issue like me, to fix it I downloaded the vsix file from https://github.com/microsoft/vscode-arduino/releases/tag/v0.3.5

and run code --install-extension /path/to/.vsix then reload vscode

Upgrading to extension version 0.3.5 with vscode 1.53.0 (electron 11.2.1, node 12.18.3) did the trick for me, thank you!

@AlphaSierraHotel
Copy link

Worked for me too. Thanks.

@moraesjeremias
Copy link

Worked for me as well, thanks for the advice @0xStarcat !

@lamello
Copy link

lamello commented Feb 8, 2021

Worked for me also. Thank you.

@jorgeota
Copy link

jorgeota commented Feb 8, 2021

worked for me. Thank you!

@adiazulay
Copy link
Contributor

Thanks @0xStarcat for explaining how to install the vsix.
I'll leave this issue pinned until the extension publishes to the marketplace.

@cdg123
Copy link

cdg123 commented Feb 9, 2021

Great thanks for the guidance

@hongqiangwang
Copy link

works for me. thanks a lot!

@masynthetic
Copy link

I swear these never end... see ya'll next month

@UID163844189
Copy link

Worked for me so. Thank you!
And, you can install the extension in vs code instead of command line.

@marcelo-lara
Copy link

worked for me too =)
Thanks!

@rvdbreemen
Copy link

worked for me to, thanks!

@adiazulay
Copy link
Contributor

v0.3.5 is now available in the marketplace. Thanks for bearing with us!

@adiazulay adiazulay added the serial Issues with serial ports label Feb 18, 2021
@adiazulay adiazulay unpinned this issue Feb 18, 2021
@HowardHonig
Copy link

Well, it's back again! VSC v1.59 forced the error Failed to open serial port ....etc. Tried upgrading to latest version of the vsix but that didn't fix the problem.

This appears to have happen on most releases of VSC. Doesn't anyone check this BEFORE releasing the code? Downgrading to VSC v1.57 fixed the problem but VSC still keeps asking to upgrade.

@munef
Copy link

munef commented Aug 15, 2021

I faced the same issue with VSC v1.59 and fixed by rolling back to v1.56.2. I disabled auto update by Preferences > Settings (Ctrl + ,) > Update: Mode to "none". Reference:
https://stackoverflow.com/questions/50162685/how-do-i-disable-vs-code-of-updating-itself

@MaxRev-Dev
Copy link

@HowardHonig @munef Just encountered the same. Downgrading VSC to 1.57 or 1.56 does not help. For me installing v0.4.4-rc1 fixed the issue.

@HowardHonig
Copy link

HowardHonig commented Aug 24, 2021

Great, but the Readme on v0.4.4-rc1 doesn't explain how to install this extension update. The command palette install didn't work and the arduino extension "install another version" doesn't give me the option of selecting anything from the disc, and the latest available shown is 0.4.3.

@teymurov27
Copy link

Same issue here VSC v1.59 and fixed by downgrading to 1.48.2. Command palette for changing .ino file also did not work out for me.

@MaxRev-Dev
Copy link

@HowardHonig install it like any other extension via cmd.
Open terminal (cmd) and type code --install-extension /path/to/vscode-arduino-0.4.4-rc1.vsix then reload VSC.

@HowardHonig
Copy link

MaxRev_Dev: Thanks for the suggestion as I learned a lot more about how extensions are applied. So now I have to figure out how to make a .vsix file out of all the code. NO THANKS. I'll wait for it to be released and just not upgrade VSC.

@HowardHonig
Copy link

MaxRev-Dev: Totally didn't see that, and got the rc1 installed. Thanks for the help.

@gnicki2000
Copy link

gnicki2000 commented Aug 26, 2021

MaxRev-Dev: Totally didn't see that, and got the rc1 installed. Thanks for the help

@HowardHonig
Pls help, how did u install this?

@MaxRev-Dev
Copy link

@gnicki2000 Sorry, somehow lost my previous message.
I told about the release section. Download VSIX 0.4.4-rc2. And install with terminal/cmd code --install-extension /path/to/.vsix

@gnicki2000
Copy link

@MaxRev-Dev
Thank u very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
serial Issues with serial ports
Projects
None yet
Development

No branches or pull requests