node-serialport: serialport@10.3.0 fails in docker container on rpi
SerialPort Version
10.3.0
Node Version
v14.19.0
Electron Version
No response
Platform
Linux raspberrypi 5.10.92-v7+ #1514 SMP Mon Jan 17 17:36:39 GMT 2022 armv7l GNU/Linux
Architecture
ARM
Hardware or chipset of serialport
QinHeng Electronics CH340
What steps will reproduce the bug?
I’ve created a repository at https://github.com/avakarev/serialport-docker-rpi to reproduce the issue.
Clone it and then:
make run-v9 # v9.2.8 on rpi
Using serialport ^9.2.8
serialport/stream opening path: /dev/ttyUSB0 +0ms
serialport/binding-abstract open +0ms
serialport/bindings/poller Creating poller +0ms
serialport/stream opened path: /dev/ttyUSB0 +10ms
port successfully opened
make docker-run-v9 # v9.2.8 on rpi in docker container
Using serialport ^9.2.8
2022-02-23T17:19:07.255Z serialport/stream opening path: /dev/ttyUSB0
2022-02-23T17:19:07.256Z serialport/binding-abstract open
2022-02-23T17:19:07.266Z serialport/bindings/poller Creating poller
2022-02-23T17:19:07.267Z serialport/stream opened path: /dev/ttyUSB0
port successfully opened
make run-v10 # v10.3.0 on rpi
Using serialport ^10.3.0
serialport/stream opening path: /dev/ttyUSB0 +0ms
serialport/bindings-cpp open +0ms
serialport/bindings-cpp/poller Creating poller +0ms
serialport/stream opened path: /dev/ttyUSB0 +11ms
port successfully opened
make docker-run-v10 # v10.3.0 on rpi in docker container
Using serialport ^10.3.0
2022-02-23T17:20:48.142Z serialport/stream opening path: /dev/ttyUSB0
2022-02-23T17:20:48.144Z serialport/bindings-cpp open
make[1]: *** [Makefile:8: _docker_run] Error 139
What happens?
serialport
exits with 139 and have no stacktrace despite DEBUG=serialport*
What should have happened?
serialport
should successfully open given port
Additional information
The alpine base image v12 used in demo repo is kinda outdated, but same behavior is met with alpine v14 and v15
Original discussion started at https://github.com/Koenkk/zigbee2mqtt/issues/11545
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 27 (8 by maintainers)
Commits related to this issue
- Add npm rebuild from source https://github.com/serialport/node-serialport/issues/2438 — committed to gtricot/rpict-mqtt by deleted user 2 years ago
- fix: update build tools and fix arm64 build for rpi (#111) Two problems to fix with this one - our rpi arm64 isn't working possibly because our libc is too new, so we'll target the lts of arm64, wor... — committed to serialport/bindings-cpp by reconbot a year ago
@reconbot Can we get an update on my request to remove the pre-built binaries as a work around to this problem, as it is shipping no binaries is 100% better than shipping broken binaries.
Still seeing this with 10.3.0 and 10.7.0 bindings-cpp.
Running
npm rebuild --build-from-source
works, but the pre-built binaries crash.Can we please get the broken binaries remove, it really is the right (temporary) solution to this problem.
The bug has been open of over a year and there is a simple working solution available
I discovered this problem on a raspberry pi 4 with node-red and node-red-node-serialport. This problem cost me a lot of time as node-red crashed without error. The error seems to originate from node-serialport and can be fixed by building the packages from source. It would be good to fix the root cause of this problem. Thanks!
As this is still broken, can I suggest you remove the broken binaries?
That would force them to be built on install which while adding to the install time does actually work, which has to be 100% better than shipping known broken binaries that will cause an application crash on first use?
@GazHank node-red-node-serialport has been updated with serialport v11 which appear to work