Skip to content
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

Illegal invocation (linux) #520

Open
crgAdrian opened this issue Oct 20, 2023 · 0 comments
Open

Illegal invocation (linux) #520

crgAdrian opened this issue Oct 20, 2023 · 0 comments

Comments

@crgAdrian
Copy link

I have an error when im trying to close the port.

this.modbusClient.close()


node:internal/errors:496 Uncaught (in promise) Error: Unhandled error. (SerialPortError {
  name: 'SerialPortError',
  message: 'Illegal invocation',
  errno: 'ECONNREFUSED',
  stack: 'TypeError: Illegal invocation\n' +
    '    at Proxy.stop ({user}/node_modules/modbus-serial/node_modules/@serialport/bindings-cpp/dist/poller.js:89:21)\n' +
    '    at Proxy.close ({user}/node_modules/modbus-serial/node_modules/@serialport/bindings-cpp/dist/linux.js:55:21)\n' +
    '    at Proxy.close {user}/node_modules/modbus-serial/node_modules/@serialport/stream/dist/index.js:232:19)\n' +
    '    at Proxy.close ({user}/node_modules/modbus-serial/ports/rtubufferedport.js:186:22)\n' +
    '    at Proxy.close ({user}/node_modules/modbus-serial/index.js:650:24)\n' +
    '    at /{user}/out/preload/index.js:39:27'
})
    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
    at new NodeError (node:internal/errors:405:5)
    at ModbusRTU.emit (node:events:503:17)
    at ModbusRTU._onError ({user}/node_modules/modbus-serial/index.js:552:10)
    at RTUBufferedPort.emit (node:events:514:28)
    at Proxy.<anonymous> ({user}/node_modules/modbus-serial/ports/rtubufferedport.js:81:18)
    at Proxy.emit (node:events:514:28)
    at Proxy._error ({user}/node_modules/modbus-serial/node_modules/@serialport/stream/dist/index.js:78:18)
    at /{user}2/node_modules/modbus-serial/node_modules/@serialport/stream/dist/index.js:245:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants