henry-spanka / node-red-contrib-hikvision

Hikvision API for Node Red
MIT License
10 stars 1 forks source link

ReferenceError: error is not defined-> hikvision.js:55:17 #16

Open ozett opened 4 years ago

ozett commented 4 years ago

got errors on path. that new to me. what to do?

image

ozett commented 4 years ago

debug-log:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   'henry-spanka/node-red-contrib-hikvision#master' ]
2 info using npm@6.12.0
3 info using node@v11.5.0
4 verbose config Skipping project config: /root/.npmrc. (matches userconfig)
5 verbose npm-session 10571cb26e7b9287
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 silly fetchPackageMetaData error for github:henry-spanka/node-red-contrib-hikvision#master Error while executing:
8 silly fetchPackageMetaData /usr/bin/git ls-remote -h -t ssh://git@github.com/henry-spanka/node-red-contrib-hikvision.git
8 silly fetchPackageMetaData
8 silly fetchPackageMetaData fatal: failed to stat '.': Keine Berechtigung
8 silly fetchPackageMetaData
8 silly fetchPackageMetaData exited with error code: 128
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 6319ms
11 verbose stack Error: exited with error code: 128
11 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/finished.js:12:19)
11 verbose stack     at ChildProcess.emit (events.js:189:13)
11 verbose stack     at maybeClose (internal/child_process.js:978:16)
11 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
12 verbose cwd /root
13 verbose Linux 3.14-1-amd64
14 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "henry-spanka/node-red-contrib-hikvision#master"
15 verbose node v11.5.0
16 verbose npm  v6.12.0
17 error Error while executing:
17 error /usr/bin/git ls-remote -h -t ssh://git@github.com/henry-spanka/node-red-contrib-hikvision.git
17 error
17 error fatal: failed to stat '.': Keine Berechtigung
17 error
17 error exited with error code: 128
18 verbose exit [ 1, true ]
ozett commented 4 years ago

logged into root from user-login with: sudo su - that seemed to fix it.

image

ozett commented 4 years ago

hikvision-api error. whats this? image

18 Nov 16:01:50 - [red] Uncaught Exception:
18 Nov 16:01:50 - ReferenceError: error is not defined
    at Hikvision.hikApi.on (/root/.node-red/node_modules/node-red-contrib-hikvision/hikvision.js:55:17)
    at Hikvision.emit (events.js:189:13)
    at Hikvision.EventEmitter.emit (domain.js:441:20)
    at Hikvision.handleError (/root/.node-red/node_modules/node-hikvision-api/Hikvision.js:294:14)
    at Socket.emit (events.js:189:13)
    at Socket.EventEmitter.emit (domain.js:441:20)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process.internalTickCallback (internal/process/next_tick.js:72:19)
root@deb8mpd-virt:~/.node-red#
ozett commented 4 years ago

node-red is not starting anymore. can i disable hikvision-api from comandline to start the rest?

ozett commented 4 years ago

npm install henry-spanka/node-red-contrib-hikvision#master gives me only masterbranch. maybe there is a way to checkout an old commit-state?

i try this: https://stackoverflow.com/a/31554583

ozett commented 4 years ago

i can install a commit-version. i went back in time and installed 6 commits. i worked with last commit from 28.10.2019..no later 😭 could you confirm?

image

ozett commented 4 years ago

maybe because i disabled temporarily 1 camera? should not lead to this error and stopping of node-red, i guess..

ozett commented 4 years ago

i disabled this camera-node, but in the background hik-api is still trying to reach it.. maybe you can catch this situation too?

image

ozett commented 4 years ago

connection-errors are gone after a while. is it a hardcoded time-out? maybe make it configurable? (later on..., first the "error-error") 😄

henry-spanka commented 4 years ago

Hi, thanks for noticing. The issue has been fixed in the latest commit.

ozett commented 4 years ago

that means: i checkout the actual "master" as normal? i will try..

ozett commented 4 years ago

launched without errors, i will let it run over night to see if its stable. but look good, thanks a lot 👍 🎉