HAP-NodeJS: Beta v1.4.0-beta.1 crashes on Pi Zero
Analysis
Homebridge beta v1.4.0-beta.1 crashes on startup on a Raspberry Pi Zero. Not sure if related, but npm
invokes node-gyp
when installing the beta.
See the Homebridge log below. Attached the npm
log: 2021-12-31T07_15_18_070Z-debug-0.log
Expected Behavior
No crash, obviously.
Steps To Reproduce
Standard Homebridge installation as per the Wiki on the Pi Zero. Install Homebridge beta through the UI.
Logs
[Dec 31 06:14:40] [31/12/2021, 06:14:40] [HB Supervisor] Restarting Homebridge...
[Dec 31 06:14:40] [31/12/2021, 06:14:40] [HB Supervisor] Starting Homebridge with extra flags: -T -D
[Dec 31 06:14:40] [31/12/2021, 06:14:40] [HB Supervisor] Starting Homebridge with custom env: {"NODE_OPTIONS":"--trace-warnings"}
[Dec 31 06:14:40] [31/12/2021, 06:14:40] [HB Supervisor] Started Homebridge v1.4.0-beta.1 with PID: 32243
[Dec 31 06:14:56] #
[Dec 31 06:14:56] # Fatal error in , line 0
[Dec 31 06:14:56] # Liftoff bailout should not happen. Cause: Armv6 not supported
[Dec 31 06:14:56] #
[Dec 31 06:14:56] #
[Dec 31 06:14:56] #
[Dec 31 06:14:56] #FailureMessage Object: 0xb49faf50
[Dec 31 06:14:57] [31/12/2021, 06:14:57] [HB Supervisor] Homebridge Process Ended. Code: null, Signal: SIGTRAP
Configuration
Crash happens before config.json is read.
Environment
- OS: Raspbian GNU/Linux 11 (bullseye)
- Software: 1.4.0-beta.1
- Node: v16.13.1
- npm: 8.3.0
Process Supervisor
hb-service
Additional Context
Starting Homebrigde manually:
$ homebridge -D
#
# Fatal error in , line 0
# Liftoff bailout should not happen. Cause: Armv6 not supported
#
#
#
#FailureMessage Object: 0xb61fdf50
Trace/breakpoint trap (core dumped)
Running node with --no-expose-wasm
:
$ node --no-expose-wasm $(which homebridge)
[31/12/2021, 19:29:20] config.json (/home/pi/.homebridge/config.json) not found.
[31/12/2021, 19:29:21] ---
[31/12/2021, 19:29:35] Plugin /usr/local/lib/node_modules/homebridge-lib package.json does not contain the keyword 'homebridge-plugin'.
[31/12/2021, 19:29:37] Loaded plugin: homebridge-config-ui-x@4.41.5
[31/12/2021, 19:29:37] Registering platform 'homebridge-config-ui-x.config'
[31/12/2021, 19:29:37] ---
Setup Payload:
X-HM://0023ISYWYRK87
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
[...]
Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
┌────────────┐
│ 031-45-154 │
└────────────┘
[31/12/2021, 19:29:41] Homebridge v1.4.0-beta.1 (HAP v0.10.0-beta.4) (Homebridge) is running on port 36941.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 28 (28 by maintainers)
@adriancable thanks for escalating the issue to
long
andnode
🚀Patching the file, commenting out these lines causes it to load just fine.
@oznu - I’d be happy to suggest it but first I think we need to be sure there is actually a problem with
abstract-socket
(on ARMv6). In that case, that’s a strong case to present to thedbus-native
maintainer. I’m not really sure we can confidently make that request right now.Happy to do some testing, but I’m using Homebridge, and HAP-NodeJS installs through that. Haven’t found any package-lock.json in the Homerbridge nor HAP-NodeJS installation directories.
@Supereg - unfortunately I don’t have an ARMv6 platform to test on. But what I have verified is this: as an experiment I deleted package-lock.json (otherwise npm ignores --no-optional), then I run
npm i --no-optional
, I confirm that abstract-socket is not installed, and node-gyp does not run. So if indeed abstract-socket is the cause, your suggestion of forking dbus-native and removing that dependency completely would work.Having a little look through dbus-native, it seems that abstract-socket is only used for the unit tests, hence it’s safe to skip it in production.