From 912c572ec0929c1c550aa3ef51a09aa0eac77462 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 17:13:28 +0000 Subject: [PATCH 2/3] Fix Illegal instruction crash on aarch64 by rebuilding native modules On aarch64, native Node.js modules (sharp, @next/swc, etc.) may have been incorrectly cross-compiled via Docker BuildKit QEMU emulation. Add an npm rebuild step that runs at startup on aarch64 to re-download the correct prebuilt native binaries for the actual hardware. Fixes #XXXX Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- social_to_mealie/rootfs/etc/cont-init.d/99-run.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/social_to_mealie/rootfs/etc/cont-init.d/99-run.sh b/social_to_mealie/rootfs/etc/cont-init.d/99-run.sh index 8f91eae4e..67790c774 100755 --- a/social_to_mealie/rootfs/etc/cont-init.d/99-run.sh +++ b/social_to_mealie/rootfs/etc/cont-init.d/99-run.sh @@ -4,6 +4,16 @@ set -e bashio::log.info "Starting Social to Mealie" cd /app || bashio::exit.nok "App directory not found" + +# On aarch64, native Node.js modules (sharp, @next/swc, etc.) may have been +# incorrectly cross-compiled via Docker BuildKit QEMU emulation, causing +# "Illegal instruction" crashes on real hardware. Rebuild them for the actual +# native architecture. +if [ "$(uname -m)" = "aarch64" ]; then + bashio::log.info "Ensuring native modules are built for aarch64..." + npm rebuild 2>&1 || bashio::log.warning "Could not rebuild native modules - the addon may not work correctly on this architecture" +fi + chown nextjs /app/entrypoint.sh chmod +x /app/entrypoint.sh exec gosu nextjs /app/entrypoint.sh node --run start From 5d21eaaa565d2d739e458785bff47e6fb299de2a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 26 Feb 2026 19:12:46 +0100 Subject: [PATCH 3/3] Update config.yaml --- social_to_mealie/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/social_to_mealie/config.yaml b/social_to_mealie/config.yaml index ea2085844..829c64c31 100644 --- a/social_to_mealie/config.yaml +++ b/social_to_mealie/config.yaml @@ -1,5 +1,5 @@ name: Social to Mealie -version: "1.4.0" +version: "1.4.0-2" slug: social_to_mealie description: Import recipes from social media directly into Mealie url: https://github.com/alexbelgium/hassio-addons