Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module get deleted after crash #3103

Open
noenic opened this issue Aug 6, 2021 · 8 comments
Open

Module get deleted after crash #3103

noenic opened this issue Aug 6, 2021 · 8 comments

Comments

@noenic
Copy link

noenic commented Aug 6, 2021

Current Behavior

I use the 3rd party module node-red-contrib-onvif-nodes, but sometime when an error occured and node-red crash the module get deleted, then i get a warning that say nodes are missing: Its not everytime (like 7/10 times)

The problem is known, some camera don't react well with the event protocol and do throw errors like that. I am more talking about the deletion problem

Aug 23:27:25 - [info] Stopping flows
5 Aug 23:27:25 - [info] Stopped flows
5 Aug 23:27:25 - [info] Starting flows
5 Aug 23:27:25 - [info] Started flows
5 Aug 23:27:28 - [red] Uncaught Exception:
5 Aug 23:27:28 - Error: You should create pull-point subscription first!
at Cam.pullMessages (/home/noenic/.node-red/node_modules/node-red-contrib-onvif-nodes/node_modules/onvif/lib/events.js:188:10)
at Cam._eventPull (/home/noenic/.node-red/node_modules/node-red-contrib-onvif-nodes/node_modules/onvif/lib/events.js:309:9)
at Cam. (/home/noenic/.node-red/node_modules/node-red-contrib-onvif-nodes/node_modules/onvif/lib/events.js💯13)
at ClientRequest. (/home/noenic/.node-red/node_modules/node-red-contrib-onvif-nodes/node_modules/onvif/lib/cam.js:296:4)
at ClientRequest.emit (node:events:394:28)
at Socket.socketErrorListener (node:_http_client:447:9)
at Socket.emit (node:events:394:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

[restart node-red]

(node:3133) [DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/local/lib/node_modules/node-red/node_modules/@node-red/editor-client/package.json' of './lib/index.js'. Please either fix that or report it to the module author
(Use node --trace-deprecation ... to show where the warning was created)
5 Aug 23:27:48 - [info]

Welcome to Node-RED

5 Aug 23:27:48 - [info] Node-RED version: v2.0.5
5 Aug 23:27:48 - [info] Node.js version: v16.6.1
5 Aug 23:27:48 - [info] Linux 4.19.0-6-amd64 x64 LE
5 Aug 23:27:48 - [info] Loading palette nodes
5 Aug 23:27:49 - [info] Dashboard version 2.30.0 started at /ui
5 Aug 23:27:49 - [warn] Missing node modules:
5 Aug 23:27:49 - [warn] - node-red-contrib-onvif-nodes (0.0.1-beta.14): onvif-config, onvif-device, onvif-discovery, onvif-imaging, onvif-media, onvif-ptz, onvif-recording, onvif-events
5 Aug 23:27:49 - [info] Removing modules from config
5 Aug 23:27:49 - [info] Settings file : /home/noenic/.node-red/settings.js
5 Aug 23:27:49 - [info] Context store : 'default' [module=memory]
5 Aug 23:27:49 - [info] User directory : /home/noenic/.node-red
5 Aug 23:27:49 - [warn] Projects disabled : editorTheme.projects.enabled=false
5 Aug 23:27:49 - [info] Flows file : /home/noenic/.node-red/flows.json
5 Aug 23:27:49 - [info] Server now running at http://127.0.0.1:1880/
5 Aug 23:27:49 - [warn]

5 Aug 23:27:49 - [info] Waiting for missing types to be registered:
5 Aug 23:27:49 - [info] - onvif-config
5 Aug 23:27:49 - [info] - onvif-ptz
5 Aug 23:27:49 - [info] - onvif-events

Expected Behavior

huumm, First I will say not to crash but that most likely the module and my camera's fault,

but deleting the module shouldn't be a behavior

Steps To Reproduce

install node-red-contrib-onvif-nodes and have an onvif event capable device, and deploying the flow multiple times

Example flow

it is not really a flow issue.
[onvif event listenner]

Environment

  • Node-RED version: 2.0.5
  • Node.js version: v16.6.1
  • npm version: 7.20.3
  • Platform/OS: Debian 10 Linux 4.19.0-6-amd64 x64 LE

*from the time of writing

github issue form the module : bartbutenaers/node-red-contrib-onvif-nodes#25

@hardillb
Copy link
Member

hardillb commented Aug 6, 2021

latest as a version doesn't help us, especially for the NodeJS or or npm version. Please add the actual version numbers for Node-RED, NodeJS and NPM

@noenic
Copy link
Author

noenic commented Aug 6, 2021

latest as a version doesn't help us, especially for the NodeJS or or npm version. Please add the actual version numbers for Node-RED, NodeJS and NPM

Yeam am sorry it was kinda stupid, just updated it..

@hardillb
Copy link
Member

hardillb commented Aug 6, 2021

And after a failure is the node-red-contrib-onvif-nodes still listed in the dependencies section your /home/noenic/.node-red/package.json file and is the directory still in /home/noenic/.node-red/node_modules/?

@noenic
Copy link
Author

noenic commented Aug 9, 2021

And after a failure is the node-red-contrib-onvif-nodes still listed in the dependencies section your /home/noenic/.node-red/package.json file and is the directory still in /home/noenic/.node-red/node_modules/?

Hi sorry for the slow reply,

Yeah no completely vanished...

@hardillb
Copy link
Member

hardillb commented Aug 9, 2021

How did you install the onvif node?

Via the palette manager or some other way?

@noenic
Copy link
Author

noenic commented Aug 9, 2021

How did you install the onvif node?

Via the palette manager or some other way?

I actually tried both way, with the palette manager and by CLI

both work fine, but same thing happen

@hardillb
Copy link
Member

hardillb commented Aug 9, 2021

The fact that the node is missing from the userDir package.json as well as node_modules directory implies that it has been explicitly removed with npm.

There should be no code path for Node-RED to do that for a in use node.

You are not using something strange like overlay filesystems?

@noenic
Copy link
Author

noenic commented Aug 9, 2021

You are not using something strange like overlay filesystems?

Hum... No don't think i have that...I don't even know what it is tbh..I using a common debian vm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants