node-red / node-red/node-red-nodes

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

Open
#1,027 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OK to Close ? upstream
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
13h 57m
Merged PRs (30d)
3

Description

          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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the npm install for node-red-node-serialport 1.0.4 inside the Docker container with the reported Node.js and npm versions, then inspect the complete installation and startup output. Done means the package installs without triggering an infinite container boot cycle; the payload names no source files or tests to target.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
backend, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.