lprhodes / homebridge-apple-tv

Apple TV 4th & 5th gen plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
105 stars 15 forks source link

Plugin Breaks with Homebridge V1.0.0-1.0.1 #56

Closed NajibNour closed 4 years ago

NajibNour commented 4 years ago

Plugin Breaks with Homebridge V1.0.0-1.0.1 The homebridge-apple-tv plugin only works with node version 8, and the new homebridge requires node version v10.17.0. So after updating, I realized homebridge-apple-tv was uninstalled when trying to reinstall I ran into multiple errors.

errors.txt

beware when updating your node version as it will break this plugin.

Looking forward to a fix as this was one of my favorite plugins.

NorthernMan54 commented 4 years ago

As a work around I installed homebridge-Apple-tv-remote instead and it has been great

On Apr 27, 2020, at 10:57 AM, NajibNour notifications@github.com wrote:

 Plugin Breaks with Homebridge V1.0.0-1.0.1 The homebridge-apple-tv plugin only works with node version 8, and the new homebridge requires node version v10.17.0. So after updating, I realized homebridge-apple-tv was uninstalled when trying to reinstall I ran into multiple errors.

../src/ed25519.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE MakeKeypair(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/ed25519.cc:19:98: error: no matching function for call to ‘v8::Value::ToObject()’ !Buffer::HasInstance(info[0])) || (Buffer::Length(info[0]->ToObject()) != 32)) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:22:77: error: no matching function for call to ‘v8::Value::ToObject()’ const unsigned char seed = (unsigned char)Buffer::Data(info[0]->ToObject()); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:35:63: error: no matching function for call to ‘v8::Object::Set(v8::Local, v8::Local&)’ result->Set(Nan::New("publicKey").ToLocalChecked(), publicKey); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:3639:37: note: candidate: v8::Maybe v8::Object::Set(v8::Local, v8::Local, v8::Local) V8_WARN_UNUSED_RESULT Maybe Set(Local context, ^~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:3639:37: note: candidate expects 3 arguments, 2 provided /root/.cache/node-gyp/14.0.0/include/node/v8.h:3642:37: note: candidate: v8::Maybe v8::Object::Set(v8::Local, uint32_t, v8::Local) V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, ^~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:3642:37: note: candidate expects 3 arguments, 2 provided ../src/ed25519.cc:36:65: error: no matching function for call to ‘v8::Object::Set(v8::Local, v8::Local&)’ result->Set(Nan::New("privateKey").ToLocalChecked(), privateKey); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:3639:37: note: candidate: v8::Maybe v8::Object::Set(v8::Local, v8::Local, v8::Local) V8_WARN_UNUSED_RESULT Maybe Set(Local context, ^~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:3639:37: note: candidate expects 3 arguments, 2 provided /root/.cache/node-gyp/14.0.0/include/node/v8.h:3642:37: note: candidate: v8::Maybe v8::Object::Set(v8::Local, uint32_t, v8::Local) V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index, ^~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:3642:37: note: candidate expects 3 arguments, 2 provided ../src/ed25519.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Sign(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/ed25519.cc:53:69: error: no matching function for call to ‘v8::Value::ToObject()’ if ((info.Length() < 2) || (!Buffer::HasInstance(info[0]->ToObject()))) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:56:74: error: no matching function for call to ‘v8::Value::ToObject()’ (Buffer::HasInstance(info[1])) && (Buffer::Length(info[1]->ToObject()) == 32)) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:57:72: error: no matching function for call to ‘v8::Value::ToObject()’ unsigned char seed = (unsigned char)Buffer::Data(info[1]->ToObject()); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:65:81: error: no matching function for call to ‘v8::Value::ToObject()’ (Buffer::HasInstance(info[1])) && (Buffer::Length(info[1]->ToObject()) == 64)) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:66:63: error: no matching function for call to ‘v8::Value::ToObject()’ privateKey = (unsigned char*)Buffer::Data(info[1]->ToObject()); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:68:53: error: no matching function for call to ‘v8::Value::ToObject()’ Local privateKeyBuffer = info[1]->ToObject()->Get(Nan::New("privateKey").ToLocalChecked())->ToObject(); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:76:2: error: ‘Handle’ was not declared in this scope Handle message = info[0]->ToObject(); ^~ ../src/ed25519.cc:76:15: error: expected primary-expression before ‘>’ token Handle message = info[0]->ToObject(); ^ ../src/ed25519.cc:76:17: error: ‘message’ was not declared in this scope Handle message = info[0]->ToObject(); ^~~ ../src/ed25519.cc:76:45: error: no matching function for call to ‘v8::Value::ToObject()’ Handle message = info[0]->ToObject(); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE Verify(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/ed25519.cc:101:69: error: no matching function for call to ‘v8::Value::ToObject()’ if ((info.Length() < 3) || (!Buffer::HasInstance(info[0]->ToObject())) || ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:102:43: error: no matching function for call to ‘v8::Value::ToObject()’ (!Buffer::HasInstance(info[1]->ToObject())) || (!Buffer::HasInstance(info[2]->ToObject()))) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:102:90: error: no matching function for call to ‘v8::Value::ToObject()’ stance(info[1]->ToObject())) || (!Buffer::HasInstance(info[2]->ToObject()))) { ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:105:2: error: ‘Handle’ was not declared in this scope Handle message = info[0]->ToObject(); ^~ ../src/ed25519.cc:105:15: error: expected primary-expression before ‘>’ token Handle message = info[0]->ToObject(); ^ ../src/ed25519.cc:105:17: error: ‘message’ was not declared in this scope Handle message = info[0]->ToObject(); ^~~ ../src/ed25519.cc:105:45: error: no matching function for call to ‘v8::Value::ToObject()’ Handle message = info[0]->ToObject(); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~~~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:106:15: error: expected primary-expression before ‘>’ token Handle signature = info[1]->ToObject(); ^ ../src/ed25519.cc:106:17: error: ‘signature’ was not declared in this scope Handle signature = info[1]->ToObject(); ^~~ ../src/ed25519.cc:106:47: error: no matching function for call to ‘v8::Value::ToObject()’ Handle signature = info[1]->ToObject(); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc:107:15: error: expected primary-expression before ‘>’ token Handle publicKey = info[2]->ToObject(); ^ ../src/ed25519.cc:107:17: error: ‘publicKey’ was not declared in this scope Handle publicKey = info[2]->ToObject(); ^~~ ../src/ed25519.cc:107:47: error: no matching function for call to ‘v8::Value::ToObject()’ Handle publicKey = info[2]->ToObject(); ^ In file included from /root/.cache/node-gyp/14.0.0/include/node/node.h:67:0, from ../src/ed25519.cc:1: /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate: v8::MaybeLocal v8::Value::ToObject(v8::Local) const V8_WARN_UNUSED_RESULT MaybeLocal ToObject( ^~ /root/.cache/node-gyp/14.0.0/include/node/v8.h:2819:44: note: candidate expects 1 argument, 0 provided ../src/ed25519.cc: At global scope: ../src/ed25519.cc:120:17: error: variable or field ‘InitModule’ declared void void InitModule(Handle exports) { ^~ ../src/ed25519.cc:120:17: error: ‘Handle’ was not declared in this scope ../src/ed25519.cc:120:30: error: expected primary-expression before ‘>’ token void InitModule(Handle exports) { ^ ../src/ed25519.cc:120:32: error: ‘exports’ was not declared in this scope void InitModule(Handle exports) { ^~~ In file included from ../src/ed25519.cc:1:0: ../src/ed25519.cc:126:22: error: ‘InitModule’ was not declared in this scope NODE_MODULE(ed25519, InitModule) ^ /root/.cache/node-gyp/14.0.0/include/node/node.h:731:36: note: in definition of macro ‘NODE_MODULE_X’ (node::addon_register_func) (regfunc), \ ^~~ ../src/ed25519.cc:126:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(ed25519, InitModule) ^~~ ed25519.target.mk:151: recipe for target 'Release/obj.target/ed25519/src/ed25519.o' failed make: *** [Release/obj.target/ed25519/src/ed25519.o] Error 1 make: Leaving directory '/usr/local/lib/node_modules/homebridge-apple-tv/node_modules/ed25519/build' gyp ERR! build error gyp ERR! stack Error: makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Linux 4.19.66-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/homebridge-apple-tv/node_modules/ed25519 gyp ERR! node -v v14.0.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ed25519@0.0.4 install:node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ed25519@0.0.4 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-04-27T14_52_55_002Z-debug.log `

beware when updating your node version as it will break this plugin.

Looking forward to a fix as this was one of my favorite plugins.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

NajibNour commented 4 years ago

@NorthernMan54 I will give it a shot! Thanks for the help!