Unitech / pm2

Node.js Production Process Manager with a built-in Load Balancer.
https://pm2.keymetrics.io/docs/usage/quick-start/
Other
41.53k stars 2.63k forks source link

pm2 monit crashes #5577

Open cameralis opened 1 year ago

cameralis commented 1 year ago

What's going wrong?

I run pm2 monit while a process is running. When specific text is outputted into the log, monit crashes.

How could we reproduce this issue?

I honestly have no idea

Supporting information

TypeError: Cannot read properties of null (reading 'slice')
    at /usr/lib/node_modules/pm2/node_modules/blessed/lib/program.js:2543:35
    at Array.forEach (<anonymous>)
    at Program._attr (/usr/lib/node_modules/pm2/node_modules/blessed/lib/program.js:2542:11)
    at Box.Element._parseTags (/usr/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:498:26)
    at Box.Element.parseContent (/usr/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:393:22)
    at Box.<anonymous> (/usr/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:184:10)
    at Box.EventEmitter._emit (/usr/lib/node_modules/pm2/node_modules/blessed/lib/events.js:94:20)
    at Box.EventEmitter.emit (/usr/lib/node_modules/pm2/node_modules/blessed/lib/events.js:117:12)
    at emit (/usr/lib/node_modules/pm2/node_modules/blessed/lib/widgets/node.js:109:15)
    at List.Node.insert (/usr/lib/node_modules/pm2/node_modules/blessed/lib/widgets/node.js:111:5)

pm2 v5.2.2 node v16.19.1

cameralis commented 1 year ago

Could this be an issue with blessed?

jamie0xgitc0decat commented 11 months ago

Same here TypeError: Cannot read properties of null (reading 'slice') at /root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/program.js:2543:35 at Array.forEach () at Program._attr (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/program.js:2542:11) at Element._parseTags (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:498:26) at Element.parseContent (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:393:22) at Box. (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/widgets/element.js:184:10) at EventEmitter._emit (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/events.js:94:20) at EventEmitter.emit (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/events.js:117:12) at emit (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/widgets/node.js:109:15) at Node.insert (/root/.nvm/versions/node/v18.17.0/lib/node_modules/pm2/node_modules/blessed/lib/widgets/node.js:111:5)

pm2 version: 5.3.0

adrianhelvikspond commented 7 months ago

Same here.

❯ pm2 monit

TypeError: Cannot read properties of null (reading 'slice')
    at /Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/program.js:2543:35
    at Array.forEach (<anonymous>)
    at Program._attr (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/program.js:2542:11)
    at Element._parseTags (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/widgets/element.js:479:26)
    at Element.parseContent (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/widgets/element.js:393:22)
    at Box.<anonymous> (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/widgets/element.js:184:10)
    at EventEmitter._emit (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/events.js:94:20)
    at EventEmitter.emit (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/events.js:117:12)
    at emit (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/widgets/node.js:109:15)
    at Node.insert (/Users/adrian.helvik/.volta/tools/image/packages/pm2/lib/node_modules/blessed/lib/widgets/node.js:111:5)
adrianhelvikspond commented 7 months ago
Skjermbilde 2024-03-20 kl  16 56 41
adrianhelvikspond commented 7 months ago

Probably an issue with blessed though. I'll see if I can determine what is causing this.

adrianhelvik commented 7 months ago

I submitted a PR to blessed to resolve this issue.

https://github.com/chjj/blessed/pull/439