Hello , I am trying to make bleno run within an Electron App:
Node version : 8.15.0
NPM version : 6.4.1
Operating System : Raspbian (on Raspberry Pi3)
Arch : armv71
bleno : 0.5.0
electron : 3.0.13
The module works when I try to use it without Electron , but when I do electron-rebuild I get the following error :
An unhandled error occurred inside electron-rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.15.0 | linux | arm
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/pi/AlucentOs/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/AlucentOs/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.electron-gyp/iojs-3.0.13/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.electron-gyp/iojs-3.0.13',
gyp info spawn args '-Dnode_gyp_dir=/home/pi/AlucentOs/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.electron-gyp/iojs-3.0.13/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/AlucentOs/node_modules/bluetooth-hci-socket',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New) const
V8_WARN_UNUSED_RESULT MaybeLocal
Failed with exit code: 1
Error: gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@8.15.0 | linux | arm
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/home/pi/AlucentOs/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/pi/AlucentOs/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.electron-gyp/iojs-3.0.13/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.electron-gyp/iojs-3.0.13',
gyp info spawn args '-Dnode_gyp_dir=/home/pi/AlucentOs/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.electron-gyp/iojs-3.0.13/<(target_arch)/iojs.lib',
gyp info spawn args '-Dmodule_root_dir=/home/pi/AlucentOs/node_modules/bluetooth-hci-socket',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Local MakeCallback(
^~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local [1])’
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /root/.electron-gyp/iojs-3.0.13/src/node.h:54:0,
from /root/.electron-gyp/iojs-3.0.13/src/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3853:44: note: candidate: v8::MaybeLocal v8::Function::NewInstance(v8::Local, int, v8::Local) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~
/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3853:44: note: candidate expects 3 arguments, 2 provided
/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3856:44: note: candidate: v8::MaybeLocal v8::Function::NewInstance(v8::Local) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~
/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3856:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Local MakeCallback(
^~~~
binding.target.mk:99: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed
make: Leaving directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build'
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/AlucentOs/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/local/bin/node" "/home/pi/AlucentOs/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.13" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source"
gyp ERR! cwd /home/pi/AlucentOs/node_modules/bluetooth-hci-socket
gyp ERR! node -v v8.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Failed with exit code: 1
at SafeSubscriber._error (/home/pi/AlucentOs/node_modules/spawn-rx/lib/src/index.js:267:84)
at SafeSubscriber.tryOrUnsub (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:207:16)
at SafeSubscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:158:26)
at Subscriber._error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:92:26)
at Subscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:72:18)
at MapSubscriber.Subscriber._error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:92:26)
at MapSubscriber.Subscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:72:18)
at SafeSubscriber._next (/home/pi/AlucentOs/node_modules/spawn-rx/lib/src/index.js:242:65)
at SafeSubscriber.tryOrUnsub (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:207:16)
at SafeSubscriber.next (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:145:22)
Hello , I am trying to make bleno run within an Electron App:
Node version : 8.15.0 NPM version : 6.4.1 Operating System : Raspbian (on Raspberry Pi3) Arch : armv71 bleno : 0.5.0 electron : 3.0.13
The module works when I try to use it without Electron , but when I do electron-rebuild I get the following error : An unhandled error occurred inside electron-rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.8.0 gyp info using node@8.15.0 | linux | arm gyp info spawn /usr/bin/python2 gyp info spawn args [ '/home/pi/AlucentOs/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/AlucentOs/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.electron-gyp/iojs-3.0.13/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.electron-gyp/iojs-3.0.13', gyp info spawn args '-Dnode_gyp_dir=/home/pi/AlucentOs/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.electron-gyp/iojs-3.0.13/<(target_arch)/iojs.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/AlucentOs/node_modules/bluetooth-hci-socket', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build' CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’: ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New) const
V8_WARN_UNUSED_RESULT MaybeLocal
Failed with exit code: 1
Error: gyp info it worked if it ends with ok gyp info using node-gyp@3.8.0 gyp info using node@8.15.0 | linux | arm gyp info spawn /usr/bin/python2 gyp info spawn args [ '/home/pi/AlucentOs/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/AlucentOs/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/root/.electron-gyp/iojs-3.0.13/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/root/.electron-gyp/iojs-3.0.13', gyp info spawn args '-Dnode_gyp_dir=/home/pi/AlucentOs/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/root/.electron-gyp/iojs-3.0.13/<(target_arch)/iojs.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/AlucentOs/node_modules/bluetooth-hci-socket', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build' CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’: ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Local MakeCallback(
^ [1])’
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /root/.electron-gyp/iojs-3.0.13/src/node.h:54:0,
from /root/.electron-gyp/iojs-3.0.13/src/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3853:44: note: candidate: v8::MaybeLocal v8::Function::NewInstance(v8::Local, int, v8::Local ) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^ v8::Function::NewInstance(v8::Local) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^ Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local*)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h:980:46: note: declared here
NAN_DEPRECATED inline v8::Local MakeCallback(
^
~~~ ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’: ../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local~~/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3853:44: note: candidate expects 3 arguments, 2 provided /root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3856:44: note: candidate: v8::MaybeLocal~~/root/.electron-gyp/iojs-3.0.13/deps/v8/include/v8.h:3856:44: note: candidate expects 1 argument, 2 provided ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local~~~ binding.target.mk:99: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed make: Leaving directory '/home/pi/AlucentOs/node_modules/bluetooth-hci-socket/build' make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1 gyp ERR! build error gyp ERR! stack Error:make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/pi/AlucentOs/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.14.79-v7+ gyp ERR! command "/usr/local/bin/node" "/home/pi/AlucentOs/node_modules/.bin/node-gyp" "rebuild" "--target=3.0.13" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source" gyp ERR! cwd /home/pi/AlucentOs/node_modules/bluetooth-hci-socket gyp ERR! node -v v8.15.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not okFailed with exit code: 1 at SafeSubscriber._error (/home/pi/AlucentOs/node_modules/spawn-rx/lib/src/index.js:267:84) at SafeSubscriber.tryOrUnsub (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:207:16) at SafeSubscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:158:26) at Subscriber._error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:92:26) at Subscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:72:18) at MapSubscriber.Subscriber._error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:92:26) at MapSubscriber.Subscriber.error (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:72:18) at SafeSubscriber._next (/home/pi/AlucentOs/node_modules/spawn-rx/lib/src/index.js:242:65) at SafeSubscriber.tryOrUnsub (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:207:16) at SafeSubscriber.next (/home/pi/AlucentOs/node_modules/rxjs/internal/Subscriber.js:145:22)
Steps to Reproduce :
package.json :