homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

Homebridge Docker not working 'functions-have-names' #521

Closed stoffLer closed 8 months ago

stoffLer commented 9 months ago

Analysis

[9/13/2023, 12:50:10 PM] [HB Supervisor] Homebridge Process Ended. Code: 1, Signal: null [9/13/2023, 12:50:15 PM] [HB Supervisor] Restarting Homebridge... [9/13/2023, 12:50:15 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution [9/13/2023, 12:50:15 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 5839 Error: Cannot find module 'functions-have-names' Require stack:

Expected Behavior

running HB...

Steps To Reproduce

Install Docker Version of HB

Logs

[9/13/2023, 12:50:10 PM] [HB Supervisor] Homebridge Process Ended. Code: 1, Signal: null
[9/13/2023, 12:50:15 PM] [HB Supervisor] Restarting Homebridge...
[9/13/2023, 12:50:15 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /var/lib/homebridge/node_modules --strict-plugin-resolution
[9/13/2023, 12:50:15 PM] [HB Supervisor] Started Homebridge v1.6.1 with PID: 5839
Error: Cannot find module 'functions-have-names'
Require stack:
- /opt/homebridge/lib/node_modules/homebridge/node_modules/set-function-name/index.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/regexp.prototype.flags/implementation.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/regexp.prototype.flags/index.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/deep-equal/index.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/bonjour-hap/lib/helpers.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/bonjour-hap/lib/Server.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/bonjour-hap/index.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Advertiser.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/AccessoryLoader.js
- /opt/homebridge/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/index.js
- /opt/homebridge/lib/node_modules/homebridge/lib/cli.js
- /opt/homebridge/lib/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Function.Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/opt/homebridge/lib/node_modules/homebridge/node_modules/set-function-name/index.js:5:38)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Function.Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
[9/13/2023, 12:50:16 PM] [HB Supervisor] Homebridge Process Ended. Code: 1, Signal: null

Configuration

stock

Environment

Process Supervisor

hb-service

Additional Context

No response

stoffLer commented 9 months ago

-> npm install functions-have-names

stoffLer commented 9 months ago

closed

jkossis commented 9 months ago

@stoffLer I think this issue needs to be re-opened, as manually installing that dependency isn't the answer here. It should be included in the docker image.

jkossis commented 9 months ago

@Supereg any way we can get this re-opened?

NorthernMan54 commented 9 months ago

@jkossis @stoffLer pls re-open against the docker-homebridge repo, and include instructions to recreate the issue.

tks

stoffLer commented 9 months ago

done

jarekpelczynski commented 9 months ago

have the same issue running HB on Synology DSM

jkossis commented 9 months ago

I'll open the issue in the docker repo

BOB-DK commented 9 months ago

@stoffLer I have tried: npm install functions-have-names That didn't solve my problem, Homebridge status is still not running.

Is there another way I can solve the problem?

jkossis commented 9 months ago

@BOB-DK are you executing that within the container, and not the host? It should work as a temporary fix.

zanedasavage commented 9 months ago

npm install functions-have-names

This finally worked for me on a qnap container (docker)

Thank you for the tip

BOB-DK commented 9 months ago

@BOB-DK are you executing that within the container, and not the host? It should work as a temporary fix.

@jkossis I actually don't know. I open Terminal via the Homebridge UI Type the command, npm install functions-have-names

2023-09-13 kl  16 19 23

stoffLer commented 9 months ago

@BOB-DK what's the exact error message hb gives u?

NorthernMan54 commented 9 months ago

@stoffLer Something looks odd with your docker-homebridge image

In the docker-homebridge image, the homebridge package gets installed into /var/lib/homebridge/node_modules/homebridge and not /opt/homebridge/lib/node_modules/homebridge.

BOB-DK commented 9 months ago

@stoffLer

This is from my HB log.

[14/09/2023, 16:35:02] [HB Supervisor] Homebridge Process Ended. Code: 1, Signal: null [14/09/2023, 16:35:07] [HB Supervisor] Restarting Homebridge... [14/09/2023, 16:35:07] [HB Supervisor] Starting Homebridge with extra flags: -I [14/09/2023, 16:35:07] [HB Supervisor] Started Homebridge v1.6.1 with PID: 18597 Error: Cannot find module 'functions-have-names' Require stack:

NorthernMan54 commented 9 months ago

@BOB-DK You also have something odd going on with your homebridge image, as your log is showing an install location of /usr/local/lib/node_modules/homebridge instead of the /var/lib/homebridge/node_modules/homebridge

github-actions[bot] commented 8 months ago

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.