-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Before submitting
- I have searched existing issues to make sure this bug hasn't already been reported
- I have updated to the latest version of the software to verify the issue still exists
- I have cleared cache/cookies/storage or tried in a private/incognito window (if applicable)
Hardware
Not Applicable
Connection Type
Serial
Local or Hosted
Firmware Version
2.6.11
Operating System
Linux
Browser
Node
Expected Behavior
The library should be able to handle the exception without crashing the script.
Actual Behavior
When the device is physically disconnected after the connection was established, it throws and exception and the whole script crashes.
Steps to Reproduce
- Connect to any serial device.
- Disconnect the cable.
- See what happens.
Relevant console output
Uncaught Exception:
14 Nov 12:02:17 - [error] AbortError: The operation was aborted
at SerialPort.<anonymous> (node:internal/webstreams/adapters:442:19)
at SerialPort.<anonymous> (node:internal/util:524:20)
at SerialPort.onclose (node:internal/streams/end-of-stream:153:25)
at SerialPort.emit (node:events:536:35)
at SerialPort.emit (node:domain:489:12)
at port.close.then.closing (/home/galacticus/Downloads/test/node_modules/@serialport/stream/dist/index.js:242:18)Screenshots
No response
Additional Context
I already submitted a PR for another crash that would happen if the serial port was not available during the connection. This one I was unable to fix.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working