node-appletv
node-appletv copied to clipboard
Problem to install
Hi,
I also experience some problem to install.
Hombrew installed, libtool autoconf automake installed, node installed. The process npm install -g node-appletv seems to proceed as it supposed to do but after a few lines I have :
../src/ed25519.cc:19:98: error: too few arguments to function call, single argument 'context' was not specified if ((info.Length() < 1) || (!Buffer::HasInstance(info[0])) || (Buffer::Length(info[0]->ToObject()) != 32)) { ~~~~~~~~~~~~~~~~~ ^ /Users/jeremiexxxx/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2818:3: note: 'ToObject' declared here V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( ^ /Users/jeremiexxxx/Library/Caches/node-gyp/14.5.0/include/node/v8config.h:422:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT' #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) ^ ../src/ed25519.cc:22:77: error: too few arguments to function call, single argument 'context' was not specified const unsigned char* seed = (unsigned char*)Buffer::Data(info[0]->ToObject());
20 lines like that and after :
fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make: *** [Release/obj.target/ed25519/src/ed25519.o] Error 1
I am a bit stuck. What do I miss ? Thanks
I am on Mac Catalina
Looks like @deanophilip forked and updated this package to work with Node 12.X: https://github.com/deanophilip/node-appletv
You can still npm install -g
the package by doing:
- Clone the fork above
-
cd /path/to/cloned/fork
-
npm install -g .
Though my appletv pair
command doesn't seem to work (gets stuck at Initiating Pairing
):
appletv pair
✔ Connecting to Living Room
⠼ Initiating Pairing
I also am not able to use the appletv pair command through the CLI now.. Not sure if that's a change on the tvOS side or not.
Check out line 47 in src/lib/pairing.ts:
await this.device.sendMessage('CryptoPairingMessage', 'CryptoPairingMessage', requestMessage, true);
I had to change the waitForResponse boolean to true a few months back when I was originally getting this working on my Windows machine with tvOS 13. I now have tvOS 14 and it is not working with that change. I switched back to the original to get the CLI working again:
await this.device.sendMessage('CryptoPairingMessage', 'CryptoPairingMessage', requestMessage, false);
@deanophilip thanks for the reply! I just tried switching to false
and re-installing via npm i -g .
but seems to still be stuck on Initiating Pairing
😢
Edit: Sorry disregard me! Had to run npm run build
before installing it 😄 I was able to pair it. Thanks!!