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|
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
is anyone even looking to this issues???????
Same Issue. Started happening after an update came to our Visual Studio Code.
Same issue, but on a mac!
Every update of vscode bring more bug to arduino? Maybe 1.42 is good for vscode-arduino.
Still not working :<
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.
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.
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:Usersxxxxxx.vscodeextensionsvsciot-vscode.vscode-arduino-0.3.2outnode_modulesusb-detectionbuildReleasedetection.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).
Same issue here. I can still overwrite the COM via the file, but the serial port still won't connect.
Same Here Cant Connect to Serial Port from the interface.
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!
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...
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 aboveenjoy!
It work Thanks
@kseyhan You sir are a steely-eyed missile man!
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.
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!
@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.
Cool, I'll give it a shot then. Thanks...
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)
by a quick search the solution to this seems to simply be to rebuild the sass module aswell.
npm rebuild node-sass
@kseyhan thanks - I'll try that!
Go team go!
@boskoe Love the support!
@kseyhan I rebuilt the dependencies successfully for NPM, still get this error
[13:36:04] Using gulpfile ~vscode-arduinogulpfile.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)
@RBM-PITT Did you do a rebuild of Sass as was done to the electron node?
@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:Usersrobmavscode-arduinonode_modulesnode-sass
npm ERR! command failed
npm ERR! command C:WINDOWSsystem32cmd.exe /d /s /c "node scripts/build.js"
npm ERR! Building: C:Program Filesnodejsnode.exe C:Usersrobmavscode-arduinonode_modulesnode-sassnode_modulesnode-gypbinnode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
sry, cant help you there. i just tried to reproduce it on windows right now but had to abort since i didnt had enough free space on my harddrive to install visual studio and the other dependencies that are needed to compile binaries on windows. someone else has to come up with the solution i guess.
You two are far past my programming skills. I did a bit of Googling though and came up with this bit of distressing information.
Reading the related issues to this on the vscode github indicates that no fix will come from within vscode.
This sounds like I shouldn't bother trying to update my Windows machine and either switch to a linux machine or just configure it using the json file...
Linux seems to work fine with the fix presented by @kseyhan. Even on a RaspberryPi 4. So I'm going to do just that as there are some very nice improvements in the later versions of vscode and C++.
Yeah, I think I'll be doing the same thing...
@RBM-PITT ok i guess the better solution is this then. pls report back if that works out.
git clone https://github.com/microsoft/vscode-arduino
cd vscode-arduino
npm i
npm i -D electron-rebuild
./node_modules/.bin/electron-rebuild -v9 -o usb-detection,bindings
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
@kseyhan After completing this I get
Failed to open serial port COM6 due to error: + Error: \\?\c:\Users\Andrew Bullock\.vscode\extensions\vsciot-vscode.vscode-arduino-0.3.2\out\node_modules\usb-detection\build\Release\detection.node is not a valid Win32 application. \\?\c:\Users\Andrew Bullock\.vscode\extensions\vsciot-vscode.vscode-arduino-0.3.2\out\node_modules\usb-detection\build\Release\detection.node
@trullock have you build that binary on a windows machine or did you copy it from a linux machine over?
@kseyhan built on the same windows machine as VSC, using node 12.19.0 x32, VS2019 and VSC 1.50.1
grrrrr... i had to uninstall my game from my windows machine to test that now.. ( you guys owe me a beer!)
@trullock it works for me
i guess your VS2019 isnt supported to build the npm modules.
run
npm install --global windows-build-tools
from an elevated cmd prompt before running the commands.
Don't bother. I've already finished feature matching and shortly I'll be putting out an arduino extension that
I'm not going to feature match debugging because most users don't have the specialised hardware for it.
I _am_ going to manage the search paths so that intellisense works.
Search path management is the only outstanding item.
I do need volunteers for testing.
Originally I set out to fix the problem causing #1113 but at root it's a consequence of a poor design choice and it turned out to be way less work to just wrap the Arduino CLI. Because I'm just shelling it the whole native integration nightmare goes away.
Out of respect to the people who got us this far I must point out that the Arduino CLI is quite new and was not an option available to them when they made their choices.
@PeterWone why arent you extending this extension instead of creating a complete new one?
@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
@kseyhan because I did everything completely differently and reached feature parity in 400LOC
@PeterWone uhm, yes well... i'm curious how it turns out then.
@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.
@PeterWone +1 for your approach, let us know where to post the beer
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.
@PeterWone I can test Windows 10 & Ubuntu
@RBM-PITT smashing, I'll get set up (it's not on github at the moment) and get back to you with the details.
I can test on two diff Win10
@PeterWone I can test Windows 10 x64 and Debian 10
OK volunteers, let's move the discussion.
https://github.com/PeterWone/vscode-arduino-cli
Oh lawd if you fix the C++ intellisense I will literally ship you beer from the UK to AU
Volunteered!
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.
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
@maddogjt nice work, this works for me
@maddogjt work for me too, thanks !
"I've published a rebuild of v0.3.2 with"
work. Thx.
@CodeNameHawk Why have you closed this? 0.3.2 is still broken.
@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.
@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
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.
@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...
@srevid Thanks. Did as you said, restarted, problem remains. Bummer.
@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.
@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.
@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.
@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.
Most helpful comment
Don't bother. I've already finished feature matching and shortly I'll be putting out an arduino extension that
I'm not going to feature match debugging because most users don't have the specialised hardware for it.
I _am_ going to manage the search paths so that intellisense works.
Search path management is the only outstanding item.
I do need volunteers for testing.
Originally I set out to fix the problem causing #1113 but at root it's a consequence of a poor design choice and it turned out to be way less work to just wrap the Arduino CLI. Because I'm just shelling it the whole native integration nightmare goes away.
Out of respect to the people who got us this far I must point out that the Arduino CLI is quite new and was not an option available to them when they made their choices.