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

The module sometimes delete it self #25

Open
noenic opened this issue Aug 5, 2021 · 5 comments
Open

The module sometimes delete it self #25

noenic opened this issue Aug 5, 2021 · 5 comments

Comments

@noenic
Copy link

noenic commented Aug 5, 2021

I don't know why but when i tinker to much with the flow i get strange errors,
like pullpoint errors (more like firmware from my camera)
but sometimes i restart node-red and the module is missing i need to clone it from git again
strange thing...

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:100: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

@bartbutenaers
Copy link
Owner

Hi @noenic,

To be honest I have no idea why this package could have been removed. No idea at all...
Can you please ask this question on the Node-RED Discourse forum, and add a link to your discussion here afterwards. I'm very curious if someone else knows what could cause this...

Bart

@Nikotine1
Copy link

Nikotine1 commented Oct 26, 2021

I'm having the same issue. After a reboot, I always need to reinstall the palette:

> [email protected] start /usr/src/node-red
> node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"
26 Oct 22:04:58 - [info] 
Welcome to Node-RED
===================

26 Oct 22:04:58 - [info] Node-RED version: v2.1.1
26 Oct 22:04:58 - [info] Node.js  version: v14.18.1
26 Oct 22:04:58 - [info] Linux 5.10.63-v8+ arm64 LE
26 Oct 22:04:59 - [info] Loading palette nodes
26 Oct 22:05:01 - [info] Dashboard version 3.0.4 started at /ui
26 Oct 22:05:01 - [warn] Missing node modules:
26 Oct 22:05:01 - [warn]  - node-red-contrib-onvif-nodes (0.0.1-beta.15): onvif-config, onvif-device, onvif-discovery, onvif-imaging, onvif-media, onvif-ptz, onvif-recording, onvif-events
26 Oct 22:05:01 - [info] Removing modules from config
26 Oct 22:05:01 - [info] Settings file  : /data/settings.js
26 Oct 22:05:01 - [info] Context store  : 'default' [module=memory]
26 Oct 22:05:01 - [info] User directory : /data
26 Oct 22:05:01 - [warn] Projects disabled : editorTheme.projects.enabled=false
26 Oct 22:05:01 - [info] Flows file     : /data/flows.json
26 Oct 22:05:01 - [info] Server now running at http://127.0.0.1:1880/
26 Oct 22:05:01 - [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.
---------------------------------------------------------------------

26 Oct 22:05:01 - [info] Waiting for missing types to be registered:
26 Oct 22:05:01 - [info]  - onvif-config
26 Oct 22:05:01 - [info]  - onvif-events
26 Oct 22:05:01 - [info]  - onvif-device
26 Oct 22:06:15 - [info] Stopping flows
26 Oct 22:06:15 - [info] Stopped flows
26 Oct 22:06:15 - [info] Waiting for missing types to be registered:
26 Oct 22:06:15 - [info]  - onvif-config
26 Oct 22:06:15 - [info]  - onvif-events
26 Oct 22:06:15 - [info]  - onvif-device
26 Oct 22:06:35 - [info] Stopping flows
26 Oct 22:06:35 - [info] Stopped flows
26 Oct 22:06:35 - [info] Waiting for missing types to be registered:
26 Oct 22:06:35 - [info]  - onvif-config
26 Oct 22:06:35 - [info]  - onvif-events
26 Oct 22:06:35 - [info]  - onvif-device
26 Oct 22:09:23 - [info] Stopping flows
26 Oct 22:09:23 - [info] Stopped flows
26 Oct 22:09:23 - [info] Waiting for missing types to be registered:
26 Oct 22:09:23 - [info]  - onvif-config
26 Oct 22:09:23 - [info]  - onvif-events
26 Oct 22:09:23 - [info]  - onvif-device

I have many other palettes installed, this is the only one that does this.

The /data folder of node-red is mounted as a volume.

Installation of this palette throws some errors though:

pi@rpi4-servemepi:~/node-red $ docker exec -it node-red /bin/bash
bash-5.0$ npm install [email protected]
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm notice created a lockfile as package-lock.json. You should commit this file.
+ [email protected]
added 38 packages from 55 contributors and audited 328 packages in 11.442s

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

found 4 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
bash-5.0$

EDIT: I have now manually added this palette to package.json.
https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
After a reboot it's still there, fingers crossed.

{
    "name": "node-red-project",
    "description": "A Node-RED Project",
    "version": "0.0.1",
    "private": true,
    "dependencies": {
        "node-red-contrib-home-assistant-websocket": "~0.36.1",
        "node-red-dashboard": "~3.0.4",
        "node-red-contrib-onvif-nodes": "~0.0.1-beta.15"
    }
}

@bartbutenaers
Copy link
Owner

Hi @Nikotine1,
That is indeed very inconvenient.
But I can only give the same advice as above: please discuss this on discourse.nodered.org, because there are folks hanging out that have much more NPM knowledge...
Bart

@Nikotine1
Copy link

Hi Bart,
Adding the line to package.json seems to have worked. It has survived several reboots now.

Groeten van een mede-Belg ;-)

@zinen
Copy link

zinen commented Dec 28, 2022

If you run into this issue and you are running inside a docker container. Try to use the following strategi when installing manually via npm:

docker exec -it node-red /bin/bash
cd /data
npm install node-red-contrib-onvif-nodes@<current version from release page>

The important step here is the cd /data as this will get you to you'r node-red root install directory.

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

No branches or pull requests

4 participants