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

Cannot install Error: [email protected] #43

Open
justinrhodes opened this issue Nov 25, 2018 · 44 comments
Open

Cannot install Error: [email protected] #43

justinrhodes opened this issue Nov 25, 2018 · 44 comments

Comments

@justinrhodes
Copy link

I was trying to get this plugin installed on my home bridge docker, but I am hitting some issues with installing sodium. I am using the oznu home bridge docker and this is my startup.sh

apk add libtool
apk add autoconf
apk add automake
apk add libsodium
apk add g++
npm rebuild
verbose stack Error: [email protected] install: `node install.js --install`
verbose stack Exit status 1
verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
verbose stack     at EventEmitter.emit (events.js:182:13)
verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
verbose stack     at ChildProcess.emit (events.js:182:13)
verbose stack     at maybeClose (internal/child_process.js:962:16)
verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
verbose pkgid [email protected]
verbose cwd /homebridge
verbose Linux 4.18.17-unRAID
verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "homebridge-apple-tv" "--unsafe-perm"
verbose node v10.13.0
verbose npm  v6.4.1
error code ELIFECYCLE
error errno 1
error [email protected] install: `node install.js --install`
error Exit status 1
error Failed at the [email protected] install script.
error This is probably not a problem with npm. There is likely additional logging output above.
6656 verbose exit [ 1, true ]
@rpeterson03
Copy link

I ran into the same problem on Ubuntu 18.0.3. The 2.0.3 dependency come from a dependency of this project which is node-apple-tv. I have not figured out a workaround.

@dornadeluxe
Copy link

I have the same problem on my Banana PI M2 Berry with Raspbian Strech. So far, haven't found a solution.
`/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make nodesodium exited with code null
at ChildProcess. (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:287:19)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node install.js --install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [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/2018-11-26T20_19_37_007Z-debug.log`

@reiterbene
Copy link

same problem here

@justinrhodes
Copy link
Author

Maybe @lprhodes can give some advice on this one.

I know the issue lies with trying to install node-apple-tv plugin to Homebridge, so maybe I can create an issue there as well. I was trying to troubleshoot this past weekend, but just kept seeing the same error with multiple "fix attempts"

@justinrhodes
Copy link
Author

Based on the logs, I'm guessing something is going on with the directories it is looking for in node_modules

8623 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/node-appletv/node_modules/sodium'
8624 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/homebridge-apple-tv/node_modules/homebridge-platform-helper'
8625 warn rollback Rolling back [email protected] failed (this is probably harmless): ENOTEMPTY: directory not empty, rmdir '/homebridge/node_modules/node-appletv/node_modules/sodium'

@dornadeluxe
Copy link

Is the developer still active? Or did anyone else achieve any progress?

@justinrhodes
Copy link
Author

Does not look like he has been active for a few months :(

I'll try to dig in deeper and figure out what is going on. If anyone else figures this out, please share.

@Screenfeed
Copy link

Same issue here.

@chimai
Copy link

chimai commented Dec 19, 2018

Same for me, can't install

@pponce
Copy link

pponce commented Dec 19, 2018

try pponce/homebridge-apple-tv

@chimai
Copy link

chimai commented Dec 20, 2018

try pponce/homebridge-apple-tv

Tried to install from this package, got the same problem with for bot global and local types of installation:
Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.

@Alcor72
Copy link

Alcor72 commented Dec 20, 2018

Same here on a Synology NAS (node.js v10.13)...

@pponce
Copy link

pponce commented Dec 20, 2018

My change in pponce/homebridge-apple-tv
was to make homebridge-apple-tv depend on a fork of node-appletv (https://github.com/socalrds/node-appletv).
That forked version of node-appletv updates its dependency to sodium 3.0.1 which in theory solves the build issue with sodium version 2.0.3.
I'm running on an rpi 3 with LTS 10.14.2 version of node js.

After you received this error:
Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
Was it able to compile libsodium from source?

Can you try
apt-get install autoconf automake g++ libtool
prior to installing pponce/homebridge-apple-tv

@t0xicfume
Copy link

try pponce/homebridge-apple-tv

Sorry, I'm new, how do i specifically install from pponce/? All the homebridge plugins I've installed so far I use npm install -f <plugin-name>, so how do I install this one? Thanks.

@pponce
Copy link

pponce commented Dec 21, 2018

npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git
but i think this should work as well
npm install -g pponce/homebridge-apple-tv

@Alcor72
Copy link

Alcor72 commented Dec 21, 2018

sorry but I only use docker command line (via sh command).
if I write "sudo apt-get install libtool"... I only get
"sh : sudo: not found"...
As you can see I am new to this world...

@dornadeluxe
Copy link

My change in pponce/homebridge-apple-tv
was to make homebridge-apple-tv depend on a fork of node-appletv (https://github.com/socalrds/node-appletv).
That forked version of node-appletv updates its dependency to sodium 3.0.1 which in theory solves the build issue with sodium version 2.0.3.
I'm running on an rpi 3 with LTS 10.14.2 version of node js.

After you received this error:
Static libsodium was not found at /root/.npm/_cacache/tmp/git-clone-77f03c40/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
Was it able to compile libsodium from source?

Can you try
apt-get install autoconf automake g++ libtool
prior to installing pponce/homebridge-apple-tv

Thanks a lot, got it installed like that. Now I ran into the next problem however. :) My apple-tv is discovered twice which is also an open issue here. Tried to add it manually but for this I need to install node-appletv which again wants to install Sodium 2.0.3...

@pponce
Copy link

pponce commented Dec 23, 2018

@dornadeluxe Can you find where the homebridge-appletv plugin was installed?
In my case it's installed in:
/home/pi/.nvm/versions/node/v10.14.2/lib/node_modules/homebridge-apple-tv

If you navigate to where it was installed and then run:
cd node_modules/node-appletv/bin

You should then be able to run the pair command by executing this command
./appletv pair

You should see two apple tv’s appear. Select the second one in the list to pair with.
Follow instructions and copy the full key that is returned as you will need it to update your config.js for the homebridge-appletv plugin.
Also add "showPairSwitches": false in the config.json for this plugin.

You should then be paired already and the plugin should auto find your Apple TV still.
That solved my issues.

@dornadeluxe
Copy link

Another step further, thanks a lot pponce! I ran the pair process and copied the credentials and put everything in the config.js. So far so good but homebridge still is not willing to start. This is what I get now:
Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Discovered Apple TV (AppleTV) at 192.168.1.221 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Discovered Apple TV (AppleTV) at 192.168.1.221 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: [12/23/2018, 11:25:07 PM] [Apple TV] [INFO] Connecting to "Lounge Apple TV" Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/resolver_sequence_tasks.js:19 Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: var error = dns_sd.buildException(errorCode); Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: ^ Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: Error: dns service error: unknown Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: at MDNSService.on_resolver_done (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/resolver_sequence_tasks.js:19:30) Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: at SocketWatcher.MDNSService.self.watcher.callback (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/mdns/lib/mdns_service.js:18:40) Dec 23 23:25:07 bpi-iot-ros-ai homebridge[3875]: Disconnected Apple TV's Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Main process exited, code=exited, status=1/FAILURE Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Unit entered failed state. Dec 23 23:25:07 bpi-iot-ros-ai systemd[1]: homebridge.service: Failed with result 'exit-code'.

@dornadeluxe
Copy link

I deleted the accessories folder and tried again and now it works, hallelujah! :) Thanks for your help and Merry Christmas!

@pponce
Copy link

pponce commented Dec 24, 2018

Glad you figured that last one out. I was stumped..
Merry Christmas!

@TommyCardello
Copy link

@dornadeluxe
Hi there,

I had the same issue with "./accessories" module.
As you did, I deleted the accessories folder.

That didn't help.
Here's what I did:

I checked the original repo, folder "accessories". I manually created all 4 .js files on the same folder on my raspberry and copied the code from original repo. It worked for me. Now works perfectly.

@t0xicfume
Copy link

npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git
but i think this should work as well
npm install -g pponce/homebridge-apple-tv

Thanks for that. I tried to install, but I get this error:

root@kali:~/.pm2/logs# npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git

[email protected] preinstall /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium
node install.js --preinstall

Static libsodium was not found at /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtoolize: error: Failed to create 'build-aux'
make: *** [Makefile:62: libsodium] Error 1
/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make libsodium exited with code 2
at ChildProcess. (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293:19)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: node install.js --preinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2018-12-26T20_36_06_544Z-debug.log
root@kali:~/.pm2/logs#

Any idea how to fix this? Thanks.

@pponce
Copy link

pponce commented Dec 27, 2018

Sorry I've not encountered your issue.
Do you have auticonf automake g++ and libtool installe?
Run:
sudo apt-get install autoconf automake g++ libtool
then try and install again.

@t0xicfume
Copy link

t0xicfume commented Dec 27, 2018

Sorry I've not encountered your issue.
Do you have auticonf automake g++ and libtool installe?
Run:
sudo apt-get install autoconf automake g++ libtool
then try and install again.

Yes I already did sudo apt-get install autoconf automake g++ libtool before install and that's what I get... To be very sure, i just ran that command again, followed by the npm install command again, and i get the same error.. as below. Help?

root@kali:/.pm2/logs# sudo apt-get install autoconf automake g++ libtool
Reading package lists... Done
Building dependency tree
Reading state information... Done
autoconf is already the newest version (2.69-11).
automake is already the newest version (1:1.16.1-4).
g++ is already the newest version (4:8.2.0-2).
libtool is already the newest version (2.4.6-6).
0 upgraded, 0 newly installed, 0 to remove and 243 not upgraded.
root@kali:~/.pm2/logs# npm install -g git+https://[email protected]/pponce/homebridge-apple-tv.git

[email protected] preinstall /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium
node install.js --preinstall

Static libsodium was not found at /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtoolize: error: Failed to create 'build-aux'
make: *** [Makefile:62: libsodium] Error 1
/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make libsodium exited with code 2
at ChildProcess. (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293:19)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: node install.js --preinstall
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2018-12-27T02_48_09_871Z-debug.log
root@kali:~/.pm2/logs#

Any ideas please? Thanks.

@ronnieescorpiso
Copy link

ronnieescorpiso commented Jan 4, 2019

I am having similar issues with sodium as well -- can anyone assist me?

Currently running node: 11.6.0, raspberry 3

Installed plugin successfully using: sudo npm install -g homebridge-apple-tv --unsafe-perm

When I attempt to run homebridge, I receive the following error. Also, I am attempting to run this plugin with the Nest plugin (which is active and working).

[1/4/2019, 8:32:37 AM] ==================== [1/4/2019, 8:32:37 AM] ERROR LOADING PLUGIN homebridge-apple-tv: [1/4/2019, 8:32:37 AM] Error: Cannot find module '../build/Release/sodium' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15) at Function.Module._load (internal/modules/cjs/loader.js:529:25) at Module.require (internal/modules/cjs/loader.js:657:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/sodium/lib/sodium.js:16:15) at Module._compile (internal/modules/cjs/loader.js:721:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:560:12) at Function.Module._load (internal/modules/cjs/loader.js:552:3) [1/4/2019, 8:32:37 AM] ====================

Any ideas on how to resolve this? I tried updating and following the instructions above, but no luck. Thanks!

@nibty
Copy link

nibty commented Jan 24, 2019

I was able to build with sodium 3. See
evandcoleman/node-appletv#15

@NajibNour
Copy link

I was able to build with sodium 3. See
edc1591/node-appletv#15

How did you achieve installing? what commands did you use? i installed sodium 3 and still had problems installing.

@poudenes
Copy link

@nibty how did you do it. I read article but its for MacOs. im running on Rasbian Stretch Last build.

@mkormendy
Copy link

mkormendy commented Feb 28, 2019

For anyone who doesn't want to wait for @lprhodes to update his repo, you can install GioCirque's cloned and fixed version with the following command:

npm install -g -save git+https://github.com/GioCirque/homebridge-apple-tv.git

NOTE: if @lprhodes ends up updating his repo and homebridge plugin, and if @GioCirque doesn't continue to maintain his package, you won't see any upgrades and miss out on new features should there be any.

@poudenes
Copy link

poudenes commented Feb 28, 2019

@mkormendy @GioCirque thanks. Lets try this one then. :) Its Better then nothing!

In meanwhile of writing this post. I see for very long time this line:

fetchMetadata: sill resolveWhiteNewModule [email protected] checking installable status

After a while I get this :(

root@raspberrypi:~# npm install -g -save git+https://github.com/GioCirque/homebridge-apple-tv.git                                                                     
                                                                                                                                                  
> [email protected] preinstall /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium
> node install.js --preinstall

Static libsodium was not found at /usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtoolize:   error: Failed to create 'build-aux'
Makefile:61: recept voor doel 'libsodium' is mislukt
make: *** [libsodium] Fout 1
/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293
            throw new Error(cmdLine + ' exited with code ' + code);
            ^

Error: make libsodium exited with code 2
    at ChildProcess.<anonymous> (/usr/lib/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293:19)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! code ELIFECYCLE                                                                                                                          
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node install.js --preinstall`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] preinstall 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/2019-02-28T19_59_49_989Z-debug.log

@poudenes
Copy link

here the
/root/.npm/_logs/2019-02-28T19_59_49_989Z-debug.log

2019-02-28T19_59_49_989Z-debug.log

@VannaDii
Copy link

I don't have a raspberrypi to try this on. I'd suggest using the --unsafe-perm argument, and be sure the there are two dashes in the --save argument.

npm install -g --save --unsafe-perm git+https://github.com/GioCirque/homebridge-apple-tv.git

@aveach
Copy link

aveach commented Mar 22, 2019

I got this repo to install last night after initially having this issue with sodium.

I manually installed automake and sodium and apt-get libtool then retried this install via homebridge-config-ui-x. I believe that's what fixed it, since it will see the latest install of sodium already on device and skip over it.

@normen
Copy link

normen commented Apr 2, 2019

Yeah, just install libsodium before installing the plugin

@NorthernMan54
Copy link

Wow, @GioCirque after almost an hour on my PI it finally worked, tks

@omriavital
Copy link

What worked for me

So, after a long (long) night with the infamous error "Failed at the [email protected] preinstall script" - I was finally able to get this plugin up and running (works very nice)

I don't know exactly what I did that made the trick, I must be honest. But in order to (maybe) help others that come here, I decided to go back to the logs, extract (most of) my "sudo" commands, and list them here. Listed in brackets are outputs worth mentioning:

pi@raspberrypi:~ $ sudo npm i -g npm
pi@raspberrypi:~/.homebridge $ sudo apt-get update
pi@raspberrypi:~/.homebridge $ sudo apt-get clean
pi@raspberrypi:~/.homebridge $ sudo apt-get autoremove
pi@raspberrypi:~/.homebridge $ sudo apt-get --reinstall install autoconf automake g++ libtool
pi@raspberrypi:~/.homebridge $ sudo apt-get --purge remove autoconf automake g++ libtool
pi@raspberrypi:~/.homebridge $ sudo apt-get install autoconf automake g++ libtool
pi@raspberrypi:~/.homebridge $ sudo npm install -g libsodium
pi@raspberrypi:~/.homebridge $ sudo apt-get update -y && sudo apt-get upgrade -y && sudo npm i -g npm
pi@raspberrypi:~/.homebridge $ sudo npm install -g homebridge-apple-tv --unsafe-perm
pi@raspberrypi:~/.homebridge $ sudo apt-get update
pi@raspberrypi:~/.homebridge $ sudo apt-get dist-upgrade
pi@raspberrypi:~/.homebridge $ sudo npm rebuild
([email protected] /home/pi/.homebridge/node_modules/libsodium)
pi@raspberrypi:~/.homebridge $ sudo npm install -g homebridge-apple-tv --unsafe-perm
(+ [email protected])
(updated 1 package in 102.573s)
pi@raspberrypi:~/.homebridge $ pm2 restart  homebridge
pi@raspberrypi:~/.homebridge $ sudo npm install -g homebridge-apple-tv --unsafe-perm
(+ [email protected])
(added 259 packages from 215 contributors in 3334.2s)

Afer installation, worth mentioning, I didn't see any switch to pair my AppleTV in the home app...

I needed to do the following sequence:

pi@raspberrypi:/ $ cd /usr/local/lib/node_modules/homebridge-apple-tv
(** worth mentioning: this is the location in my case where the plugin was installed... pi zero)
pi@raspberrypi:/usr/local/lib/node_modules/homebridge-apple-tv $ cd node_modules/node-appletv/bin
pi@raspberrypi:/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/node-appletv/bin $ ./appletv pair

Which Apple TV would you like to pair with? Living Room (192.168.1.3:49164)
Living Room
Living Room

(here I used the arrows to choose the SECOND one)

? Enter the 4-digit pin that's currently being displayed on Living Room 6856

Then, I received the credential, copied it, and added it as part of this block that I added to config.json:

"platform": "AppleTV",
            "name": "Omri's Apple TV",
            "showDefaultSwitches": true,
            "defaultSwitchesIncludeATVName": true,
            "showPairSwitches": false,
            "hideWelcomeMessage": true,
            "devices": [
                {
                    "id": "Omris",
                    "name": "Omris Apple TV",
                    "credentials": "pasted-credentials-here"
                }
            ],
            "accessories": [
                {
                    "deviceID": "Omris",
                    "name": "Rainbow",
                    "command": []
                }

Good luck guys!

@marius-se
Copy link

Okay. So I had to follow the "standard" process (install automake, libtool and sodium etc. before installing the plugin) and ALSO downgrade to NodeJS V8. Using the NodeJS 8 version (8.16.0) fixed my problem!

@marius-se
Copy link

marius-se commented Aug 2, 2019

@omriavital which AppleTV generation are you working with? Cause everything is working now but ./appletv pair tells me No Apple TVs found on the network. Try again.

@goemangrunn
Copy link

goemangrunn commented Sep 15, 2019

@marius-se

Here the same excact problem. Before it was working fine here. My first install six months ago was not easy, same problems as everyone else (sodium 2.0.3). But in the end I got it working just fine!

Then I decided (now i do regret that) because of some version (node, hue) "warnings
" to try updating homebridge, homebridge-heu to newer version. It still worked fine but it seemed the newest plugin and versions did/could not load because of the older plugin was allreay loaded.It still worked but i decided tot try to repair that without succes.

In the end I decided to start from scratch, new DebianOS, new homebridge-install, the works...
The second time the installation of all went a lot faster because of the previous experiance.

But then: Same error

No Apple TVs found on the network. Try again.

Same network, same AppleTV, same Pi, same Hue Hub....
Apple TV has IP 192.182.1.13, Pi has ip 192.168.1.14. Both work fine on the netwerk (with cable).
I have done the installation and Apple TV pair via ssh.

Somebody an idea where to search for the solution?

@goemangrunn
Copy link

goemangrunn commented Sep 15, 2019

Could the problem be that the plugins and homebridge are on different locations?

The same problem seemed to be with the version updates.

Apple TV Pair is located in this folder:

~/.nvm/versions/node/v10.16.3/lib/node_modules/homebridge-apple-tv/node_modules/node-appletv/bin $ ./appletv pair

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see http://0pointer.de/blog/projects/avahi-compat.html
No Apple TVs found on the network. Try again.

But in previous posts I see it should be located in:

/usr/local/lib/node_modules $ cd homebridge-apple-tv
-bash: cd: homebridge-apple-tv: Bestand of map bestaat niet

But there seems to be no such folder. Is this a node version problem, should I degrade my node version? Hue wants this version...10.6.3

@adidoes
Copy link

adidoes commented Dec 7, 2019

For people still running into this, you must use node version 8. It's the only thing that worked for me.

@seackone
Copy link

Is there any other chance to get this plugin running except of downgrading node? I have a lot of other plugins installed and i dont want to run in more issues after a downgrade..

omriavitals workaround didnt worked for me.

@AviatorBimmer
Copy link

Keep getting this error when trying to install it on my Homebridge Docker on Synology install.

`USER: root
DIR: /var/lib/homebridge
CMD: npm install --save [email protected]

[##################] - reify:sodium: timing reifyNode:node_modules/homebridge-apple-tv/no

[email protected] preinstall
node install.js --preinstall

Static libsodium was not found at /homebridge/node_modules/homebridge-apple-tv/node_modules/sodium/deps/build/lib/libsodium so compiling libsodium from source.
libtool is required, but wasn't found on this system
make: *** [Makefile:62: libsodium] Error 1
/homebridge/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293
throw new Error(cmdLine + ' exited with code ' + code);
^

Error: make libsodium exited with code 2
at ChildProcess. (/homebridge/node_modules/homebridge-apple-tv/node_modules/sodium/install.js:293:19)
at ChildProcess.emit (node:events:513:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)

Node.js v18.12.1
npm ERR! code 1
npm ERR! path /homebridge/node_modules/homebridge-apple-tv/node_modules/sodium
npm ERR! command failed
npm ERR! command sh -c -- node install.js --preinstall

npm ERR! A complete log of this run can be found in:
npm ERR! /home/homebridge/.npm/_logs/2022-12-24T03_37_39_383Z-debug-0.log

Operation failed. Please review log for details.`

I went ahead and installed Sodium via npm install -g libsodium which installed fine but trying to install homebridge-apple-tv keeps giving me this error. =(

Thanks in advance!

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