normen / homebridge-landroid

Homebridge plugin to control Worx Landroid robo mowers through the Worx Cloud
24 stars 8 forks source link

Error installing the latest update 0.12.3 #65

Closed robinwidhede closed 7 months ago

robinwidhede commented 10 months ago

Hello,

I am getting error when trying to either update to latest version 0.12.3 or re-install the plugin.

I get the following message:

USER: pi DIR: /var/lib/homebridge CMD: npm install --save homebridge-landroid@0.12.3

(##################) ⠹ reify:aws-crt: timing reifyNode:node_modules/homebridge-landroid/n

aws-crt@1.18.3 install node ./scripts/install.js

Found tar in node list!reify:aws-crt: timing reifyNode:node_modules/homebridge-landroid/n tar perform step failed withError: Cannot find module 'tar' Require stack:

Error: Cannot find module 'tar' Require stack:

Node.js v20.9.0 npm ERR! code 1 npm ERR! path /var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt npm ERR! command failed npm ERR! command sh -c node ./scripts/install.js

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-03T23_44_20_242Z-debug-0.log

Operation failed. Please review log for details.

Thanks in advance.

normen commented 10 months ago

Whats the platform? 64bit or 32?

robinwidhede commented 10 months ago

Homebridge.

normen commented 10 months ago

Uhm, are you chat gpt 3?

robinwidhede commented 10 months ago

No, but I am unsure. I am running Homebridge only on the Rasperry. So it is not running inside Raspbian.

iuliusmaximilian commented 10 months ago

Same for me on 64 bit Rasp with all latest Rasp. Updates, Update stuck at ...

pi@raspberrypi:~ $ sudo -E -n npm install -g homebridge-landroid@0.12.3
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
(##################) ⠹ reify:aws-crt: timing reifyNode:node_modules/homebridge-landroid/node_modules/moment Completed in 7080ms
normen commented 10 months ago

As said, the update might take a while, especially on raspi when binaries have to be compiled.

solbadguy2010 commented 10 months ago

My Pi also give Cmake and tar errors during installation. Took a long time and I waited patiently :-)

But after the install this is in the HB log:

[05/11/2023, 10:01:17] ==================== [05/11/2023, 10:01:17] ERROR LOADING PLUGIN homebridge-landroid: [05/11/2023, 10:01:17] Error: AWS CRT binary not present in any of the following locations: /var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt/dist/bin/linux-arm-glibc/aws-crt-nodejs at Object. (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt/lib/native/binding.js:74:11) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Function.Module._load (node:internal/modules/cjs/loader:938:12) at Module.require (node:internal/modules/cjs/loader:1115:19) at require (node:internal/modules/helpers:130:18) at Object. (/var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt/lib/native/auth.ts:15:1) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10) [05/11/2023, 10:01:17] ====================

solbadguy2010 commented 10 months ago

I also installed cmake via terminal. Install seems to run through now, but error persist. Can I send you any log?

jurassiksame commented 10 months ago

Hi I can't install the plugin on PI:

"......Node.js v18.16.0 npm ERR! code 1 npm ERR! path /var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt npm ERR! command failed npm ERR! command sh -c node ./scripts/install.js

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-11-05T11_14_07_219Z-debug-0.log

Operation failed. Please review log for details."

Any help on this ?

normen commented 10 months ago

Try installing node-gyp with sudo npm install -g node-gyp

jurassiksame commented 10 months ago

Try installing node-gyp with sudo npm install -g node-gyp

Very thanks for your fast replay, how I do that, I don't knowledge with code...

Regards

solbadguy2010 commented 10 months ago

Try installing node-gyp with sudo npm install -g node-gyp

no change. i use stock homebridge image from https://homebridge.io you should check your plug against it. 11.9 was still working, since 12.0 and up no install is successful. i tried them all.

i looks like aws-crt is failing to install. I also tried to install is manually with npm but it fails also...

BenouGui commented 10 months ago

Same problem

normen commented 10 months ago

no change. i use stock homebridge image from https://homebridge.io you should check your plug against it. 11.9 was still working, since 12.0 and up no install is successful. i tried them all.

Why? You reporting it works just as well 😁 Now we just need somebody to report how they make aws-iot-device-sdk-v2 compile on such a system.

solbadguy2010 commented 10 months ago

no change. i use stock homebridge image from https://homebridge.io you should check your plug against it. 11.9 was still working, since 12.0 and up no install is successful. i tried them all.

Why? You reporting it works just as well 😁 Now we just need somebody to report how they make aws-iot-device-sdk-v2 compile on such a system.

Nope. Was an error from my side. The installer still trows errors. It only closes itself in the end. Ita not working anymore. 11.9 was working, 12.0 to current not

normen commented 10 months ago

Nope. Was an error from my side. The installer still trows errors. It only closes itself in the end. Ita not working anymore. 11.9 was working, 12.0 to current not

I didn't deny that it doesn't work for you, I just said that you're my guinea pig.

normen commented 10 months ago

The issue seems to appear with the upstream library as well, see https://github.com/iobroker-community-adapters/ioBroker.worx/issues/729

The compilation bogged down my small 1GB Pi3 quite a lot but it went through on two different Pi's for me..

Check the logs that the error message is mentioning everybody, I guess some base compilation stuffs isn't installed on the os in the homebridge image. Maybe try sudo apt install cmake? It's the only thing I could imagine is missing. Otherwise it could simply be your pi running out of RAM during the compilation..

solbadguy2010 commented 10 months ago

The issue seems to appear with the upstream library as well, see iobroker-community-adapters/ioBroker.worx#729

The compilation bogged down my small 1GB Pi3 quite a lot but it went through on two different Pi's for me..

Check the logs that the error message is mentioning everybody, I guess some base compilation stuffs isn't installed on the os in the homebridge image. Maybe try sudo apt install cmake? It's the only thing I could imagine is missing. Otherwise it could simply be your pi running out of RAM during the compilation..

I already tried to install cmake. Also installed tar wirh npm. No change. Can i send you aby specific log?

normen commented 10 months ago

The crash usually displays where the log is like A complete log of this run can be found in...

solbadguy2010 commented 10 months ago

The crash usually displays where the log is like A complete log of this run can be found in...

Logs.zip

I hope this helps?

normen commented 10 months ago

The crash usually displays where the log is like A complete log of this run can be found in...

Logs.zip

I hope this helps?

Nope, none of these seem to contain an install attempt.

solbadguy2010 commented 10 months ago

Sorry, i also deletes them before testing. I do not know what i can do to help. Guide me, Master.

normen commented 10 months ago

I need a full log of a failed install attempt.

solbadguy2010 commented 10 months ago

Whats the best way to optain it? I googled me what i send you last time. Logs were from /home/pi/.NPM/

normen commented 10 months ago

Attempt to install the plugin, read the log name in the error message.

BenouGui commented 10 months ago

SER: pi DIR: /usr/local CMD: sudo -E -n npm install -g homebridge-landroid@0.12.3

(##################) ⠦ reify:aws-crt: timing reifyNode:node_modules/homebridge-landroi

aws-crt@1.19.0 install node ./scripts/install.js

Found tar in node list!reify:aws-crt: timing reifyNode:node_modules/homebridge-landroi Found axios in node list!ify:aws-crt: timing reifyNode:node_modules/homebridge-landroi Source file download succeed!aws-crt: timing reifyNode:node_modules/homebridge-landroi Found cmake-js in node list!:aws-crt: timing reifyNode:node_modules/homebridge-landroi info TOOL Using Unix Makefiles generator.ing reifyNode:node_modules/homebridge-landroi info TOOL Building only the install target, as specified from the command line. ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org. tar perform step failed withError: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org. /usr/local/lib/node_modules/cmake-js/lib/cMake.js:117e:node_modules/homebridge-landroi throw new Error("CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org."); ^

Error: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org. at CMake.verifyIfAvailable (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:117:15) at CMake.build (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:375:10) at BuildSystem._invokeCMake (/usr/local/lib/node_modules/cmake-js/lib/buildSystem.js:86:40) at async Object.buildSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:34:9) at async Object.performStep (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:22:13) at async buildFromRemoteSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build.js:66:9)

Node.js v18.18.0 npm ERR! code 1 npm ERR! path /usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt npm ERR! command failed npm ERR! command sh -c node ./scripts/install.js

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-08T10_09_40_902Z-debug-0.log

Operation failed. Please review log for details.

solbadguy2010 commented 10 months ago

That was my state also prior „sudo apt install cmake“.

normen commented 10 months ago

Yeah, that one failed due to cmake missing and sudo apt install cmake should fix that. Whats the error message with cmake installed - if there is one?

iuliusmaximilian commented 10 months ago
sudo -E -n npm install cmake -g homebridge-landroid@0.12.3
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js
npm ERR! Found tar in node list!
npm ERR! Could not find axios version 1.6.0
npm ERR! Looking for axios version 1.6.0 as a dependency...
npm ERR! Could not find axios version 1.6.0
npm ERR! Could not find axios
npm ERR! Downloading axios from npm for build...
npm ERR! Source file download succeed!
npm ERR! Could not find cmake-js version 7.2.1
npm ERR! Looking for cmake-js version 7.2.1 as a dependency...
npm ERR! Could not find cmake-js version 7.2.1
npm ERR! Could not find cmake-js
npm ERR! Downloading cmake-js from npm for build...
npm ERR! tar perform step failed withError: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! info TOOL Using Unix Makefiles generator.
npm ERR! info TOOL Building only the install target, as specified from the command line.
npm ERR! ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! /usr/local/lib/node_modules/cmake-js/lib/cMake.js:117
npm ERR!         throw new Error("CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.");
npm ERR!               ^
npm ERR! 
npm ERR! Error: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR!     at CMake.verifyIfAvailable (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:117:15)
npm ERR!     at CMake.build (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:375:10)
npm ERR!     at BuildSystem._invokeCMake (/usr/local/lib/node_modules/cmake-js/lib/buildSystem.js:86:40)
npm ERR!     at async Object.buildSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:34:9)
npm ERR!     at async Object.getPackageAndBuildSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:56:9)
npm ERR!     at async Object.performStep (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:24:13)
npm ERR!     at async buildFromRemoteSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build.js:66:9)
npm ERR! 
npm ERR! Node.js v20.9.0

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-08T12_12_18_271Z-debug-0.log
iuliusmaximilian commented 10 months ago
pi@raspberrypi:~ $ sudo -E -n npm install -g homebridge-landroid@0.12.3
npm WARN deprecated crypto@1.0.1: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt
npm ERR! command failed
npm ERR! command sh -c node ./scripts/install.js
npm ERR! Found tar in node list!
npm ERR! Found axios in node list!
npm ERR! Source file download succeed!
npm ERR! Found cmake-js in node list!
npm ERR! tar perform step failed withError: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! info TOOL Using Unix Makefiles generator.
npm ERR! info TOOL Building only the install target, as specified from the command line.
npm ERR! ERR! OMG CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR! /usr/local/lib/node_modules/cmake-js/lib/cMake.js:117
npm ERR!         throw new Error("CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.");
npm ERR!               ^
npm ERR! 
npm ERR! Error: CMake executable is not found. Please use your system's package manager to install it, or you can get installers from there: http://cmake.org.
npm ERR!     at CMake.verifyIfAvailable (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:117:15)
npm ERR!     at CMake.build (/usr/local/lib/node_modules/cmake-js/lib/cMake.js:375:10)
npm ERR!     at BuildSystem._invokeCMake (/usr/local/lib/node_modules/cmake-js/lib/buildSystem.js:86:40)
npm ERR!     at async Object.buildSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:34:9)
npm ERR!     at async Object.performStep (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build_dependencies/build_step_cmake.js:22:13)
npm ERR!     at async buildFromRemoteSource (/usr/local/lib/node_modules/homebridge-landroid/node_modules/aws-crt/scripts/build.js:66:9)
npm ERR! 
npm ERR! Node.js v20.9.0

npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-08T12_18_25_348Z-debug-0.log
normen commented 10 months ago

sudo apt install cmake

BenouGui commented 10 months ago

LogPi.pdf

Version 11.9 works I completely uninstalled and reinstalled 12.3 and it doesn't work.

normen commented 10 months ago

LogPi.pdf

Version 11.9 works I completely uninstalled and reinstalled 12.3 and it doesn't work.

In that log the installation was terminated from the outside. So either you stopped the install or the OS stopped the process because it was taking up too much memory.

BenouGui commented 10 months ago

I didn't stop the installation... I have 4gb of ram IMG_3308

No problem with the other plugins and no problems with version 11.9…

normen commented 10 months ago

Yeah, the upstream library uses a new connector which apparently requires a binary to be compiled for raspberry pi, thats why the older version doesn't have this issue.

solbadguy2010 commented 10 months ago

Time for you to order a pi, i guess ;-)

normen commented 10 months ago

Time for you to order a pi, i guess ;-)

I have like 8 of them, as said it compiled fine for me on two Pis already. And why would I spend money if I didn't have one?

solbadguy2010 commented 10 months ago

It was a joke ;-) But maybe install the Image from

https://github.com/homebridge/homebridge-raspbian-image/releases/tag/v1.0.41

and see yourself?

SNAEV commented 10 months ago

Seems that I have the same two (?) problems described here on my Raspberry. Install runs fine after "sudo apt install cmake" but then starting the plugin fails with:

ERROR LOADING PLUGIN homebridge-landroid: Error: AWS CRT binary not present in any of the following locations: /var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt/dist/bin/linux-arm-glibc/aws-crt-nodejs

Correct path on my Raspberry is: /var/lib/homebridge/node_modules/homebridge-landroid/node_modules/aws-crt/dist/bin/linux-arm64-glibc/aws-crt-nodejs

Seems there is something wrong with the path, but I can't find out, if this is a node.js problem or something with the plugin because downgrading the plugin to previous version has the same error now when starting. Any ideas?

iuliusmaximilian commented 9 months ago

Same for me, since the update 0.12.3 my instance is broken and downgrade does also not work with same error

SNAEV commented 9 months ago

Error is gone after upgrading homebride with apt-get.

justdun commented 8 months ago

Thanks all for your suggestions on this. This workflow removed the errors in upgrading for me:

  1. From your Homebridge server Rasberry Pi command line, install cmake: sudo apt-get install cmake

  2. From within Homebridge install the Landroid Plugin and configure. NB: This will still show an error on Homebridge restart.

  3. From your Homebridge server Rasberry Pi command line, update/reinstall Homebridge: a. sudo apt-get update b. sudo apt-get reinstall homebridge

  4. Restart Homebridge after update - and the plugin should now work (did for me!)

Thanks all.

normen commented 8 months ago

Just as a heads up, given the issues with this approach I am moving my own setup to FHEM, which supports worx mowers out of the box. The main issue is making good homekit mappings so that the functionality of this plugin is matched.