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

0.42.1. CompileError: WebAssembly.compile(): Compiling function #66 failed: Wasm SIMD unsupported @+5368 (older version works!) #259

Closed
5 tasks done
ZyroBlue opened this issue Mar 7, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@ZyroBlue
Copy link

ZyroBlue commented Mar 7, 2024

Description of Issue

Hello, I realised today that my network was sluggish. I checked pi-hole (all good) and then HB. HB was stuck in a reboot loop and by process of elimination of my two plugins, I was able to find out that HB runs just fine without homebridge-homeconnect (other than HC, I only use hue and that works). With HC installed, I get the aforementioned red error message in the console and right after that, a SIGTERM, then restart, red error message, SIGTERM.

I since performed a clean install (without backup even) to no avail.

Disabling the plugin is not enough for HB to function normally. It needs to be removed.

Tried downgrading to 0.41.1 on the off chance - it works! HB runs fine, no crashes, I can add my devices etc.

Expected Behaviour

HB should run!

Steps to Reproduce

start HB on most recent plugin version.

Plugin Version

0.41.2

Environment

  • OS: Raspbian GNU/Linux Bullseye (11)
  • Node: v20.11.0
  • Homebridge: Homebridge v1.7.0 (HAP v0.11.1)

Home Connect Appliance(s)

No response

HomeKit App(s)

No response

Diagnostic Checks

Log File

[7.3.2024, 22:14:03] CompileError: WebAssembly.compile(): Compiling function #66 failed: Wasm SIMD unsupported @+5368
[7.3.2024, 22:14:04] Got SIGTERM, shutting down Homebridge...
[7.3.2024, 22:14:04] Homebridge v1.7.0 (HAP v0.11.1) (Homebridge CB6A) is running on port 51673.
[7.3.2024, 22:14:09] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[7.3.2024, 22:14:14] [HB Supervisor] Restarting Homebridge...
[7.3.2024, 22:14:14] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[7.3.2024, 22:14:14] [HB Supervisor] Starting Homebridge with custom env: {"DEBUG":"-D"}
[7.3.2024, 22:14:14] [HB Supervisor] Started Homebridge v1.7.0 with PID: 18806
[7.3.2024, 22:14:27] Loaded config.json with 0 accessories and 1 platforms.
[7.3.2024, 22:14:28] Loaded 0 cached accessories from cachedAccessories.
[7.3.2024, 22:14:28] ---
[7.3.2024, 22:14:35] Loaded plugin: homebridge-homeconnect@0.41.2
[7.3.2024, 22:14:35] Registering platform 'homebridge-homeconnect.HomeConnect'
[7.3.2024, 22:14:35] ---
[7.3.2024, 22:15:04] Loaded plugin: homebridge-hue@0.13.70
[7.3.2024, 22:15:04] Registering platform 'homebridge-hue.Hue'
[7.3.2024, 22:15:04] ---
[7.3.2024, 22:15:04] Loading 1 platforms...
Setup Payload:
X-HM://xxxxxxxxxx
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ xxx-xx-xxx │     
    └────────────┘     
                       
[7.3.2024, 22:15:05] CompileError: WebAssembly.compile(): Compiling function #66 failed: Wasm SIMD unsupported @+5368
[7.3.2024, 22:15:05] Got SIGTERM, shutting down Homebridge...

Configuration

{
    "platform": "HomeConnect",
    "name": "HomeConnect"
}

Additional Information

No response

@ZyroBlue ZyroBlue added the bug Something isn't working label Mar 7, 2024
@thoukydides
Copy link
Owner

thoukydides commented Mar 8, 2024

I cannot reproduce that problem on either my development or production setup.

The only differences between v0.41.1 and v0.41.2 are the project dependencies. Only one of those updated dependencies is used at runtime: undici updated from 6.6.2 to 6.7.0. Its changelog mentions some wasm-related changes, so I suspect that might be the cause.

The only other possibly relevant change is that the version of typescript used to compile this project was updated from 5.3.3 to 5.4.2. However, I don’t see how that could trigger a wasm error since it still only outputs JavaScript.

Of course the problem could be caused by an indirect dependency…

This is going to have to wait until I have time to setup a Raspberry Pi with a configuration sufficiently similar to yours to reproduce the error.

What Raspberry Pi model are you using? Since the error is about SIMD support the problem may be specific to a particular CPU version.

How are you installing/running Homebridge, e.g. native install via npm or a Docker image?

@thoukydides
Copy link
Owner

It looks like other projects are seeing the same issue:
https://community.n8n.io/t/error-simd-unsupported-on-docker-n8n-container/42155

… again with undici looking like the culprit.

@ZyroBlue
Copy link
Author

ZyroBlue commented Mar 8, 2024

I figured it wasn’t your plugin specifically, because the changelog implied no such change. But I had nothing else to go on other than “downgrade worked”. Sorry.

HB runs natively on Raspberry Pi Zero W. I use the HB repository install.

@thoukydides
Copy link
Owner

This is almost certainly due to nodejs/undici#2934, which is fixed by nodejs/undici#2935. Updating to the next undici release should fix it…

@sergey-sc
Copy link

same here. uninstall and then install 0.41.1 helps

@thoukydides
Copy link
Owner

v0.41.3 updates undici from 6.7.0 to 6.7.1, which should remove the requirement for a CPU with SIMD support.

@ZyroBlue
Copy link
Author

ZyroBlue commented Mar 9, 2024

fixed for me. Thanks a lot!

@ZyroBlue ZyroBlue closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants