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

Bug: Installing version 2.12.0 404 error on abandonware... #869

Closed
ukiews opened this issue Nov 17, 2023 · 27 comments · Fixed by abandonware/noble#321
Closed

Bug: Installing version 2.12.0 404 error on abandonware... #869

ukiews opened this issue Nov 17, 2023 · 27 comments · Fixed by abandonware/noble#321
Assignees
Labels
bug Something isn't working pinned

Comments

@ukiews
Copy link

ukiews commented Nov 17, 2023

Describe the Bug

Getting the following error during install:

@abandonware/bluetooth-hci-socket@0.5.3-10 install
node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'

To Reproduce

Update

Expected Behavior

no error

Relevant Log Output

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz 
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'

Config for homebridge-switchbot

na

Screenshots

No response

Device and Model

Raspberry Pi 4

Node.js Version

20.9.0

NPM Version

10.1.0

Homebridge Version

1.7.0

Homebridge Switchbot Plugin Version

2.12

Homebridge Config UI X Plugin Version

4.52.3

Operating System

Raspbian

@ukiews
Copy link
Author

ukiews commented Nov 17, 2023

@katzenbaer
Copy link

I'm also hitting this.

@donavanbecker
Copy link
Collaborator

will be resolved in next release.

@vjonas
Copy link

vjonas commented Nov 23, 2023

Same issue here. I get errors on node-switchbot:[Object object]
It can not establish the ble connection

@matmartinez
Copy link

Hey! Adding my two cents here: still an issue with v2.12.1 from a few hours ago.

@ukiews
Copy link
Author

ukiews commented Nov 27, 2023

Getting the following errors now with v.2.12.1

Running post-install scripts...

> @abandonware/bluetooth-hci-socket@0.5.3-10 install
> node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz 

make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../../nan/nan.h:689:32: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
  689 |         idle_time_in_ms * 0.001);
      |                                ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
 1293 |   bool IdleNotificationDeadline(double deadline_in_seconds);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
 1172 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X'
 1206 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro 'NODE_MODULE'
  740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
  COPY Release/bluetooth_hci_socket.node
  COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'

> @abandonware/noble@1.9.2-23 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
  SOLINK_MODULE(target) Release/obj.target/noble.node
  COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'

> usb@1.9.2 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
  COPY Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                  ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                   ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before '>' token
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                       ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                           ^~~~~~~~~~~~~~~~~~~~~
      |                                           is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                 ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before '=' token
  123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                     ^

In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: 'std::string_view' has not been declared
  711 |     Environment* env, std::string_view main_script_source_utf8);
      |                            ^~~~~~~~~~~
../src/node_usb.cc: In function 'Napi::Value SetDebugLevel(const Napi::CallbackInfo&)':
../src/node_usb.cc:118:71: warning: 'void libusb_set_debug(libusb_context*, int)' is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
  118 |  libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
      |                                                                       ^
In file included from ../src/node_usb.h:11,
                 from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
 1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-27T16_02_24_841Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.

Bundled install / update could not complete. Trying regular install / update using npm.

USER: pi
DIR: /var/lib/homebridge
CMD: npm install --save @switchbot/homebridge-switchbot@2.12.1

@roomonthethird
Copy link

Hello! I'm still having the same issue as of v2.13.0

@ukiews
Copy link
Author

ukiews commented Dec 15, 2023

Still having the issue with 2.13.1:

Running post-install scripts...

> @abandonware/bluetooth-hci-socket@0.5.3-10 install
> node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz 

make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../../nan/nan.h:689:32: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
  689 |         idle_time_in_ms * 0.001);
      |                                ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
 1293 |   bool IdleNotificationDeadline(double deadline_in_seconds);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
 1172 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X'
 1206 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro 'NODE_MODULE'
  740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
  COPY Release/bluetooth_hci_socket.node
  COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'

> @abandonware/noble@1.9.2-23 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
  SOLINK_MODULE(target) Release/obj.target/noble.node
  COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'

> usb@1.9.2 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
  COPY Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                  ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                   ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before '>' token
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                       ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                           ^~~~~~~~~~~~~~~~~~~~~
      |                                           is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                 ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before '=' token
  123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                     ^

In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: 'std::string_view' has not been declared
  711 |     Environment* env, std::string_view main_script_source_utf8);
      |                            ^~~~~~~~~~~
../src/node_usb.cc: In function 'Napi::Value SetDebugLevel(const Napi::CallbackInfo&)':
../src/node_usb.cc:118:71: warning: 'void libusb_set_debug(libusb_context*, int)' is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
  118 |  libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
      |                                                                       ^
In file included from ../src/node_usb.h:11,
                 from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
 1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-12-15T16_13_11_943Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.

Bundled install / update could not complete. Trying regular install / update using npm.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 31, 2023
@roomonthethird
Copy link

Is there any way to work around this? I'm trying to use my Switchbot Bot with BLE...

@github-actions github-actions bot removed the stale label Jan 1, 2024
@ukiews
Copy link
Author

ukiews commented Jan 3, 2024

Yes, please update.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 18, 2024
@ukiews
Copy link
Author

ukiews commented Jan 18, 2024

Any word on why this is not being fixed?

@github-actions github-actions bot removed the stale label Jan 19, 2024
@ngandhy
Copy link

ngandhy commented Jan 21, 2024

@donavanbecker - looks like the fix was never pushed into the release as mentioned in Nov 2023. Any fix on the horizon?

@ukiews
Copy link
Author

ukiews commented Jan 31, 2024

Same error with v.3.0.0

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz 

make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
../../../nan/nan.h:689:32: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
  689 |         idle_time_in_ms * 0.001);
      |                                ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
 1293 |   bool IdleNotificationDeadline(double deadline_in_seconds);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
 1172 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro ‘NODE_MODULE_X’
 1206 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro ‘NODE_MODULE’
  740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
      | ^~~~~~~~~~~
  SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
  COPY Release/bluetooth_hci_socket.node
  COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'

> @abandonware/noble@1.9.2-23 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
  SOLINK_MODULE(target) Release/obj.target/noble.node
  COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'

> usb@1.9.2 install
> node-gyp-build


make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
  CC(target) Release/obj.target/libusb/libusb/libusb/core.o
  CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
  CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
  CC(target) Release/obj.target/libusb/libusb/libusb/io.o
  CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
  CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
  CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
  COPY Release/usb.a
  CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
                 from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                  ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                   ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before ‘>’ token
  106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
      |                                                                       ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                           ^~~~~~~~~~~~~~~~~~~~~
      |                                           is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
  123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                 ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before ‘=’ token
  123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
      |                                                                     ^

In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
                 from ../src/node_usb.h:14,
                 from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: ‘std::string_view’ has not been declared
  711 |     Environment* env, std::string_view main_script_source_utf8);
      |                            ^~~~~~~~~~~
../src/node_usb.cc: In function ‘Napi::Value SetDebugLevel(const Napi::CallbackInfo&)’:
../src/node_usb.cc:118:71: warning: ‘void libusb_set_debug(libusb_context*, int)’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
  118 |  libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
      |                                                                       ^
In file included from ../src/node_usb.h:11,
                 from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
 1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
      |                  ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok 
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2024-01-31T23_03_59_678Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.

Bundled install / update could not complete. Trying regular install / update using npm.

USER: pi
DIR: /var/lib/homebridge
CMD: npm install --save @switchbot/homebridge-switchbot@3.0.0

(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ idealTree: sill logfile start cleaning logs, removing 1 files

@dnicolson
Copy link
Collaborator

This error is benign, there is an attempt to download a non-existent binary but bluetooth-hci-socket will always be built from the source.

abandonware/node-bluetooth-hci-socket#54 should fix the issue.

@donavanbecker can you help with getting a release out?

@jankais3r
Copy link

The latest build attempting to fix this benign error completely wrecked the plugin. After the update my Homebridge instance doesn't start up.
image

@dnicolson
Copy link
Collaborator

The fix for this benign error hasn't landed yet in this project.

abandonware/noble#321 needs to be merged and released first.

@vjonas

This comment has been minimized.

@spoonie72
Copy link

Is this going to be fixed, as of today:

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v115-linux-arm64.tar.gz

The most recent updates all have this issue and its killed my HB stability.

@donavanbecker
Copy link
Collaborator

donavanbecker commented Apr 9, 2024

@ukiews
Copy link
Author

ukiews commented Apr 9, 2024

It's a abandonware/node-bluetooth-hci-socket issue.

Could try this: abandonware/node-bluetooth-hci-socket#42

Running 'sudo apt-get install build-essential' says that build-essential "is already on the newest version (12.9)"

@donavanbecker
Copy link
Collaborator

Unfortunately this is something that has to be fixed up stream.

@donavanbecker
Copy link
Collaborator

donavanbecker commented Apr 12, 2024

Looks like there was a new version released up stream. Can you try reinstalling the plugin and see if that resolves this?

@ukiews
Copy link
Author

ukiews commented Apr 13, 2024

Looks like the install issue is fixed.
However, I’m getting this error now when trying operate curtain 3
IMG_4575

The curtain 3 device and Pi4 are close proximity. Is there some way to get more details on the error?

@donavanbecker
Copy link
Collaborator

Closing as that is a different issue. Please open another issue with info of your setup.

@ukiews
Copy link
Author

ukiews commented Apr 16, 2024

To be clear, on the current release (3.4.0). I still get the error:


> @abandonware/bluetooth-hci-socket@0.5.3-11 install
> node-pre-gyp install --fallback-to-build --update-binary

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v115-linux-arm.tar.gz 

make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
  CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from /home/pi/.cache/node-gyp/20.11.0/include/node/node_buffer.h:25,
                 from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.11.0/include/node/node.h:1172:7: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
 1172 |       (node::addon_register_func) (regfunc),                          \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.11.0/include/node/node.h:1206:3: note: in expansion of macro ‘NODE_MODULE_X’
 1206 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:860:1: note: in expansion of macro ‘NODE_MODULE’
  860 | NODE_MODULE(binding, BluetoothHciSocket::Init);
      | ^~~~~~~~~~~

On the latest Beta (3.5.0-beta.9) I never see "Running post-install scripts..." during install. I don't know if there is a way see longs form the past during install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pinned
Projects
None yet
Development

Successfully merging a pull request may close this issue.