node-red / node-red-nodes

Extra nodes for Node-RED
Other
998 stars 595 forks source link

node-red-node-serialport node makes the Docker container infinite boot cycle #1027

Open patrickelectric opened 1 year ago

patrickelectric commented 1 year ago
          I'm having the same problem with 1.0.4.

Install log:

901e3f2035fd:/usr/src/node-red# npm i node-red-node-serialport --loglevel verbose
npm info it worked if it ends with ok
npm verb cli [
npm verb cli   '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'i',
npm verb cli   'node-red-node-serialport',
npm verb cli   '--loglevel',
npm verb cli   'verbose'
npm verb cli ]
npm info using npm@6.14.18
npm info using node@v14.21.3
npm verb npm-session 1a2b8f09188d40b6
npm http fetch GET 200 https://registry.npmjs.org/node-red-node-serialport 125ms (from cache)
npm timing stage:loadCurrentTree Completed in 2109ms
npm timing stage:loadIdealTree:cloneCurrentTree Completed in 10ms
npm timing stage:loadIdealTree:loadShrinkwrap Completed in 1191ms
npm http fetch GET 200 https://registry.npmjs.org/serialport 17ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-cctalk 69ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fbindings-cpp 76ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-byte-length 79ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-inter-byte-timeout 77ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-delimiter 86ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-packet-length 89ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fbinding-mock 103ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-readline 95ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-ready 109ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-regex 110ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-slip-encoder 24ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fparser-spacepacket 28ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fstream 29ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/@serialport%2fbindings-interface 6ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/node-addon-api 24ms (from cache)
npm http fetch GET 200 https://registry.npmjs.org/node-gyp-build 29ms (from cache)
npm timing stage:loadIdealTree:loadAllDepsIntoIdealTree Completed in 1732ms
npm timing stage:loadIdealTree Completed in 3287ms
npm timing stage:generateActionsToTake Completed in 130ms
npm verb correctMkdir /data/.npm/_locks correctMkdir not in flight; initializing
npm verb lock using /data/.npm/_locks/staging-4c3c7748ae1d116d.lock for /usr/src/node-red/node_modules/.staging
npm timing action:extract Completed in 551ms
npm timing action:finalize Completed in 92ms
npm timing action:refresh-package-json Completed in 200ms
npm info lifecycle @serialport/parser-delimiter@11.0.0~preinstall: @serialport/parser-delimiter@11.0.0
npm info lifecycle @serialport/parser-readline@11.0.0~preinstall: @serialport/parser-readline@11.0.0
npm info lifecycle node-addon-api@6.1.0~preinstall: node-addon-api@6.1.0
npm info lifecycle @serialport/bindings-interface@1.2.2~preinstall: @serialport/bindings-interface@1.2.2
npm info lifecycle @serialport/binding-mock@10.2.2~preinstall: @serialport/binding-mock@10.2.2
npm info lifecycle @serialport/parser-byte-length@11.0.1~preinstall: @serialport/parser-byte-length@11.0.1
npm info lifecycle @serialport/parser-cctalk@11.0.1~preinstall: @serialport/parser-cctalk@11.0.1
npm info lifecycle @serialport/parser-delimiter@11.0.1~preinstall: @serialport/parser-delimiter@11.0.1
npm info lifecycle @serialport/parser-inter-byte-timeout@11.0.1~preinstall: @serialport/parser-inter-byte-timeout@11.0.1
npm info lifecycle @serialport/parser-packet-length@11.0.1~preinstall: @serialport/parser-packet-length@11.0.1
npm info lifecycle @serialport/parser-readline@11.0.1~preinstall: @serialport/parser-readline@11.0.1
npm info lifecycle @serialport/parser-ready@11.0.1~preinstall: @serialport/parser-ready@11.0.1
npm info lifecycle @serialport/parser-regex@11.0.1~preinstall: @serialport/parser-regex@11.0.1
npm info lifecycle @serialport/parser-slip-encoder@11.0.1~preinstall: @serialport/parser-slip-encoder@11.0.1
npm info lifecycle @serialport/parser-spacepacket@11.0.1~preinstall: @serialport/parser-spacepacket@11.0.1
npm info lifecycle @serialport/stream@11.0.1~preinstall: @serialport/stream@11.0.1
npm info lifecycle node-gyp-build@4.6.0~preinstall: node-gyp-build@4.6.0
npm info lifecycle @serialport/bindings-cpp@11.0.3~preinstall: @serialport/bindings-cpp@11.0.3
npm info lifecycle serialport@11.0.1~preinstall: serialport@11.0.1
npm info lifecycle node-red-node-serialport@1.0.4~preinstall: node-red-node-serialport@1.0.4
npm timing action:preinstall Completed in 33ms
npm info linkStuff @serialport/parser-delimiter@11.0.0
npm info linkStuff @serialport/parser-readline@11.0.0
npm info linkStuff node-addon-api@6.1.0
npm info linkStuff @serialport/bindings-interface@1.2.2
npm info linkStuff @serialport/binding-mock@10.2.2
npm info linkStuff @serialport/parser-byte-length@11.0.1
npm info linkStuff @serialport/parser-cctalk@11.0.1
npm info linkStuff @serialport/parser-delimiter@11.0.1
npm info linkStuff @serialport/parser-inter-byte-timeout@11.0.1
npm info linkStuff @serialport/parser-packet-length@11.0.1
npm info linkStuff @serialport/parser-readline@11.0.1
npm info linkStuff @serialport/parser-ready@11.0.1
npm info linkStuff @serialport/parser-regex@11.0.1
npm info linkStuff @serialport/parser-slip-encoder@11.0.1
npm info linkStuff @serialport/parser-spacepacket@11.0.1
npm info linkStuff @serialport/stream@11.0.1
npm info linkStuff node-gyp-build@4.6.0
npm verb linkBins [
npm verb linkBins   {
npm verb linkBins     'node-gyp-build': 'bin.js',
npm verb linkBins     'node-gyp-build-optional': 'optional.js',
npm verb linkBins     'node-gyp-build-test': 'build-test.js'
npm verb linkBins   },
npm verb linkBins   '/usr/src/node-red/node_modules/.bin',
npm verb linkBins   false
npm verb linkBins ]
npm timing audit submit Completed in 1097ms
npm http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/audits/quick 1098ms
npm timing audit body Completed in 5ms
npm info linkStuff @serialport/bindings-cpp@11.0.3
npm info linkStuff serialport@11.0.1
npm info linkStuff node-red-node-serialport@1.0.4
npm timing action:build Completed in 96ms
npm info lifecycle @serialport/parser-delimiter@11.0.0~install: @serialport/parser-delimiter@11.0.0
npm info lifecycle @serialport/parser-readline@11.0.0~install: @serialport/parser-readline@11.0.0
npm info lifecycle node-addon-api@6.1.0~install: node-addon-api@6.1.0
npm info lifecycle @serialport/bindings-interface@1.2.2~install: @serialport/bindings-interface@1.2.2
npm info lifecycle @serialport/binding-mock@10.2.2~install: @serialport/binding-mock@10.2.2
npm info lifecycle @serialport/parser-byte-length@11.0.1~install: @serialport/parser-byte-length@11.0.1
npm info lifecycle @serialport/parser-cctalk@11.0.1~install: @serialport/parser-cctalk@11.0.1
npm info lifecycle @serialport/parser-delimiter@11.0.1~install: @serialport/parser-delimiter@11.0.1
npm info lifecycle @serialport/parser-inter-byte-timeout@11.0.1~install: @serialport/parser-inter-byte-timeout@11.0.1
npm info lifecycle @serialport/parser-packet-length@11.0.1~install: @serialport/parser-packet-length@11.0.1
npm info lifecycle @serialport/parser-readline@11.0.1~install: @serialport/parser-readline@11.0.1
npm info lifecycle @serialport/parser-ready@11.0.1~install: @serialport/parser-ready@11.0.1
npm info lifecycle @serialport/parser-regex@11.0.1~install: @serialport/parser-regex@11.0.1
npm info lifecycle @serialport/parser-slip-encoder@11.0.1~install: @serialport/parser-slip-encoder@11.0.1
npm info lifecycle @serialport/parser-spacepacket@11.0.1~install: @serialport/parser-spacepacket@11.0.1
npm info lifecycle @serialport/stream@11.0.1~install: @serialport/stream@11.0.1
npm info lifecycle node-gyp-build@4.6.0~install: node-gyp-build@4.6.0
npm info lifecycle @serialport/bindings-cpp@11.0.3~install: @serialport/bindings-cpp@11.0.3

> @serialport/bindings-cpp@11.0.3 install /usr/src/node-red/node_modules/@serialport/bindings-cpp
> node-gyp-build

npm verb lifecycle @serialport/bindings-cpp@11.0.3~install: unsafe-perm in lifecycle false
npm verb lifecycle @serialport/bindings-cpp@11.0.3~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/node-red/node_modules/@serialport/bindings-cpp/node_modules/.bin:/usr/src/node-red/node_modules/.bin:/usr/src/node-red/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm verb lifecycle @serialport/bindings-cpp@11.0.3~install: CWD: /usr/src/node-red/node_modules/@serialport/bindings-cpp
npm info lifecycle serialport@11.0.1~install: serialport@11.0.1
npm info lifecycle node-red-node-serialport@1.0.4~install: node-red-node-serialport@1.0.4
npm timing action:install Completed in 507ms
npm info lifecycle @serialport/parser-delimiter@11.0.0~postinstall: @serialport/parser-delimiter@11.0.0
npm info lifecycle @serialport/parser-readline@11.0.0~postinstall: @serialport/parser-readline@11.0.0
npm info lifecycle node-addon-api@6.1.0~postinstall: node-addon-api@6.1.0
npm info lifecycle @serialport/bindings-interface@1.2.2~postinstall: @serialport/bindings-interface@1.2.2
npm info lifecycle @serialport/binding-mock@10.2.2~postinstall: @serialport/binding-mock@10.2.2
npm info lifecycle @serialport/parser-byte-length@11.0.1~postinstall: @serialport/parser-byte-length@11.0.1
npm info lifecycle @serialport/parser-cctalk@11.0.1~postinstall: @serialport/parser-cctalk@11.0.1
npm info lifecycle @serialport/parser-delimiter@11.0.1~postinstall: @serialport/parser-delimiter@11.0.1
npm info lifecycle @serialport/parser-inter-byte-timeout@11.0.1~postinstall: @serialport/parser-inter-byte-timeout@11.0.1
npm info lifecycle @serialport/parser-packet-length@11.0.1~postinstall: @serialport/parser-packet-length@11.0.1
npm info lifecycle @serialport/parser-readline@11.0.1~postinstall: @serialport/parser-readline@11.0.1
npm info lifecycle @serialport/parser-ready@11.0.1~postinstall: @serialport/parser-ready@11.0.1
npm info lifecycle @serialport/parser-regex@11.0.1~postinstall: @serialport/parser-regex@11.0.1
npm info lifecycle @serialport/parser-slip-encoder@11.0.1~postinstall: @serialport/parser-slip-encoder@11.0.1
npm info lifecycle @serialport/parser-spacepacket@11.0.1~postinstall: @serialport/parser-spacepacket@11.0.1
npm info lifecycle @serialport/stream@11.0.1~postinstall: @serialport/stream@11.0.1
npm info lifecycle node-gyp-build@4.6.0~postinstall: node-gyp-build@4.6.0
npm info lifecycle @serialport/bindings-cpp@11.0.3~postinstall: @serialport/bindings-cpp@11.0.3
npm info lifecycle serialport@11.0.1~postinstall: serialport@11.0.1
npm info lifecycle node-red-node-serialport@1.0.4~postinstall: node-red-node-serialport@1.0.4
npm timing action:postinstall Completed in 43ms
npm verb unlock done using /data/.npm/_locks/staging-4c3c7748ae1d116d.lock for /usr/src/node-red/node_modules/.staging
npm timing stage:executeActions Completed in 1705ms
npm timing stage:rollbackFailedOptional Completed in 2ms
npm timing stage:runTopLevelLifecycles Completed in 7543ms
npm verb saving [
npm verb saving   {
npm verb saving     name: 'node-red-node-serialport',
npm verb saving     spec: '^1.0.4',
npm verb saving     save: 'dependencies'
npm verb saving   }
npm verb saving ]
npm info lifecycle node-red-docker@3.0.2~preshrinkwrap: node-red-docker@3.0.2
npm info lifecycle node-red-docker@3.0.2~shrinkwrap: node-red-docker@3.0.2
npm info lifecycle node-red-docker@3.0.2~postshrinkwrap: node-red-docker@3.0.2
+ node-red-node-serialport@1.0.4
added 20 packages from 100 contributors and audited 310 packages in 8.192s

55 packages are looking for funding
  run `npm fund` for details

found 13 vulnerabilities (3 low, 10 moderate)
  run `npm audit fix` to fix them, or `npm audit` for details

node-red:

Welcome to Node-RED
===================

30 Aug 20:13:15 - [info] Node-RED version: v3.0.2
30 Aug 20:13:15 - [info] Node.js  version: v14.21.3
30 Aug 20:13:15 - [info] Linux 5.10.92-v7l+ arm LE
30 Aug 20:13:16 - [info] Loading palette nodes
30 Aug 20:13:18 - [info] Worldmap version 2.42.2
30 Aug 20:13:18 - [info] Dashboard version 3.5.0 started at /ui
30 Aug 20:13:18 - [info] Settings file  : /data/settings.js
30 Aug 20:13:18 - [info] Context store  : 'default' [module=memory]
30 Aug 20:13:18 - [info] User directory : /data
30 Aug 20:13:18 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 Aug 20:13:18 - [info] Flows file     : /data/flows.json
30 Aug 20:13:18 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

30 Aug 20:13:18 - [warn] Encrypted credentials not found
30 Aug 20:13:18 - [info] Server now running at http://127.0.0.1:1880/
30 Aug 20:13:18 - [info] Starting flows
./entrypoint.sh: line 14:     9 Segmentation fault      (core dumped) /usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}"

Flow:

cat /usr/blueos/userdata/node-red/flows.json 
[
    {
        "id": "a645a811594eb0f0",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "e1649fb4f7544b2b",
        "type": "serial-port",
        "serialport": "/dev/ttyACM2",
        "serialbaud": "115200",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "\\n",
        "bin": "false",
        "out": "char",
        "addchar": "",
        "responsetimeout": "10000"
    },
    {
        "id": "d64a0f61d894d39e",
        "type": "serial in",
        "z": "a645a811594eb0f0",
        "name": "",
        "serial": "e1649fb4f7544b2b",
        "x": 530,
        "y": 740,
        "wires": [
            [
                "12d22d769a98c1b1"
            ]
        ]
    },
    {
        "id": "12d22d769a98c1b1",
        "type": "debug",
        "z": "a645a811594eb0f0",
        "name": "debug 1",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 700,
        "y": 720,
        "wires": []
    }
]

Originally posted by @patrickelectric in https://github.com/node-red/node-red-nodes/issues/894#issuecomment-1699778378

patrickelectric commented 1 year ago

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

hardillb commented 1 year ago

yes, but why did you pick nodered/node-red:3.0.2-14 rather than latest or 3.0.2 you appeared to make a specific choice to use NodeJS 14 which went totally out of support in April this year. https://endoflife.date/nodejs

You will need to run npm rebuild in the /data directory to have the rebuild be picked up and persisted across a restart (changes made in the /usr/local/src will not be persisted across restarts of the container.)

hardillb commented 1 year ago

Also share the docker run command you are using to start this container.

patrickelectric commented 1 year ago

3.0.2-14 looks to be the newer version on the hub.docker, is 3.0.2 newer that 3.0.2-14 ? latest is problematic since I'll not have control over the node-red version.

Here is the output from /data:

f73ecd7542c2:/data# npm rebuild 

> @serialport/bindings-cpp@11.0.3 install /data/node_modules/@serialport/bindings-cpp
> node-gyp-build

node-red-contrib-web-worldmap@2.42.2 /data/node_modules/node-red-contrib-web-worldmap
@turf/bezier-spline@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/bezier-spline
@turf/helpers@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/helpers
@turf/invariant@6.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/@turf/invariant
cgi@0.3.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cgi
debug@2.6.9 /data/node_modules/node-red-contrib-web-worldmap/node_modules/debug
ms@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ms
extend@2.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/extend
header-stack@0.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/header-stack
bufferjs@3.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/bufferjs
bufferlist@0.1.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/bufferlist
stream-stack@1.1.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/stream-stack
compression@1.7.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compression
accepts@1.3.8 /data/node_modules/node-red-contrib-web-worldmap/node_modules/accepts
mime-types@2.1.35 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime-types
mime-db@1.52.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime-db
negotiator@0.6.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/negotiator
bytes@3.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compression/node_modules/bytes
compressible@2.0.18 /data/node_modules/node-red-contrib-web-worldmap/node_modules/compressible
on-headers@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/on-headers
safe-buffer@5.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/safe-buffer
vary@1.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/vary
express@4.18.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/express
array-flatten@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/array-flatten
body-parser@1.20.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/body-parser
bytes@3.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/body-parser/node_modules/bytes
content-type@1.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-type
depd@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/depd
destroy@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/destroy
http-errors@2.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/http-errors
inherits@2.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/inherits
setprototypeof@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/setprototypeof
statuses@2.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/statuses
toidentifier@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/toidentifier
iconv-lite@0.4.24 /data/node_modules/node-red-contrib-web-worldmap/node_modules/iconv-lite
safer-buffer@2.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/safer-buffer
on-finished@2.4.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/on-finished
ee-first@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ee-first
qs@6.11.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/qs
side-channel@1.0.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/side-channel
call-bind@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/call-bind
function-bind@1.1.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/function-bind
get-intrinsic@1.1.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/get-intrinsic
has@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/has
has-symbols@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/has-symbols
object-inspect@1.12.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/object-inspect
raw-body@2.5.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/raw-body
bytes@3.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/raw-body/node_modules/bytes
unpipe@1.0.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/unpipe
type-is@1.6.18 /data/node_modules/node-red-contrib-web-worldmap/node_modules/type-is
media-typer@0.3.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/media-typer
content-disposition@0.5.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-disposition
safe-buffer@5.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/content-disposition/node_modules/safe-buffer
cookie@0.5.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cookie
cookie-signature@1.0.6 /data/node_modules/node-red-contrib-web-worldmap/node_modules/cookie-signature
encodeurl@1.0.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/encodeurl
escape-html@1.0.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/escape-html
etag@1.8.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/etag
finalhandler@1.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/finalhandler
parseurl@1.3.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/parseurl
fresh@0.5.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/fresh
merge-descriptors@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/merge-descriptors
methods@1.1.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/methods
path-to-regexp@0.1.7 /data/node_modules/node-red-contrib-web-worldmap/node_modules/path-to-regexp
proxy-addr@2.0.7 /data/node_modules/node-red-contrib-web-worldmap/node_modules/proxy-addr
forwarded@0.2.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/forwarded
ipaddr.js@1.9.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/ipaddr.js
range-parser@1.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/range-parser
safe-buffer@5.2.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/express/node_modules/safe-buffer
send@0.18.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/send
mime@1.6.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/mime
ms@2.1.3 /data/node_modules/node-red-contrib-web-worldmap/node_modules/send/node_modules/ms
serve-static@1.15.0 /data/node_modules/node-red-contrib-web-worldmap/node_modules/serve-static
utils-merge@1.0.1 /data/node_modules/node-red-contrib-web-worldmap/node_modules/utils-merge
sockjs@0.3.24 /data/node_modules/node-red-contrib-web-worldmap/node_modules/sockjs
faye-websocket@0.11.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/faye-websocket
websocket-driver@0.7.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-driver
http-parser-js@0.5.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-driver/node_modules/http-parser-js
websocket-extensions@0.1.4 /data/node_modules/node-red-contrib-web-worldmap/node_modules/websocket-extensions
uuid@8.3.2 /data/node_modules/node-red-contrib-web-worldmap/node_modules/uuid
node-red-dashboard@3.5.0 /data/node_modules/node-red-dashboard
compression@1.7.4 /data/node_modules/compression
accepts@1.3.8 /data/node_modules/accepts
mime-types@2.1.35 /data/node_modules/mime-types
mime-db@1.52.0 /data/node_modules/mime-db
negotiator@0.6.3 /data/node_modules/negotiator
bytes@3.0.0 /data/node_modules/bytes
compressible@2.0.18 /data/node_modules/compressible
debug@2.6.9 /data/node_modules/debug
ms@2.0.0 /data/node_modules/ms
on-headers@1.0.2 /data/node_modules/on-headers
safe-buffer@5.1.2 /data/node_modules/safe-buffer
vary@1.1.2 /data/node_modules/vary
gridstack@0.6.4 /data/node_modules/gridstack
jquery@3.7.1 /data/node_modules/jquery
serve-static@1.15.0 /data/node_modules/serve-static
encodeurl@1.0.2 /data/node_modules/encodeurl
escape-html@1.0.3 /data/node_modules/escape-html
parseurl@1.3.3 /data/node_modules/parseurl
send@0.18.0 /data/node_modules/send
depd@2.0.0 /data/node_modules/depd
destroy@1.2.0 /data/node_modules/destroy
etag@1.8.1 /data/node_modules/etag
fresh@0.5.2 /data/node_modules/fresh
http-errors@2.0.0 /data/node_modules/http-errors
inherits@2.0.4 /data/node_modules/inherits
setprototypeof@1.2.0 /data/node_modules/setprototypeof
statuses@2.0.1 /data/node_modules/statuses
toidentifier@1.0.1 /data/node_modules/toidentifier
mime@1.6.0 /data/node_modules/mime
ms@2.1.3 /data/node_modules/send/node_modules/ms
on-finished@2.4.1 /data/node_modules/on-finished
ee-first@1.1.1 /data/node_modules/ee-first
range-parser@1.2.1 /data/node_modules/range-parser
socket.io@4.7.2 /data/node_modules/socket.io
base64id@2.0.0 /data/node_modules/base64id
cors@2.8.5 /data/node_modules/cors
object-assign@4.1.1 /data/node_modules/object-assign
debug@4.3.4 /data/node_modules/socket.io/node_modules/debug
ms@2.1.2 /data/node_modules/socket.io/node_modules/ms
engine.io@6.5.2 /data/node_modules/engine.io
@types/cookie@0.4.1 /data/node_modules/@types/cookie
@types/cors@2.8.13 /data/node_modules/@types/cors
@types/node@20.5.7 /data/node_modules/@types/node
cookie@0.4.2 /data/node_modules/cookie
debug@4.3.4 /data/node_modules/engine.io/node_modules/debug
ms@2.1.2 /data/node_modules/engine.io/node_modules/ms
engine.io-parser@5.2.1 /data/node_modules/engine.io-parser
ws@8.11.0 /data/node_modules/ws
socket.io-adapter@2.5.2 /data/node_modules/socket.io-adapter
socket.io-parser@4.2.4 /data/node_modules/socket.io-parser
@socket.io/component-emitter@3.1.0 /data/node_modules/@socket.io/component-emitter
debug@4.3.4 /data/node_modules/socket.io-parser/node_modules/debug
ms@2.1.2 /data/node_modules/socket.io-parser/node_modules/ms
node-red-node-serialport@1.0.4 /data/node_modules/node-red-node-serialport
serialport@11.0.1 /data/node_modules/serialport
@serialport/binding-mock@10.2.2 /data/node_modules/@serialport/binding-mock
@serialport/bindings-interface@1.2.2 /data/node_modules/@serialport/bindings-interface
debug@4.3.4 /data/node_modules/@serialport/binding-mock/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/binding-mock/node_modules/ms
@serialport/bindings-cpp@11.0.3 /data/node_modules/@serialport/bindings-cpp
@serialport/parser-readline@11.0.0 /data/node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-readline
@serialport/parser-delimiter@11.0.0 /data/node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-delimiter
debug@4.3.4 /data/node_modules/@serialport/bindings-cpp/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/bindings-cpp/node_modules/ms
node-addon-api@6.1.0 /data/node_modules/node-addon-api
node-gyp-build@4.6.0 /data/node_modules/node-gyp-build
@serialport/parser-byte-length@11.0.1 /data/node_modules/@serialport/parser-byte-length
@serialport/parser-cctalk@11.0.1 /data/node_modules/@serialport/parser-cctalk
@serialport/parser-delimiter@11.0.1 /data/node_modules/@serialport/parser-delimiter
@serialport/parser-inter-byte-timeout@11.0.1 /data/node_modules/@serialport/parser-inter-byte-timeout
@serialport/parser-packet-length@11.0.1 /data/node_modules/@serialport/parser-packet-length
@serialport/parser-readline@11.0.1 /data/node_modules/@serialport/parser-readline
@serialport/parser-ready@11.0.1 /data/node_modules/@serialport/parser-ready
@serialport/parser-regex@11.0.1 /data/node_modules/@serialport/parser-regex
@serialport/parser-slip-encoder@11.0.1 /data/node_modules/@serialport/parser-slip-encoder
@serialport/parser-spacepacket@11.0.1 /data/node_modules/@serialport/parser-spacepacket
@serialport/stream@11.0.1 /data/node_modules/@serialport/stream
debug@4.3.4 /data/node_modules/@serialport/stream/node_modules/debug
ms@2.1.2 /data/node_modules/@serialport/stream/node_modules/ms
debug@4.3.4 /data/node_modules/serialport/node_modules/debug
ms@2.1.2 /data/node_modules/serialport/node_modules/ms

I'm just performing this binds:

"Binds": [
    "/usr/blueos/userdata/node-red:/data:rw",
    "/etc/hostname:/etc/hostname:ro",
    "/dev:/dev:rw",
    "/:/home/workspace/host:rw"
  ]
hardillb commented 1 year ago

All the 3.0.2 builds were done at the same time, latest is just the current alias for 3.0.2 which is also 3.0.2-16 you should NOT be doing anything "new" with anything NodeJS 14 based.

Does the container run after doing the npm rebuild?

patrickelectric commented 1 year ago

Same problem.. I'll change the docker image to see if 3.0.2 has the same issue.

hardillb commented 1 year ago

Make sure you empty the volume mounted on /data when you change the container version before starting it.

patrickelectric commented 1 year ago

I did delete everything in /data. Started the docker, installed the extension and got the same problem.

Welcome to Node-RED
===================

30 Aug 21:28:53 - [info] Node-RED version: v3.0.2
30 Aug 21:28:53 - [info] Node.js  version: v16.20.1
30 Aug 21:28:53 - [info] Linux 5.10.92-v7l+ arm LE
30 Aug 21:28:55 - [info] Loading palette nodes
30 Aug 21:28:57 - [info] Settings file  : /data/settings.js
30 Aug 21:28:57 - [info] Context store  : 'default' [module=memory]
30 Aug 21:28:57 - [info] User directory : /data
30 Aug 21:28:57 - [warn] Projects disabled : editorTheme.projects.enabled=false
30 Aug 21:28:57 - [info] Flows file     : /data/flows.json
30 Aug 21:28:57 - [info] Server now running at http://127.0.0.1:1880/
30 Aug 21:28:57 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

30 Aug 21:28:57 - [info] Starting flows
./entrypoint.sh: line 14:     9 Segmentation fault      (core dumped) /usr/local/bin/node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data $FLOWS "${@}"
hardillb commented 1 year ago

Just to be extra clear here, this is still after you installed the serial port node, because I don't see the Node-RED log entries for installing the node in what you've posted.

Also what is the host OS here? I see it's ARMv7 so is it a Raspberry Pi, if so what version of the OS are you using?

patrickelectric commented 1 year ago

How did you do the install?

I installed the extension via the web interface.

Did you restart after doing the install to get that log output?

The docker just rebooted once it crashed and I lost the initial log of the installation. I started again to get the output.

And have you tried running npm rebuild in /data again?

1726e7155647:/data# npm rebuild
rebuilt dependencies successfully

Crashed again.

Also what is the host OS here? I see it's ARMv7 so is it a Raspberry Pi, if so what version of the OS are you using?

Yes, I'm running in a Raspberry Pi, using Raspbian buster.

hardillb commented 1 year ago

Workaround for now, while we raise this with the upstream project.

In /data/node_modules/@serialport/bindings-cpp run npm run rebuild

patrickelectric commented 1 year ago

/data/node_modules/@serialport/bindings-cpp

Thanks, that did work!

dceejay commented 11 months ago

serailport node now bumped to v2.0.0 using latest underlying serialport v12 library.

patrickelectric commented 7 months ago

btw this issue is still happening when installing from scratch using node-red 3.1.9 and node-red with node-red-node-serialport 2.0.2

patrickelectric commented 7 months ago

Workaround for now, while we raise this with the upstream project.

In /data/node_modules/@serialport/bindings-cpp run npm run rebuild

~This is not working anymore~

hardillb commented 7 months ago

We probably need to see the output of the rebuild command, but you really should add these comments to the node-serial issue linked above, as it's the only easy they are going to get the message that it's broken

patrickelectric commented 7 months ago

Hi @hardillb, I just run npm run rebuild and it fixed the problem! Do you know why is this still necessary ?

6e27a50136db:/usr/src/node-red# cd /data/node_modules/@serialport/bindings-cpp
6e27a50136db:/data/node_modules/@serialport/bindings-cpp# npm run rebuild

> @serialport/bindings-cpp@12.0.1 rebuild
> node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@16.20.2 | linux | arm
gyp info find Python using Python version 3.11.8 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v16.20.2/node-v16.20.2-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.20.2/node-v16.20.2-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.20.2/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.20.2/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/data/node_modules/@serialport/bindings-cpp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/16.20.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.20.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.20.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/data/node_modules/@serialport/bindings-cpp',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/data/node_modules/@serialport/bindings-cpp/build'
  CXX(target) Release/obj.target/bindings/src/serialport.o
  CXX(target) Release/obj.target/bindings/src/serialport_unix.o
  CXX(target) Release/obj.target/bindings/src/poller.o
  CXX(target) Release/obj.target/bindings/src/serialport_linux.o
  SOLINK_MODULE(target) Release/obj.target/bindings.node
  COPY Release/bindings.node
make: Leaving directory '/data/node_modules/@serialport/bindings-cpp/build'
gyp info ok 
6e27a50136db:/data/node_modules/@serialport/bindings-cpp# 
hardillb commented 7 months ago

@patrickelectric the problem is that the default pre-built binaries for node-serial don't support the musl libc library that is used instead of glibc in the Alpine based containers.

I have asked the node-serial maintainers to build Alpine based binaries, but they have not provided them yet.

The rebuild command builds the binary against musl library so it then works properly.

patrickelectric commented 7 months ago

Thanks for the explanation! That makes total sense! Can you link the issue here where you contacted the developer to make it easier for us to track the status ? https://github.com/serialport/bindings-cpp/issues/139

On Wed, Apr 17, 2024, 11:53 Ben Hardill @.***> wrote:

@patrickelectric https://github.com/patrickelectric the problem is that the default pre-built binaries for node-serial don't support the musl libc library that is used instead of glibc in the Alpine based containers.

I have asked the node-serial maintainers to build Alpine based binaries, but they have not provided them yet.

The rebuild command builds the binary against musl library so it then works properly.

— Reply to this email directly, view it on GitHub https://github.com/node-red/node-red-nodes/issues/1027#issuecomment-2061453370, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJIYCN5ZVT36OVAAK2HPGLY52EHVAVCNFSM6AAAAAA4FCIIW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGQ2TGMZXGA . You are receiving this because you were mentioned.Message ID: @.***>

hardillb commented 7 months ago

It's in the scrollback just about DCJ's December 6th comment.