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

COM port issue #596

Closed
lamqhoang opened this issue Jun 20, 2018 · 19 comments
Closed

COM port issue #596

lamqhoang opened this issue Jun 20, 2018 · 19 comments
Assignees
Labels

Comments

@lamqhoang
Copy link

I have issues with the COM port recently.
The COM port list does not show up when I click on the "Select Serial Port". I can set the COM port in the setting json and upload to Arduino board without issue. But if I try to open the port, the error message below show up.

Failed to open serial port COM4 due to error: + TypeError: Cannot read property 'close' of null

image
VScode and arduino extension are updated to latest version. The COM port is not in used

@czgtest
Copy link
Contributor

czgtest commented Jun 21, 2018

@lamqhoang VSCode insider will repro on this issue, Can you use VSCode stable ?

VSCode insider has been upgraded to node.js >8.0 , This will have breaking changes on the native module on vscode arduino. we will fix this issue next.

@czgtest czgtest added the bug label Jun 21, 2018
@lamqhoang
Copy link
Author

This issue is resolved in the latest VSCode insider.

@czgtest
Copy link
Contributor

czgtest commented Jul 6, 2018

The Nodejs of VSCode insider is reverted to 7.9, so it work well now.

@czgtest czgtest closed this as completed Jul 6, 2018
@kjcolley7
Copy link

kjcolley7 commented Dec 20, 2018

I believe this issue is present again in recent VSCode Insiders versions. Happens to me on 1.31.0-insider for Mac.

Snippet from Developer Tools:

TypeError: Cannot read property 'close' of null
	at Object.<anonymous> (bindings.js:27)
	at Object.<anonymous> (bindings.js:46)
	at Module.t._initNodeRequire.r._compile (loader.js:721)
	at Object.Module._extensions..js (internal/modules/cjs/loader.js:722)
...

This exception is generated from the node-usb-native library.

Update

I just installed the standard VSCode (non-insiders) and both the serial port selection dialog and serial monitor are working there. It appears that it is only broken on VSCode Insiders.

@Sneezry
Copy link
Member

Sneezry commented Dec 20, 2018

@kjcolley7 this issue has been fixed with #731, and you can use Arduino extension in insiders with next release.

@bluefate
Copy link

Getting the error in latest insiders version.
Failed to open serial port COM3 due to error: + TypeError: Cannot read property 'close' of null

@doddydigitaldesign
Copy link

I'm having the same error as @bluefate .
VSCode-Insiders version: 1.36.0

@q10359443
Copy link

image

@q10359443
Copy link

I found the same mistake
VSCode-Insiders version: 1.36.0-insider
image

VSCode version: 1.36.0
image

@q10359443
Copy link

@lamqhoang @czgtest

@j3rrey
Copy link

j3rrey commented Jul 5, 2019

Newest VSCode and Arduino plugin.
I'm not able to choose the correct port.
In the Arduino Ide everything works as expected
Screen Shot 2019-07-05 at 12 59 56

Explicity defining it in .vscode/adruino.json works
On mac with Arduino/Genuino Uno I use "port": "/dev/cu.usbmodem1421",

My arduino.json

{
    "sketch": "Blink.ino",
    "port": "/dev/cu.usbmodem1421",
    "board": "arduino:avr:uno",
    "programmer": "AVRISP mkII"
}

Serial monitor Problem persists tho
Failed to open serial port /dev/cu.usbmodem1421 due to error: + TypeError: Cannot read property 'close' of nu

@rido-min
Copy link
Member

rido-min commented Jul 5, 2019

same here

@githubUnknownUser
Copy link

Have anyone found the solution for this issue?

@rido-min
Copy link
Member

rido-min commented Jul 5, 2019

rollback VSCode to 1.35

@githubUnknownUser
Copy link

Thank you very much, rollback to 1.35 did the trick!

Here's the link if anyone need:
https://code.visualstudio.com/updates/v1_35

@danieldiasm
Copy link

Yeah, 1.35 User worked out for me too. Thanks!!

@DanwithArduino
Copy link

1.36 generates no response when trying to change serial port, but 1.35 and 1.34 crashes the arduino extension when trying to change the port.

@huba71
Copy link

huba71 commented Nov 11, 2019

Unfortunately 1.40 breaks the com port again. 1.39.2 seems to work. (on Mac OSX at least)

@Mechanikerlegion511
Copy link

ВОТ зачем делать обновления после которых не чего не работает?????????????????

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

No branches or pull requests