maxwellhadley / node-red-contrib-rfxcom

node-RED nodes to access an RFXtrx433 transceiver
BSD 2-Clause "Simplified" License
22 stars 13 forks source link

Problem with Docker Node-Red #132

Closed vampywiz17 closed 5 months ago

vampywiz17 commented 1 year ago

Hello there,

I try to migrate my local Node-RED install to Docker, but if this node is active, the Node-RED can not start...

Seems the problem is connect this (the error message is same):

https://github.com/serialport/node-serialport/issues/2438

28 May 10:54:17 - [info] 
Welcome to Node-RED
===================
28 May 10:54:17 - [info] Node-RED version: v3.0.2
28 May 10:54:17 - [info] Node.js  version: v16.20.0
28 May 10:54:17 - [info] Linux 6.2.0-20-generic x64 LE
28 May 10:54:17 - [info] Loading palette nodes
28 May 10:54:19 - [info] Settings file  : /data/settings.js
28 May 10:54:19 - [info] Context store  : 'default' [module=memory]
28 May 10:54:19 - [info] User directory : /data
28 May 10:54:19 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 May 10:54:19 - [info] Flows file     : /data/flows_ubuntu.json
28 May 10:54:19 - [info] Server now running at http://127.0.0.1:1880/
28 May 10:54:19 - [info] Starting flows
28 May 10:54:19 - [info] Started flows
./entrypoint.sh: line 14:     7 Segmentation fault      (core dumped) /usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}"
maxwellhadley commented 1 year ago

That looks like a segmentation fault coming from NodeJS itself - not seen that before. In theory, that should never happen, no matter how messed up the JavaScript is. I suspect it's something to do with serialport, which node-red-contrib-rfxcom depends on, as I have seen a lot of (different) issues arising with the serialport/Docker combination recently.

It might be worth checking for NodeJS bug reports, too

vampywiz17 commented 1 year ago

@maxwellhadley

serial node do similar segmentation fault. It cause a specific version of serial port pre-compiled binary. This commit will try to fix it.

https://github.com/node-red/node-red-nodes/pull/999

https://github.com/node-red/node-red-nodes/issues/894

it help you a bit?

hardillb commented 1 year ago

node-serialport v11 should include the fix, you will need to kick/poke upstream dependencies to pick it up

vampywiz17 commented 1 year ago

Hello @maxwellhadley

What do you think, it possible to fix this problem?

maxwellhadley commented 5 months ago

Version 2.13.0 now published to npm uses serialport 11.x.x, to retain compatibility with NodeJS v14. This should fix your issue