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

3.0.15 won't start web interface after updating from previous version with node version updated #124

Closed
manudar opened this issue Jul 19, 2023 · 58 comments
Labels

Comments

@manudar
Copy link

manudar commented Jul 19, 2023

Analysis

Web interface do not start.

Expected Behavior

Web interface should start

Steps To Reproduce

In DSM 7.1.1-42962 Update 6 in an INTEL Xeon D-1527 nas, with the previous versionof Homebridge, and some plugins that would not update to the lates version with the version of node installed in the package, connected to the terminal of Homebridge and updated to a newer node version (sorry I don't remember which one and I cannot check after the update). After this, the plugins updated.
Update to 3.0.15 and the web user interface does not start, I get the connextion restarted browser error each time.

Logs

These are the last messages from before the update. Nothing new after the update
[7/19/2023, 9:05:02 AM] Got SIGTERM, shutting down Homebridge...
[7/19/2023, 9:05:03 AM] Got SIGTERM, shutting down child bridge process...
[7/19/2023, 9:05:03 AM] Got SIGTERM, shutting down child bridge process...
[7/19/2023, 9:05:07 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null

Configuration

{
    "bridge": {
        "name": "Homebridge DA2B",
        "username": "0E:7D:C6:23:DA:2B",
        "port": 52491,
        "pin": "031-45-155",
        "bind": [
            "ovs_bond0"
        ]
    },
    "accessories": [],
    "platforms": [
        {
            "platform": "camera-ffmpeg-ufv",
            "name": "UniFi Video",
            "nvrs": [
                {
                    "apiHost": "192.168.4.141",
                    "apiPort": 7443,
                    "apiProtocol": "https",
                    "apiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "motionSensors": true
                }
            ],
            "_bridge": {
                "username": "0E:D3:B3:C1:8F:E7",
                "port": 54035
            }
        },
        {
            "name": "Config",
            "port": 8581,
            "auth": "none",
            "theme": "auto",
            "tempUnits": "c",
            "lang": "en",
            "platform": "config"
        },
        {
            "name": "Camera FFmpeg",
            "cameras": [
                {
                    "name": "Puerta",
                    "videoConfig": {
                        "source": "-i rtsp://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Sms=19.unicast "
                    }
                }
            ],
            "_bridge": {
                "username": "0E:92:6E:D3:EF:65",
                "port": 43790
            },
            "platform": "Camera-ffmpeg"
        }
    ]
}

Environment

  • OS: DSM 7.1.1-42962 Update 6
  • Node: cannot check after the upgrade
  • npm: cannot check after the upgrade

Process Supervisor

not applicable

Additional Context

No response

@manudar manudar added the bug label Jul 19, 2023
@pasqualito79
Copy link

Same here, as I wrote in the other open issue you can use the Synology integrated node.js as a workaround until it is clarified what is wrong with this updated package. My guess is that it installed a wrong node.js binary which isn't compiled for the cpu architecture we use.

@Manuel2023
Copy link

Same... homberidge UI not accesable after update.

@Faasteer
Copy link

I have the exact same problem. Really annoying because part of my smart home stopped working. I'm going to check out the above workaround.

@manudar
Copy link
Author

manudar commented Jul 19, 2023

How do I change which node.js the synology package uses?

Same here, as I wrote in the other open issue you can use the Synology integrated node.js as a workaround until it is clarified what is wrong with this updated package. My guess is that it installed a wrong node.js binary which isn't compiled for the cpu architecture we use.

@pasqualito79
Copy link

How do I change which node.js the synology package uses?

edit the file /var/packages/homebridge/target/app/source.sh and replace the path for HB_SERVICE_NODE_EXEC_PATH to /var/packages/Node.js_v18/target/usr/local/bin/node so the line should look like this:

export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"

@dbrewood
Copy link

dbrewood commented Jul 19, 2023

Can any kind soul talk me through how to make that edit?
If not I'll see if I can find the prior package and install that manually.

@Manuel2023
Copy link

Can any kind soul talk me through how to make that edit? If not I'll see if I can find the prior package and install that manually.

Talk through any of the above options would be very much appreciated...

@rh295
Copy link

rh295 commented Jul 19, 2023

this issue seems not a general. I have a DS1821+ and here are no problems after updtating to 3.0.15 from previous version (with edited node config)

@dbrewood : #120 (comment)

@manudar
Copy link
Author

manudar commented Jul 19, 2023

Hi, now that I know where the node packaged with homebride is, I tried to run it manually and it gives this error:

./node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./node)
./node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./node)

I did the change and it works now. Thanks

For the people asking how to do this:

  • you need terminal access enabled in the nas.
    Control panel/Conectivity/Terminal and SNMP there enable ssh
  • ssh to the nas
  • edit the file. You need root access so you need to do "sudo vi /var/packages/homebridge/target/app/source.sh" I don't remember if sudo access needs to be enabled and if so, I did it so long ago that I don't remember how to do it. The password that sudo asks is your password.
    If you don't know how to use vi, please practice somewhere else first. vi is text editor.
    when you finish do ":wq!" the ! is important as that file does not have write access.

You coud do this installing a graphical text editor in DSM but I would not know how to get root access for that.

@ebaauw
Copy link
Contributor

ebaauw commented Jul 19, 2023

In DSM 7.1.1-42962 Update 6 in an INTEL Xeon D-1527 nas
I have a DS1821+ and here are no problems after updtating to 3.0.15 from previous version (with edited node config)

No issues on DS918+ nor on DS920+ running DSM 7.2-64570 Update 1. Both have an Intel Celeron processor.

My guess is that it installed a wrong node.js binary which isn't compiled for the cpu architecture we use.
Hi, now that I know where the node packaged with homebride is, I tried to run it manually and it gives this error:

./node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by ./node)

./node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./node)

Maybe the issue is related to the DSM version instead of the cpu? 7.1 doesn't contain the shared library that the homebridge-bundled NodeJS needs?

@Faasteer
Copy link

Faasteer commented Jul 19, 2023

Maybe it's an issue of the DSM version instead? 7.1 doesn't contain the shared library that the homebridge-bundled NodeJS needs?

Maybe? I have DS918+ and DSM 7.1.1-42962 Update 6, which is the latest build (not beta or anything like that, at least according to the information in the control panel).

@ebaauw
Copy link
Contributor

ebaauw commented Jul 19, 2023

which is the latest build

No, it's not. It is the latest shown in the control panel, though. From the release notes:

For the models below, you can only download the upgrade patch from Synology Download Center because you won't receive notifications for this update on your DSM.

  • Plus Series: RS2416RP+, RS2416+, DS916+, DS716+II, DS716+, DS216+II, DS216+, DS1817+, DS1517+, RS2818RP+, RS2418RP+, RS2418+, RS818RP+, RS818+, DS1618+, DS918+, DS718+, DS218+, RS1219+

Not suggesting you should upgrade, although it would be interesting to see if that would indeed fix the issue.

Not sure if the original issue (cannot upgrade to NodeJS v18) can be fixed on DSM 7.1, other than, of course, using the Synology-provided NodeJS v18 package. Maybe the new version of the Homebridge package should be made available only to DSM 7.2?

@Faasteer
Copy link

Faasteer commented Jul 19, 2023

For the models below, you can only download the upgrade patch from Synology Download Center because you won't receive notifications for this update on your DSM.

  • Plus Series: RS2416RP+, RS2416+, DS916+, DS716+II, DS716+, DS216+II, DS216+, DS1817+, DS1517+, RS2818RP+, RS2418RP+, RS2418+, RS818RP+, RS818+, DS1618+, DS918+, DS718+, DS218+, RS1219+

Hmm, I didn't know that. Synology updates are pretty weird right now. Since DSM7, actually. I'll give it a shot, see if that solves the problem.

@dbrewood
Copy link

Hmm this sounds like a real mess. I'm definitely not happy with editing config files. I only use HomeBridge to bring my CCTV Cameras into the Home app on iOS. I can manage without that until a fixed version arrives.

@NorthernMan54
Copy link
Contributor

@pasqualito79 Am thinking that to resolve this issue change source.sh within the package to use the synology supplied version with DSM < 7.1 and use the supplied version on 7.2.

This will place a dependancy on the Synology supplied nodejs being installed.

NorthernMan54 added a commit to NorthernMan54/homebridge-syno-spk that referenced this issue Jul 19, 2023
@kosjason
Copy link

How do I change which node.js the synology package uses?

edit the file /var/packages/homebridge/target/app/source.sh and replace the path for HB_SERVICE_NODE_EXEC_PATH to /var/packages/Node.js_v18/target/usr/local/bin/node so the line should look like this:

export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"

It's work for me.
Just follow this change and sh start.sh and the web-ui will be started

@NorthernMan54
Copy link
Contributor

Within an hour, am going to publish a change to source.sh

# Use Synology supplied NodeJS v18 if installed - https://github.com/homebridge/homebridge-syno-spk/issues/124
if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
else
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
fi

Any feedback ?

@dbrewood
Copy link

Is there any way to download the older package so it can be reinstalled?

@pasqualito79
Copy link

Within an hour, am going to publish a change to source.sh

# Use Synology supplied NodeJS v18 if installed - https://github.com/homebridge/homebridge-syno-spk/issues/124
if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
else
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
fi

Any feedback ?

It seems that the update of a plugin won't work that way, it'll still point to the /var/packages/homebridge/target/app/bin/node and the update of a plugin will fail. I didn't look into this more as of now, so I don't know where the plugin update of the web UI stored the node.js binary path.

@Faasteer
Copy link

In DSM 7.1.1-42962 Update 6 in an INTEL Xeon D-1527 nas
I have a DS1821+ and here are no problems after updtating to 3.0.15 from previous version (with edited node config)

No issues on DS918+ nor on DS920+ running DSM 7.2-64570 Update 1. Both have an Intel Celeron processor.

I just upgraded and unfortunately it still doesn't work. The package pretends to be running but still can't get into the web-ui.

DS918+ / DSM 7.2-64570 Update 1

Tested via VPN and remote access with mapped ports - both worked before the update. I'll try the local network again when I get home, but I don't think it will work either way.

For me, it was the impulse to finally migrate some things directly into Home Assistant and I will probably leave HomeBridge completely.

@NorthernMan54
Copy link
Contributor

@dbrewood The older version is here https://github.com/homebridge/homebridge-syno-spk/releases/tag/3.0.9

Download and manually install the appropriate package

@dbrewood
Copy link

dbrewood commented Jul 19, 2023

Thanks for responding, 2 questions:

  1. Is 3.0.10 not the prior version?
  2. I'm running a DS918+, any ideas which package I need to download? Alpine, Armada, etc?

Sorry for asking but I can never work out where to get the 'final' 'user usable that is compiled' files on Git :)

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jul 19, 2023

@dbrewood DS918+ is intel based, braswell

Sorry, you are correct, 3.0.10 is the previous release - https://github.com/homebridge/homebridge-syno-spk/releases/tag/3.0.10

Looking closer at 3.0.10, it was never published

@manudar
Copy link
Author

manudar commented Jul 19, 2023 via email

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jul 19, 2023

@pasqualito79 - When plugins are installed or updated it uses a unix shell to run a npm command, so it looks for node on the path.

This should resolve that

# Use Synology supplied NodeJS v18 if installed - https://github.com/homebridge/homebridge-syno-spk/issues/124
if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
  NODE_BIN_PATH="/var/packages/Node.js_v18/target/usr/local/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
else
  NODE_BIN_PATH="/var/packages/homebridge/target/app/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
fi

@pasqualito79
Copy link

@pasqualito79 - When plugins are installed or updated it uses a unix shell to run a npm command, so it looks for node on the path.

This should resolve that

# Use Synology supplied NodeJS v18 if installed - https://github.com/homebridge/homebridge-syno-spk/issues/124
if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
  NODE_BIN_PATH="/var/packages/Node.js_v18/target/usr/local/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
else
  NODE_BIN_PATH="/var/packages/homebridge/target/app/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
fi

works, thanks!

@dbrewood
Copy link

dbrewood commented Jul 19, 2023

@dbrewood DS918+ is intel based, braswell

Sorry, you are correct, 3.0.10 is the previous release - https://github.com/homebridge/homebridge-syno-spk/releases/tag/3.0.10

Thanks, hmm it looks like there aren't any assets to download for 3.0.10 so I guess I'll have to go with 3.0.9 :)

Thanks for confirming it is braswell which is needed. Darn it won't allow me to downgrade..... I'll have to wait until it is fixed then. I don't want to risk uninstalling it and losing my settings.

@dbrewood
Copy link

@pasqualito79 - When plugins are installed or updated it uses a unix shell to run a npm command, so it looks for node on the path.

This should resolve that

# Use Synology supplied NodeJS v18 if installed - https://github.com/homebridge/homebridge-syno-spk/issues/124
if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
  NODE_BIN_PATH="/var/packages/Node.js_v18/target/usr/local/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
else
  NODE_BIN_PATH="/var/packages/homebridge/target/app/bin"
  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
fi

Excuse the inexperienced question, but if a 'new' package is made available with this patch in it can that be downloaded and installed to fix the issue?

@NorthernMan54
Copy link
Contributor

NorthernMan54 commented Jul 19, 2023

And its published, fingers crossed

@dbrewood
Copy link

And its published, fingers crossed

You sir are a positive hero, it works perfectly for me on my DS918+ Many many thanks!

@Manuel2023
Copy link

Just updating to 7.2 solved everything here....

@dbrewood
Copy link

I was already running 7.2...

@pasqualito79
Copy link

it's still good to have an option for 7.1.1 because a lot of devices aren't able to be updated to 7.2 anymore, like my DS415play ;-)

@WJKramer
Copy link

WJKramer commented Jul 19, 2023

I was running fine on 3.0.15 now I can't get homebridge to start with 3.0.16.

Update. Apparently I had to install Node.js from the package center also.

@Gummibando
Copy link

@NorthernMan54

2 - Adds the Synology supplied NodeJS Version 18 as a dependancy ( This needs testing )

Should this be displayed as a Dependent Package in Package Center or even auto-install when installing Homebridge?

@pasqualito79
Copy link

pasqualito79 commented Jul 19, 2023

Seems 3.0.16 is delivered with some strange sources.sh?

# Use Synology supplied NodeJS v18 - https://github.com/homebridge/homebridge-syno-spk/issues/124
# if [ -f /var/packages/Node.js_v18/target/usr/local/bin/node ]; then
NODE_BIN_PATH="/var/packages/Node.js_v18/target/usr/local/bin"
export HB_SERVICE_NODE_EXEC_PATH="/var/packages/Node.js_v18/target/usr/local/bin/node"
# else
#  NODE_BIN_PATH="/var/packages/homebridge/target/app/bin"
#  export HB_SERVICE_NODE_EXEC_PATH="/var/packages/homebridge/target/app/bin/node"
#fi

for me it works this way, but I think this crippled the ones that doesn't have the Synology node.js 18 installed. Why is the whole thing delivered as comments?

@NorthernMan54
Copy link
Contributor

@pasqualito79 when creating the patch I was debating between using a bundled nodejs or the Synology supplied one, and had coded it originally to make it switchable. But changed the approach before the release, and commented out the other approach.

for the dependency I’m working thru adding it to the package manifest, to automate the install.

this is the test version

https://github.com/NorthernMan54/homebridge-syno-spk/releases/tag/3.0.19

ps the version numbers are wacky

@NorthernMan54
Copy link
Contributor

Release 3.0.17 Fixes the dependency for the Synology NodeJS 18 package, and makes sure that it is installed prior allowing the homebridge package to be installed. Also included are fixes to the command line sudo interface made by @ebaauw

@stevenharman
Copy link

I just upgraded my DS1515+ from 3.0.9 to 3.0.17 via the Package Center UI. It prompted me to install NodeJS v18 first, which I then did. After that, the upgrade went smoothly, everything restarted and we were back in business. Thanks!

@dbrewood
Copy link

Me again guys..... I updated the Homebridge GUI again today and didn't read the warnings properly (yeah I know, idiot me) and it looks lime the node.js issues are back. Homebridge in dead in the water again.
Anyone any ideas?

@pasqualito79
Copy link

Me again guys..... I updated the Homebridge GUI again today and didn't read the warnings properly (yeah I know, idiot me) and it looks lime the node.js issues are back. Homebridge in dead in the water again. Anyone any ideas?

Why that? I also update to the newest version and no problems...it just says that the homebridge-ui needs node.js 18 or 20 which should be that case when using the homebridge-syno package

@dbrewood
Copy link

Hmm the latest version I can ese is v18 and I have that installed.....

@dbrewood
Copy link

dbrewood commented Oct 31, 2023

This is running Homebridge 3.0.17, I can't see a later version being available?
Or is there a later one which I need that is not in the synology.homebridge.io system?

@pasqualito79
Copy link

No, there's no newer version.
So 3.0.17 is running with node.js v18 and Homebridge 1.6.1 and homebridge-config-ui-x v4.51.2 without any problems here.
As you probably have the same versions right now, you maybe have another problem...what about checking out /volume1/homebridge/homebridge.log?

@dbrewood
Copy link

Okay does this help at all:

`innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:

  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/unixTerminal.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/index.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at 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. (/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/unixTerminal.js:38:15)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/unixTerminal.js',
    '/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/index.js',
    '/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js',
    '/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js'
    ]
    }
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31mError: Cannot find module '../build/Release/pty.node'
    Require stack:
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/unixTerminal.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/lib/index.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js
  • /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31m[node-pty] Node.js v18.15.0�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31m[node-pty] Failed to load node-pty module�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31m[node-pty] This could be because the installation of this plugin did not complete successfully or you may have recently upgraded Node.js to a new major version.�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31m[node-pty] Follow the steps below to resolve this issue.�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;33m[node-pty] Trying to rebuild automatically...�[0m
    �[0;37m[10/31/2023, 7:26:54 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;33m[node-pty] Path: /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch�[0m
    �[0;37m[10/31/2023, 7:26:58 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;31m[node-pty] Failed to rebuild npm modules automatically. Manual operation is now required.�[0m
    �[0;37m[10/31/2023, 7:26:58 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;33m[node-pty] From the terminal run this command to rebuild npm modules:
    �[0m
    �[0;37m[10/31/2023, 7:26:58 PM] �[0m�[0;36m[Homebridge UI]�[0m �[0;33msudo hb-service rebuild
    �[0m
    �[37m[10/31/2023, 7:26:58 PM]�[0m �[36m[HB Supervisor]�[0m ERROR: The user interface threw an unhandled error
    Error: Node.js global modules rebuild required. See log errors above.
    at main (/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:29754:19)
    at 1808 (/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:29806:1)
    at webpack_require (/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:30138:42)
    at /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:30166:1
    at /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:30272:3
    at Object. (/volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/dist/main.js:30277:12)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)`

@dbrewood
Copy link

dbrewood commented Oct 31, 2023

The full log is attached....
homebridge.log

@NorthernMan54
Copy link
Contributor

@dbrewood - If you have ssh access, and the make tools installed, you can try this - sudo hb-service rebuild

@dbrewood
Copy link

dbrewood commented Oct 31, 2023

Hmm newbie to SSH stuff. I can turn it on in the Synology System. I've no ideas how to log into it though or how to check if the make tools are installed.
Sorry I'm a real GUI guy here with my NAS.

@dbrewood
Copy link

dbrewood commented Oct 31, 2023

Okay I got in via SSH and terminal came back with:

`adminuser@syncity:/$ sudo hb-service rebuild
Password:
ℹ Rebuilding for Node.js v18.15.0...
npm ERR! code 1
npm ERR! path /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
npm ERR! command failed
npm ERR! command sh -c node scripts/check-prebuild.js || prebuild-install || node scripts/install.js
npm ERR! Prebuild binary missing for platform.
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at step (/volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise ()
npm ERR! gyp ERR! stack at subStep (/volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 4.4.180+
npm ERR! gyp ERR! command "/volume1/@appstore/Node.js_v18/usr/local/bin/node" "/volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch
npm ERR! gyp ERR! node -v v18.15.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /var/packages/homebridge/home/.npm/_logs/2023-10-31T19_38_18_264Z-debug-0.log
Error: Command failed: npm rebuild --unsafe-perm
✖ ERROR: Failed Operation`

So maybe I don't have the tools you mention?

@NorthernMan54
Copy link
Contributor

Yes, you don't have the make tools installed.

Your issue is the same as / similar to #138

Am thinking in the short term you should try this - #138

I'm working thru a fix in that issue.

@dbrewood
Copy link

dbrewood commented Oct 31, 2023

Yep the exactly the problem I have... I'll have a look at that quick fix tomorrow. I lost my config backups and yep I've had other things on my plate so never resaved them (major hospital issues) out.

If your fix will be within a few days I'll wait for it..... :)

@NorthernMan54
Copy link
Contributor

If you look around on your NAS, homebridge does daily backups, I just don't know where the files get stored but I think they may be here

/volume1/homebridge/backups/instance-backups

And it should have files like this

-rw-r--r-- 1 homebridge homebridge 395609 Oct 25 01:03 homebridge-backup-BC223DE3CF31.1698210228527.tar.gz
-rw-r--r-- 1 homebridge homebridge 395107 Oct 26 05:05 homebridge-backup-BC223DE3CF31.1698311152540.tar.gz
-rw-r--r-- 1 homebridge homebridge 394642 Oct 27 05:05 homebridge-backup-BC223DE3CF31.1698397549742.tar.gz
-rw-r--r-- 1 homebridge homebridge 363820 Oct 28 05:42 homebridge-backup-BC223DE3CF31.1698486167562.tar.gz
-rw-r--r-- 1 homebridge homebridge 363888 Oct 29 05:42 homebridge-backup-BC223DE3CF31.1698572567490.tar.gz
-rw-r--r-- 1 homebridge homebridge 363999 Oct 30 05:42 homebridge-backup-BC223DE3CF31.1698658967596.tar.gz
-rw-r--r-- 1 homebridge homebridge 309037 Oct 31 06:03 homebridge-backup-BC223DE3CF31.1698746582719.tar.gz

For the fix, to recover your system you will need to go back to the older version then go forward with the fixed version.

@dbrewood
Copy link

Ah ha thanks for that I'll take a look tomorrow. Just about to hit family TV time now :)
This is all very much appreciated.

@manudar
Copy link
Author

manudar commented Oct 31, 2023

I had the same problem and I fixed it. I try to explain what I did, but I am not sure I remember everything.
Stop the app

First you need to ssh to the nas
You need to install some tools. Please follow these instructions

cd /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x
sudo npm rebuild --unsafe-perm
sudo chown -R homebridge:homebridge /volume1/@appstore/homebridge/app/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch

Start the app again

Good luck. I might have forgotten something and am no expert at all so do it at your own risk

@dbrewood
Copy link

dbrewood commented Nov 1, 2023

Am thinking in the short term you should try this - homebridge/homebridge-syno-spk#138 (comment)

I'm working thru a fix in that issue.

@NorthernMan54 I followed the instructions you suggested and I am indeed up and running again.

Screenshot 2023-11-01 at 10 04 35

I still have the above message saying I need to update the Homebridge UI, but as that is what broke things I'll hold off with that until somebody on here advises it is safe to do so.

@manudar thanks for those additional suggestions I've filed them away for future reference :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests