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

Can't Select Serial Port #1113

Closed
CodeNameHawk opened this issue Oct 8, 2020 · 67 comments
Closed

Can't Select Serial Port #1113

CodeNameHawk opened this issue Oct 8, 2020 · 67 comments

Comments

@CodeNameHawk
Copy link

Issue Type: Bug

Can't Select Serial Port

Extension version: 0.3.2
VS Code version: Code 1.49.3 (2af051012b66169dde0c4dfae3f5ef48f787ff69, 2020-10-02T17:56:11.027Z)
OS version: Linux x64 5.4.0-48-generic

System Info
Item Value
CPUs Pentium(R) Dual-Core CPU T4500 @ 2.30GHz (2 x 2100)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 3.81GB (1.22GB free)
Process Argv --no-sandbox --unity-launch --crash-reporter-id 02ee2987-17b5-4cfb-9854-12b20aba17e2
Screen Reader no
VM 0%
DESKTOP_SESSION xubuntu
XDG_CURRENT_DESKTOP XFCE
XDG_SESSION_DESKTOP xubuntu
XDG_SESSION_TYPE x11
@zhengzichun
Copy link

I have similar issue.

Version: 1.49.3 (system setup)
Time: 2020-10-02T17:57:01.595Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 6.1.7601

CPUs | Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz (4 x 2594)

GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: unavailable_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: unavailable_off skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled

Extension | Author (truncated) | Version
vscode-language-pack-zh-hans | MS- | 1.49.2
python | ms- | 2020.9.114305
cpptools | ms- | 1.0.1
vscode-arduino | vsc | 0.3.2

@cdelcristo
Copy link

is anyone even looking to this issues???????

@ayushsharma82
Copy link

Same Issue. Started happening after an update came to our Visual Studio Code.

@kevtan
Copy link

kevtan commented Oct 10, 2020

Same issue, but on a mac!

@RiverShi
Copy link

Every update of vscode bring more bug to arduino? Maybe 1.42 is good for vscode-arduino.

@rrakso
Copy link
Contributor

rrakso commented Oct 14, 2020

Still not working :<

@Seefer
Copy link

Seefer commented Oct 14, 2020

I'm trying to follow the IoT DevKit tutorial for the mxchip device and running into this issue of simply trying to select the COM port too. This is not a beginner-friendly state for an extension to be in. It's been suggested I try PlatformIO until the problems with this extension are resolved.

@homechicken
Copy link

Same issue here, on both MacOS and Windows 10: I can't select a port (although I can specify it in the arduino.json file). Also, it errors when I try to open the serial monitor.

@alex-maha
Copy link

Broken here too.

Version: 1.50.1 (user setup)
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Also, clicking on the Open Seriual Monitor gives the following error:

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

@Emergency1999
Copy link

Same issue here. I can still overwrite the COM via the file, but the serial port still won't connect.

@StealthAdder
Copy link

Same Here Cant Connect to Serial Port from the interface.

@kseyhan
Copy link

kseyhan commented Oct 20, 2020

Hi,
for everyone suffering this i figured out how to manualy build the plugin to make everything work with the latest version of vscode.

To build the plugin do the following:

 git clone https://github.com/microsoft/vscode-arduino
 cd vscode-arduino
 npm i
 npm i -D electron-rebuild
 ./node_modules/.bin/electron-rebuild -v9
 npm i -g gulp
 ./node_modules/.bin/gulp build
 rename the out folder in the vscode plugins directory to have a backup (~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.3.2/out)
 copy over the "out" folder from the freshly build folder over to the plugins folder mentioned above

enjoy!

@ghost
Copy link

ghost commented Oct 20, 2020

Hi,
for everyone suffering this i figured out how to manualy build the plugin to make everything work with the latest version of vscode.

Working on this now...thanks for posting!

Update: That didn't work...I use this as a hobby and I'm not a programmer. I followed the steps using a linux machine. But, VSC is installed on my Windows 10 machine. Copying the output folder from one to the other apparently doesn't work...but, it was worth a shot...

@cdelcristo
Copy link

Hi,
for everyone suffering this i figured out how to manualy build the plugin to make everything work with the latest version of vscode.

To build the plugin do the following:

 git clone https://github.com/microsoft/vscode-arduino
 cd vscode-arduino
 npm i
 npm i -D electron-rebuild
 ./node_modules/.bin/electron-rebuild -v9
 npm i -g gulp
 ./node_modules/.bin/gulp build
 rename the out folder in the vscode plugins directory to have a backup (~/.vscode/extensions/vsciot-vscode.vscode-arduino-0.3.2/out)
 copy over the "out" folder from the freshly build folder over to the plugins folder mentioned above

enjoy!

It work Thanks

@boskoe
Copy link

boskoe commented Oct 21, 2020

@kseyhan You sir are a steely-eyed missile man!

@kseyhan
Copy link

kseyhan commented Oct 21, 2020

Hi,
for everyone suffering this i figured out how to manualy build the plugin to make everything work with the latest version of vscode.

Working on this now...thanks for posting!

Update: That didn't work...I use this as a hobby and I'm not a programmer. I followed the steps using a linux machine. But, VSC is installed on my Windows 10 machine. Copying the output folder from one to the other apparently doesn't work...but, it was worth a shot...

@HEMISixty Its no wonder it doesnt work when you build elf binaries for your windows machine. You have to install nodejs on your windows machine and build it there if you want to to use the ide on windows.

@ghost
Copy link

ghost commented Oct 21, 2020

Yeah, like I said, it was worth a shot. If someone were to post a set of steps, like you did, for Windows, that would be awesome.

Like I said, this is an LED hobby for me and I'm not a developer. But, what the heck, I suppose I could give it all a shot to figure out and post the steps if I'm successful.

Then again, I'm tempted to build a Linux machine and go that route instead...

Anyway, your steps are beneficial to some folks and it's cool of you to post a solution.

Cheers!

@kseyhan
Copy link

kseyhan commented Oct 21, 2020

@HEMISixty the commands should all be the same for windows. you maybe have to adjust the slashes to fit the windows convention that should be it.

@ghost
Copy link

ghost commented Oct 21, 2020

Cool, I'll give it a shot then. Thanks...

@RBM-PITT
Copy link

When running in Windows - make sure you run as administrator.

Also, this could be a problem depending on your build of Windows:
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)

@kseyhan
Copy link

kseyhan commented Oct 21, 2020

by a quick search the solution to this seems to simply be to rebuild the sass module aswell.
npm rebuild node-sass

@RBM-PITT
Copy link

@kseyhan thanks - I'll try that!

@boskoe
Copy link

boskoe commented Oct 21, 2020

Go team go!

@RBM-PITT
Copy link

@boskoe Love the support!
@kseyhan I rebuilt the dependencies successfully for NPM, still get this error
[13:36:04] Using gulpfile ~\vscode-arduino\gulpfile.js
[13:36:04] Starting 'build'...
[13:36:04] Starting 'clean'...
[13:36:04] Finished 'clean' after 136 ms
[13:36:04] Starting 'ts-compile'...
[13:36:11] Finished 'ts-compile' after 6.74 s
[13:36:11] Starting 'html-webpack'...
[13:36:33] Error (webpack): ./app/styles/board.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (88)

@boskoe
Copy link

boskoe commented Oct 21, 2020

@RBM-PITT Did you do a rebuild of Sass as was done to the electron node?

@RBM-PITT
Copy link

@boskoe I did the rebuild as @kseyhan called out : npm rebuild node-sass

If i do it with the "npm i -D node-sass" it fails on a path error.

npm ERR! code 1
npm ERR! path C:\Users\robma\vscode-arduino\node_modules\node-sass
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c "node scripts/build.js"
npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\robma\vscode-arduino\node_modules\node-sass\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

@kseyhan
Copy link

kseyhan commented Oct 22, 2020

@trullock
another option might be to simply specify your arch when running the electron-rebuild.

./node_modules/.bin/electron-rebuild -v9 -o usb-detection,bindings -a yourarchnamehere

@PeterWone
Copy link
Contributor

@kseyhan because I did everything completely differently and reached feature parity in 400LOC

@kseyhan
Copy link

kseyhan commented Oct 22, 2020

@PeterWone uhm, yes well... i'm curious how it turns out then.

@PeterWone
Copy link
Contributor

PeterWone commented Oct 22, 2020

@kseyhan The Arduino extension from the Microsoft China team (this repo) uses undocumented interfaces to call into the Arduino IDE, that's how it compiles and deploys. My stuff uses documented supported CLIs. I think it has more future. USB serial device enumeration is slower but it's not even a first release yet. I have had input from the Arduino CLI dev team which certainly sped development up. It started out as a proof of concept but ten days later I realised that apart from debugging I had feature parity. The Arduino CLI is available on all the VS Code platforms and it handles everything. All of my extension code is concerned with UX and integration. That's why it's so much smaller.

@trullock
Copy link

@PeterWone +1 for your approach, let us know where to post the beer

@PeterWone
Copy link
Contributor

PeterWone commented Oct 22, 2020

Thank you, but what I need is testers and feedback. My other extension has a perfect record of five star reviews and I'd like to maintain that standard but this code has very large surface making QC a hell of a job. I can only test Windows. I need volunteers representing other platforms, especially once I build the path management bits.

@RBM-PITT
Copy link

@PeterWone I can test Windows 10 & Ubuntu

@PeterWone
Copy link
Contributor

@RBM-PITT smashing, I'll get set up (it's not on github at the moment) and get back to you with the details.

@trullock
Copy link

I can test on two diff Win10

@boskoe
Copy link

boskoe commented Oct 22, 2020

@PeterWone I can test Windows 10 x64 and Debian 10

@PeterWone
Copy link
Contributor

OK volunteers, let's move the discussion.
https://github.com/PeterWone/vscode-arduino-cli

@trullock
Copy link

Oh lawd if you fix the C++ intellisense I will literally ship you beer from the UK to AU

@ghost
Copy link

ghost commented Oct 22, 2020

Volunteered!

@PeterWone
Copy link
Contributor

People, please lets move this to the new repo. Partly for our own convenience and partly out of respect to MS China who got us this far.

@maddogjt
Copy link
Contributor

I've published a rebuild of v0.3.2 with the serial packages rebuild on the proper interface for anyone who needs. https://github.com/maddogjt/vscode-arduino/releases/download/v0.3.2%2Bserialfix/vscode-arduino-0.3.2+serialfix.vsix

@trullock
Copy link

@maddogjt nice work, this works for me

@srevid
Copy link

srevid commented Oct 27, 2020

@maddogjt work for me too, thanks !

@CodeNameHawk
Copy link
Author

CodeNameHawk commented Oct 27, 2020

"I've published a rebuild of v0.3.2 with"
work. Thx.

@trullock
Copy link

@CodeNameHawk Why have you closed this? 0.3.2 is still broken.

@CodeNameHawk
Copy link
Author

CodeNameHawk commented Oct 27, 2020

@CodeNameHawk Why have you closed this? 0.3.2 is still broken.

Try manually uninstall 0.3.2, and install 0.3.2+serialfix from link above.

Now you see plugin name 0.3.2+serialfix.
Checked, works on XUbuntu and windows10.

@trullock
Copy link

trullock commented Oct 27, 2020

@CodeNameHawk haha apologies, I though you were the maintainer! Still, I wouldn't close this or the maintainers don't know it's still an issue

@JohnMacHeli
Copy link

I uninstalled v0.3.2 and tried to install your rebuild on Windows 10 and got error "10/28/2020 1:30:41 PM - Initializing Install...
10/28/2020 1:30:41 PM - Microsoft.VisualStudio.ExtensionManager.InvalidExtensionManifestException: Element 'Identity' has invalid value for attribute 'Version' ---> System.FormatException: Input string was not in a correct format.

@srevid
Copy link

srevid commented Oct 28, 2020

@JohnMacHeli You have to go through visual studio code to install the new plugin. In the plugins window, click on the menu (three points) > Install from VSIX...

@JohnMacHeli
Copy link

@srevid Thanks. Did as you said, restarted, problem remains. Bummer.

@maddogjt
Copy link
Contributor

@JohnMacHeli Hmm, I just repeated the process to verify that it's working for me and it installed without issue. I'm testing on VSCode build 1.50.1 running on Win10.

I took a look through my settings, and it doesn't look like I've enabled any "developer mode" type settings that would possibly change the handling of version nubers.

The only thing that I can think is for some reason you VS does not like the "+serialfix" portion of the build number, although it is valid by semantic versioning rules. To test this, I can try to send you a build without that portion of the version number if you'd like.

@JohnMacHeli
Copy link

@srevid I am also running VSCode 1.50.1 on Win10. I don't think it is the +serialfix problem. After VSIX... it tells me to restart to complete installing....which I do. It compiles and uploads my code fine, except for a 15sec pause looking for Serial discovery as others have noted. Program runs but fails to connect Monitor on COM port. I'm no expert in all this, so I may just be doing something wrong.

@srevid
Copy link

srevid commented Oct 28, 2020

@JohnMacHeli mine was not on COM port but on COM4. I noticed this when I ran the Arduino program and looked at which port it was plugged into, otherwise I don't know how to tell in VSC.

@JohnMacHeli
Copy link

@srevid I got your original (with the +serialfix) rebuild to work fine. Operator error on my part. Now the Serial Port Select option work and I can use the Serial Monitor icon at bottom connects to specified COM port. Get all output as expected. Thanks very much for your help...much appreciated.

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

No branches or pull requests