You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you trying to do?
When disconnecting the USB connection of an open port that was already used for a write command on Mojave 10.14.6 and Electron 1.8.0 nor ERROR or CLOSE Events are thrown
What happens?
It can be seen that the debugger throws endless loop traces
serialport/bindings/poller error Error: bad file descriptor +0ms
Which brings the process to virtually hang. We also use the USB Library to identify connects and disconnects. But in this case even these handlers are not reached anymore
What should have happened?
An error should be thrown or a disconnect or close event
Code to Reproduce the Issue
consttransport=function({ comName }){returnnewPromise((resolve,reject)=>{// Argument validationif(!comName||typeofcomName!=='string'){reject(newError('\"comName\" argument of type String required'))}// SerialTransport objectconstport=newSerialPort(comName,{lock: false,baudRate: 57600,dataBits: 8,stopBits: 1,parity: 'odd'});// SerialTransport eventsport.on('open',function(){console.log('Opening port ',comName);resolve(port)});port.on('error',function(error){console.log('Error on port ',comName);reject(error)});port.on('close',function(error){console.log('Close on port ',comName);reject(error)});})}module.exports=transport// Code
Versions, Operating System and Hardware
SerialPort@?
"serialport": "^7.1.5",
Node.js v?
8.2.1
Windows? Linux? Mac?
MAC
Hardware and chipset? (Prolific/FTDI/Other)
microchip mcp2200
This worked however on previous OSX Versions
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week no further activity occurs. Feel free continue the discussion or ask for a never-stale label to keep it open. If this is a support issue, consider sharing it on stack overflow to get more eyes on your problem.
Summary of Problem
(Please answer all 3)
When disconnecting the USB connection of an open port that was already used for a write command on Mojave 10.14.6 and Electron 1.8.0 nor ERROR or CLOSE Events are thrown
It can be seen that the debugger throws endless loop traces
serialport/bindings/poller error Error: bad file descriptor +0ms
Which brings the process to virtually hang. We also use the USB Library to identify connects and disconnects. But in this case even these handlers are not reached anymore
An error should be thrown or a disconnect or close event
Code to Reproduce the Issue
Versions, Operating System and Hardware
SerialPort@?
"serialport": "^7.1.5",
Node.js v?
8.2.1
Windows? Linux? Mac?
MAC
Hardware and chipset? (Prolific/FTDI/Other)
microchip mcp2200
This worked however on previous OSX Versions
The text was updated successfully, but these errors were encountered: