New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Opening \\.\ COM8: Access Denied #333
Comments
This bit of non (node-serialport) code does work on my system to read the com-port by the way:
|
@humblewizard what type of device are you connecting? And when you say "does not work" can you provide a bit more context/color? I don't have a win 7 setup with your device handy. Does it just not do anything or does it not output anything or does it error? |
The only experience I've had with this came when I would not properly close a device between runs of a program, and I would get that exact error the next iteration of the program. Try unplugging and replugging the device between runs. You may also be accidentally leaving the terminal connected to the desired COM port, so make sure your program is the first thing you try to run after plugging the device back in (and doublechecking the COM port didn't change obviously). |
I'm getting exact same issue. Any clue why this would be happening? Thanks. |
Very same here. WIN7x64 |
I have things running perfectly fine on my surface here. Any chance you Chris Williams @voodootikigod http://twitter.com/voodootikigod | GitHub The things I make that you should check out: Help me end the negativity on the internet, share this On Mon, Jan 5, 2015 at 8:23 AM, Valerij Primachenko <
|
I have hit this issue today. Windows 7 (64bit) and the node-serialport 1.4.10 and node-webkit (not sure if this is causing issues) 0.11.5 to reproduce: Hopefully this helps shed a little more light on what is happening. I'm not fully convinced it is anything wrong with the library, maybe I'm just doing something wrong. Edit: I did muck things up, I solved the issue of it not allowing me to close and reopen, however refreshing the application still breaks it. here is a gif outlining what I see you'll see I've added a few logs to describe the events I'm seeing. This isn't actually a problem for me as I'll be hiding those options for my application, however again, hopefully this helps others sort their issues. |
I'm seeing this as well on node-webkit when I don't explicitly close opened ports before refreshing the application. Only closing and re-opening the node-webkit application seems to make the ports usable again. The ports are also unusable from other applications until node-webkit is closed so it's more likely node-webkit issue rather then the serialport library fault. I'm running windows 8.1 64bit, node v0.11.13-pre, node-webkit 0.11.2. |
I can also reproduce a similar bug in Node Webkit (0.7.5). To reproduce it, open an active port, and once it starts receiving data, close it. The port only becomes free, after restarting Node Webkit. I've tried to purge the Node Serialport reference from the require cache, but that didn't work. |
Ignore the last post. The bug I encountered was a result of not clearing the last created object, and it's event handlers. |
Lucky man. I still am getting this on simple access nodejs/node-v0.x-archive#6125
(huawei modem, worked on node 0.7 somehow)... |
I have the same issue. Getting a
Windows8.1. |
Would there be a workaround to test what exactly fails? What I know at the moment
This is the program I have:
|
Hrm. Just saw this or something similar today testing some windows stuff. For me It was my code, It turns out I was opening a port that I thought I had lazy opened. var serialPort = new com.SerialPort(path, {
baudrate: 9600,
}); \\NOTICE NOT FALSE
serialPort.open();
|
Thanks. So how did you change your code to get it working? |
This may or may not be your problem, but In my case you cant open a port thats trying to open. I used the lazy opening pattern by adding false so I could still explicitly open. var serialPort = new com.SerialPort(path, {
baudrate: 9600,
}, false);
serialPort.open(); My finding was interesting (to me) because we now know you can block yourself from accessing the port. |
He Jacob, thanks. I'm not sure whether this is the problem that I'm having, since I get the error at the very moment that I create the SerialPort (even without an explicit .open()) but maybe it helps to lazy open the port, and then explicitly call .open() on it. Let's see! |
Hi @ all, I'm currently stuck on the "Access denied"-problem on a win7 x64. I'm not 100% sure if its an interesting thing, but since the error comes instantaneously when creating the serial port it investigated it a little. Since it shouldn't access the port at the time of creation the error kind of makes no sense. My compiled bindings are laying under:
When the port is created
whereas When just executing Running I might be on the completely wrong track here - but perhaps it's worth looking into this. |
I finally have solved the problem... at least for me After setting the windows permissions on the After fiddling around with node-pre-gyp for a while this one worked for me:
I had to move the resulting file into |
I had exactly this issue, when other program was using the specified COM port, so node wasnt able to access it. |
I'm having the same issue.
I can open I've tried running node as administrator. Windows 8.1 x64 |
Had the same error and the comment from @jacobrosenthal about lazy loading worked for me. Thanks! |
I'm having also this issue. Can someone tell me where to put the code that jacobrosenthal postet ? |
Creating a SerialPort object will open your port for you unless you tell it not to. When you call The docs on I'm going to close this issue for now. |
Same issue with COM9. Both ports are usable by terminal program.
serialPort.list(); reports all of the ports on the system successfully.
sp1.close(); reports that the port is not currently open.
The OS is Windows 7 and the cmd.exe is opened as Admin before launching node.js
result: Error: Opening .\ COM8: Access Denied
The text was updated successfully, but these errors were encountered: