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

Update error for version 4.41.3 #1243

Closed
cl4udiu5 opened this issue Nov 25, 2021 · 35 comments
Closed

Update error for version 4.41.3 #1243

cl4udiu5 opened this issue Nov 25, 2021 · 35 comments
Labels

Comments

@cl4udiu5
Copy link

cl4udiu5 commented Nov 25, 2021

Bildschirmfoto 2021-11-25 um 14 51 04

Describe Your Problem:
Update error when running the update from terminal (macOS).
Update error when running the update from homebridge web interface (macOS Safari).
See Screenshot

Logs:

Show the Homebridge / Homebridge Config UI X logs here.

Homebridge Config:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154",
        "advertiser": "ciao",
        "bind": [
            "eth0"
        ]
    },
    "description": "Home Smart Home",
    "platforms": [
        {
            "name": "Config",
            "port": 8080,
            "auth": "form",
            "theme": "dark-mode",
            "restart": "sudo -n systemctl restart homebridge",
            "tempUnits": "c",
            "lang": "auto",
            "sudo": true,
            "sessionTimeout": 28800,
            "log": {
                "method": "custom",
                "command": "journalctl -o cat -n 500 -f -u homebridge"
            },
            "platform": "config"
        },
        {
            "name": "Hue",
            "anyOn": true,
            "effects": true,
            "hosts": [
                "192.168.0.59"
            ],
            "lights": true,
            "nativeHomeKitLights": true,
            "nativeHomeKitSensors": true,
            "noResponse": true,
            "resource": true,
            "users": {
                "001788FFFE28C21C": "ZakWR-pTjHhrN81Onbsnbfjshd87jCjUrSFJjwbHUPN"
            },
            "platform": "Hue"
        },
        {
            "name": "Harmony",
            "hubIP": "192.168.0.251",
            "DELAY_BEFORE_RETRY_AFTER_NETWORK_LOSS": 60000,
            "HUB_CONNECT_TIMEOUT": 10000,
            "HUB_SEND_TIMEOUT": 30000,
            "TVAccessory": true,
            "mainActivity": "Watch TV (WZ)",
            "remoteOverrideCommandsList": [
                {
                    "ActivityName": "Watch Blu-ray",
                    "CommandsList": [
                        {
                            "CommandName": "PLAY",
                            "NewCommand": "Samsung Blu-ray Player;Play"
                        },
                        {
                            "CommandName": "BACK",
                            "NewCommand": "Samsung Blu-ray Player;Pause"
                        },
                        {
                            "CommandName": "INFORMATION",
                            "NewCommand": "Samsung Blu-ray Player;PopUp"
                        }
                    ]
                }
            ],
            "switchAccessories": true,
            "platform": "HarmonyHubWebSocket"
        },
        {
            "name": "SamsungTizen",
            "devices": [
                {
                    "name": "TV",
                    "ip": "192.168.0.234",
                    "mac": "64:1C:AE:E4:30:BA",
                    "inputs": [
                        {
                            "name": "Netflix",
                            "type": "app",
                            "value": "11101200001"
                        },
                        {
                            "name": "Disney+",
                            "type": "app",
                            "value": "3201901017640"
                        },
                        {
                            "name": "Prime Video",
                            "type": "app",
                            "value": "3201512006785"
                        },
                        {
                            "name": "DAZN",
                            "type": "app",
                            "value": "3201607009920"
                        },
                        {
                            "name": "Spotify",
                            "type": "app",
                            "value": "3201606009684"
                        },
                        {
                            "name": "ARD Mediathek",
                            "type": "app",
                            "value": "3201412000679"
                        },
                        {
                            "name": "ZDF Mediathek",
                            "type": "app",
                            "value": "3201705012365"
                        }
                    ],
                    "switches": [
                        {
                            "name": "Mute",
                            "mute": true
                        }
                    ]
                }
            ],
            "platform": "SamsungTizen"
        }
    ],
    "accessories": [],
    "disabledPlugins": [
        "homebridge-laundrify-official"
    ]
}

Environment:

  • Node.js Version: 16.13.0
  • NPM Version: 8.1.4
  • Homebridge Version: 1.3.8
  • Homebridge Config UI X Version: 4.41.2
  • Operating System: Raspbian
  • Process Supervisor: Docker / Systemd / init.d / pm2 / launchctl / hb-service / other / none
@tombenton55
Copy link

I’m getting the same issue

@FranciRoosters
Copy link

Same

1 similar comment
@Stetocasa
Copy link

Same

@Stetocasa
Copy link

@oznu
Copy link
Member

oznu commented Nov 25, 2021

Manually delete the folder listed under the "dest" part of the error.

@Stetocasa
Copy link

Manually delete the folder listed under the "dest" part of the error.

Thanks
Could you provide more details on how do it ?
Thanks

@oznu
Copy link
Member

oznu commented Nov 26, 2021

Could you provide more details on how do it ?

sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-*

or for other users:

sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*

Then try install again:

sudo npm install -g homebridge-config-ui-x --unsafe-perm

@Stetocasa
Copy link

pi@homebridge:~ $ sudo npm install -g homebridge-config-ui-x --unsafe-perm
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/homebridge-config-ui-x
npm ERR! dest /usr/local/lib/node_modules/.homebridge-config-ui-x-3gtnOIj4
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/usr/local/lib/node_modules/homebridge-config-ui-x' -> '/usr/local/lib/node_modules/.homebridge-config-ui-x-3gtnOIj4'

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-11-26T08_20_53_124Z-debug.log
pi@homebridge:~ $ sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-*
pi@homebridge:~ $ sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*
pi@homebridge:~ $ sudo npm install -g homebridge-config-ui-x --unsafe-perm
npm WARN deprecated class-transformer@0.3.2: This release contains a breaking change from 0.3.1 but otherwise functions properly. Please read the changelog on Github to learn more.

changed 348 packages, and audited 349 packages in 4m

38 packages are looking for funding
run npm fund for details

5 high severity vulnerabilities

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.
pi@homebridge:~ $ npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
^[[B^[[B^[[B^[[B^[[B
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-11-26T08_27_31_875Z-debug.log
pi@homebridge:~ $

@Stetocasa
Copy link

Above my log after your input, the broswer still not loading the UI 🤔

@oznu
Copy link
Member

oznu commented Nov 26, 2021

Did you restart after?

@Stetocasa
Copy link

Did you restart after?

Yes

@oznu
Copy link
Member

oznu commented Nov 26, 2021

Run

sudo hb-service stop
sudo hb-service install --user homebridge

@saltysmith1
Copy link

saltysmith1 commented Nov 26, 2021

Could you provide more details on how do it ?

sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-*

or for other users:

sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*

Then try install again:

sudo npm install -g homebridge-config-ui-x --unsafe-perm

Thanks @oznu this fixed it for me tho i did it slightly different i ran sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-* then i ran sudo hb-config and updated from there

@Stetocasa
Copy link

Run


sudo hb-service stop

sudo hb-service install --user homebridge

Now can access the UI, good news!
Any chance to recover previous json config? Seems that all plug-in has already installed but I lost the config

@oznu
Copy link
Member

oznu commented Nov 26, 2021

It should be on disk somewhere, however if it's not showing up it's not in the default location - /var/lib/homebridge on Linux - those command didn't remove any config.

You could try looking in /home/pi/.homebridge/

@FranciRoosters
Copy link

Si, what’s the exact command line that fixes it? And why do you lose the json config?

@Stetocasa
Copy link

It should be on disk somewhere, however if it's not showing up it's not in the default location - /var/lib/homebridge on Linux - those command didn't remove any config.

You could try looking in /home/pi/.homebridge/

Thanks, I installed homebridge in my PI3+ trough the image.
Can you tell me how navigate into the folder in order to find the previous config? Sorry I'm in a beginner phase

@Stetocasa
Copy link

Si, what’s the exact command line that fixes it? And why do you lose the json config?

The procedure wrote by @oznu generated a new instance and in HomeKit this generated a new hub to be added

@FranciRoosters
Copy link

FranciRoosters commented Nov 26, 2021 via email

@Stetocasa
Copy link

So, not really a fix then, is it?

On 26 Nov 2021, at 09:59, Stetocasa @.***> wrote:


Si, what’s the exact command line that fixes it? And why do you lose the json config?

The procedure wrote by @oznu generated a new instance and in HomeKit this generated a new hub to be added


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

The only positive thing compared a reflash sd is that all plugins are already installed
Recovering the old config this will help to avoid the new config in homebdige and let "just" the HomeKit automation new setup
I wanna die

@Stetocasa
Copy link

@oznu Any possibility to recover the previous homebridge instance ?

@oznu
Copy link
Member

oznu commented Nov 26, 2021

The instructions provided will not have removed your config. If it's not there then some other command must have removed it; or homebridge was setup in a non-standard way so the config is in a different location.

@Stetocasa
Copy link

The instructions provided will not have removed your config. If it's not there then some other command must have removed it; or homebridge was setup in a non-standard way so the config is in a different location.

Can you help me please to find it?

@Stetocasa
Copy link

The instructions provided will not have removed your config. If it's not there then some other command must have removed it; or homebridge was setup in a non-standard way so the config is in a different location.

pi@homebridge:~ $ /var/lib/homebridge/config.json
-bash: /var/lib/homebridge/config.json: Permission denied

@cl4udiu5
Copy link
Author

Could you provide more details on how do it ?

sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-*

or for other users:

sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*

Then try install again:

sudo npm install -g homebridge-config-ui-x --unsafe-perm

Thank you @oznu. Works fine for me.

@tombenton55
Copy link

I’m not sure what happened but my instance is toast too. Rebuilding from scratch isn’t fun.

@FranciRoosters
Copy link

So, to make sure I understand, @oznu’s solution fixes the issue but requires you to rebuild all of your HomeKit set-up from scratch? What is the reason for this issue in the first place anyway? Thank you.

@saltysmith1
Copy link

@oznu’s solution fixes the issue but requires you to rebuild all of your HomeKit set-up from scratch?

Nope didn’t have to rebuild mine from scratch followed it slighty different and it’s working as it should

Thanks @oznu this fixed it for me tho i did it slightly different i ran sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-* then i ran sudo hb-config and updated from there

@FranciRoosters
Copy link

FranciRoosters commented Nov 29, 2021 via email

@adrianopery
Copy link

adrianopery commented Nov 29, 2021

I'm facing the same issue but after I executed the commands

Could you provide more details on how do it ?

sudo rm -rf /usr/local/lib/node_modules/.homebridge-config-ui-x-*

or for other users:

sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*

Then try install again:

sudo npm install -g homebridge-config-ui-x --unsafe-perm

I executed the commands and my Homebridge shows as Updated, even show the new version on the dashboard.
For some reason, after some time, the bridge restarts and show the old version again.
I really don't understand what is happening.

Any idea?

follow the log after I executed the commands.

pi@homebridge:/var/lib/homebridge $ sudo rm -rf /usr/lib/node_modules/.homebridge-config-ui-x-*
pi@homebridge:/var/lib/homebridge $ sudo npm install -g homebridge-config-ui-x --unsafe-perm
npm WARN deprecated class-transformer@0.3.2: This release contains a breaking change from 0.3.1 but otherwise functions properly. Please read the changelog on Github to learn more.

added 7 packages, removed 1 package, changed 341 packages, and audited 349 packages in 4m

38 packages are looking for funding
run npm fund for details

6 high severity vulnerabilities

To address all issues, run:
npm audit fix

Run npm audit for details.
npm notice
npm notice New major version of npm available! 7.20.3 -> 8.1.4
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.1.4
npm notice Run npm install -g npm@8.1.4 to update!
npm notice
pi@homebridge:/var/lib/homebridge $

@adrianopery
Copy link

After that, on dashboard is showing 4.41.3 but, after some time, the homebridge restart and again is on version 4.41.2.

@adrianopery
Copy link

Any update on this issue?

@FranciRoosters
Copy link

FranciRoosters commented Nov 30, 2021 via email

@adrianopery
Copy link

I haven’t input any sudo commands. I don’t feel safe doing it.

On 30 Nov 2021, at 17:33, adrianopery @.***> wrote:  Any update on this issue? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

I tried, but doesn't work.
It's crazy it......
The upgrade is complete as successful but after a restart, revert for old version!

@oznu
Copy link
Member

oznu commented Dec 11, 2021

For the late comers, solution here: #1243 (comment)

@oznu oznu closed this as completed Dec 11, 2021
@oznu oznu pinned this issue Dec 11, 2021
@homebridge homebridge locked as resolved and limited conversation to collaborators Dec 11, 2021
@oznu oznu unpinned this issue Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants