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

Installation of Update Fails #63

Closed
disruptivepatternmaterial opened this issue Aug 2, 2020 · 9 comments
Closed

Installation of Update Fails #63

disruptivepatternmaterial opened this issue Aug 2, 2020 · 9 comments

Comments

@disruptivepatternmaterial

Describe the bug
I went to update the plugin and it failed

Specifications
What hardware and OS is your Homebridge running on?
Ubuntu Bionic Beaver (18.04.4 LTS)
What Unifi hardware are you using
Cloud Key 2+

Logging
USER: root
DIR: /homebridge
CMD: npm install --save homebridge-unifi-protect-camera-motion@latest

npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported

[email protected] install /homebridge/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge
node install.js

ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100

ffmpeg has been downloaded to /homebridge/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge/ffmpeg
Thank you for using https://github.com/homebridge/ffmpeg-for-homebridge

@tensorflow/[email protected] install /homebridge/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node
node scripts/install.js

CPU-linux-1.7.4.tar.gz

  • Downloading libtensorflow
    events.js:287
    throw er; // Unhandled 'error' event
    ^

Error: connect ECONNREFUSED 0.0.0.0:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '0.0.0.0',
port: 443
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/[email protected] install: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @tensorflow/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-08-02T16_12_41_360Z-debug.log

Command failed. Please review log for details.

To Reproduce
npm i homebridge-unifi-protect-camera-motion

Expected behavior
Installation completes

@beele
Copy link
Owner

beele commented Aug 2, 2020

@mint-vm:/usr/lib/node_modules$ sudo npm install homebridge-unifi-protect-camera-motion -g --unsafe-perm=true
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
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

> [email protected] install /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge
> node install.js

Downloading ffmpeg from https://github.com/homebridge/ffmpeg-for-homebridge/releases/latest/download/ffmpeg-debian-x86_64.tar.gz
100% - Download Complete
ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

ffmpeg has been downloaded to /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge/ffmpeg
Thank you for using https://github.com/homebridge/ffmpeg-for-homebridge


> @tensorflow/[email protected] install /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

CPU-linux-1.7.4.tar.gz
* Downloading libtensorflow
[==============================] 8482389/bps 100% 0.0s
* Building TensorFlow Node.js bindings

> [email protected] install /usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using request for node-pre-gyp https download 
[canvas] Success: "/usr/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/canvas/build/Release/canvas.node" is installed via remote

> [email protected] postinstall /usr/lib/node_modules/homebridge-unifi-protect-camera-motion
> node scripts/postinstall.js

homebridge-unifi-protect-camera-motion postinstall script running on: x64
Supported architecture, tfjs-lib should be available!
+ [email protected]
added 249 packages from 233 contributors in 112.791s
beele@mint-vm:/usr/lib/node_modules$ 

On my Min 20 vm with node 12.X it seems to install correctly (from scratch)
Could you run the install command again but as sudo?

@disruptivepatternmaterial
Copy link
Author

same result

root@8PH-Hub:/homebridge/node_modules# sudo npm install homebridge-unifi-protect-camera-motion -g --unsafe-perm=true
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported

> [email protected] install /usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge
> node install.js

ffmpeg version 4.2.2-d1e8be3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --pkgconfigdir=/build/workspace/lib/pkgconfig --prefix=/build/workspace --pkg-config-flags=--static --extra-cflags=-I/build/workspace/include --extra-ldflags=-L/build/workspace/lib --extra-libs='-lpthread -lm' --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-openssl --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-libspeex --enable-demuxer=rtsp --enable-indev=alsa --enable-outdev=alsa
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100

ffmpeg has been downloaded to /usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/ffmpeg-for-homebridge/ffmpeg
Thank you for using https://github.com/homebridge/ffmpeg-for-homebridge


> @tensorflow/[email protected] install /usr/local/lib/node_modules/homebridge-unifi-protect-camera-motion/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

CPU-linux-1.7.4.tar.gz
* Downloading libtensorflow
events.js:287
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 0.0.0.0:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:310:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '0.0.0.0',
  port: 443
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @tensorflow/[email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @tensorflow/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-08-02T17_41_04_442Z-debug.log
root@8PH-Hub:/homebridge/node_modules# 

@beele
Copy link
Owner

beele commented Aug 2, 2020

Seems like the issue is a refused connection when trying to download the tensorflow prebuilt binary.
Do you have any special firewall rules or AV software enabled?

Edit: could you try deleting the folder where npm installed the plugin, and then install the plugin again?

@disruptivepatternmaterial
Copy link
Author

disruptivepatternmaterial commented Aug 2, 2020

I have nothing unusual. I can curl many urls http and https from within this container. I moved the host into the DMZ with the same result: it fails in the same spot.

Trying to hit 0.0.0.0 would never work...so not sure what is happening.

@beele
Copy link
Owner

beele commented Aug 2, 2020

You are running inside a docker container?
Could you try installing the plugin on the host? (just to see if it can pass that point of the installation)

@disruptivepatternmaterial
Copy link
Author

exactly the same error when installed outside docker on host OS

@beele
Copy link
Owner

beele commented Aug 2, 2020

What is your node version? It should be at least 12.18.0

Can you open this link on the host: https://storage.googleapis.com/tf-builds/
And subsequently can you donwload this file: https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v4/1.7.4/CPU-linux-1.7.4.tar.gz

This is the file that should be downloaded and installed by npm.

@acesarewld
Copy link

acesarewld commented Aug 3, 2020

I disabled my Pi-Hole and tried again -- that did the trick for me.

@beele
Copy link
Owner

beele commented Aug 17, 2020

closing due to inactivity

@beele beele closed this as completed Aug 17, 2020
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