-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
v2.2.3 crashing Homebridge and causing service restart loop #392
Comments
I'm having the same issue too and reverting back to v2.2.2 didn't solve the problem either. Weirdly enough, everything loads just fine if my TV is switched off. When I turn it on, it will caught in the following loop. [30/09/2021, 12:22:10] Homebridge v1.3.4 (homebridge-webos-tv) is running on port 59611. |
That is strange. The changes in the latest version are certainly not causing the issue. I suspect that during the update maybe also some dependencies did update and one of them is now causing the issue. That is why @calvinyeap even a revert does not fix it anymore for you. I would not to have some detailed log, ideally with a call stack for the error or crash. Right now I only see that homebridge did restart from your logs but that does not help me in any way... |
Sure, can you guide me how to pull that for you? |
I think you should try to start homebridge in debug mode and see if additional stuff comes up, also I see that you are running child bridge, so not sure if that affects the output log... Also I know that there are some files that homebridge generates in case of an error, try to look them up. |
That's right. I tried to disable as a child device earlier and when I do, my entire homebridge is be on a restart loop. When I enabled back as child device, my homebridge is running fine. In fact, the webos child device is also running until I switch on my TV, then it gets into a restart loop. Here's the log file and at 30/09/2021, 16:03:25 is was me using my phone to turn on the TV which works by the way, but then the TV control becomes unresponsive as the child devices keeps restarting on a loop thereafter. [30/09/2021, 16:03:09] [homebridge-webos-tv] [LG TV] Connecting to TV [30/09/2021, 16:04:00] [homebridge-webos-tv] [LG TV] { [30/09/2021, 16:04:10] [homebridge-webos-tv] [LG TV] { |
This is highly strange... it just says that child bridge is being restarted but does not actually say why... without a clear indication where the issue originated from it will be hard to fix especially since I cannot reproduce this with my tv. Could you please dig through some homebridge logs and find if there is somewhere an error? |
same happening with me. initially thought my homebridge install was corrupted (as i lost controll of all my C-Bus devices) I was on HOOBs, which had other issues as well with the Ring plugin, so i decided to do a full fresh rebuild using raspberry Pi OS (lite with desktop) and as soon as i install the webos plugin it asks for pairing when click ok homebridge reports tv connected then reboots and i get the pairing request installed. uninstalling the plugin for now as i need to get the rest of the plugins up and running so i can get voice control of my home again. |
This is the full log, when my TV is switched off, the child device seems to be running and log shows "Connecting to TV" all the time. When I finall press to turn on the TV using my phone, the TV switches on and then the following error occurs. [30/09/2021, 17:06:49] [homebridge-webos-tv] [LG TV] Connecting to TV [30/09/2021, 17:07:31] [homebridge-webos-tv] [LG TV] { |
Are you guys by any chance using the 64 but version of raspberry pi os or set the 64 bit flag in the config.json? I know that homebridge has issues with that currently... @calvinyeap those Websocket errors are fine and should not have any impact. |
Ah ok. I believe I'm running on 32 at the moment. Not sure if below is the right way to check though. I have also checkec my config.json, I don't see any 64 bit flag as well. pi@homebridge:/var/lib/homebridge $ uname -m |
Ok, this does not look like 64 bit so at least we can exclude that! But we still need to find out what exactly crashes the bridge, my suspicion is that might be one of the dependencies... |
OMG... Good I had a look here. However... Homebridge is now starting over and over. Nothing to see in the log. Node.js Version v14.18.0 2nd-Instance on the same Raspberry is working finde. |
maybe its realted to Node.js Version v14.18.0 ? @merdok |
Oh, it might also be related to the nodejs version. |
That was the first thing I did downgrade to Node 14.17.6 but that didn't help. pi@raspberrypi-3BPlus:~ $ uname -m Homebridge v1.3.4 LG Modell 55EG9209-ZA, Software 04.26.00, webOS 2.2.3-1351 (beehive-biscayne)
|
My logs do not look any different than what have been posted but wanted to provide a little more detail. The plug-in appears stable when the TV is off. When I turn the TV on, it prompts me to accept or decline the pairing request through LG connect. If I click no, nothing happens and Homebridge remains stable. If I select yes, the Homebridge service immediately restarts and when it comes back up, my TV asks me again if I’d like to pair. Selecting yes will cause another restart cycle. I’ve tried multiple versions of the plug-in and experience the same behavior each time so agreed that it sounds like an issue with one of the plug-in’s dependencies. |
Thanks for that hint. Same here. When the TV is off there is no restart loop. Though I don't get any prompt to accept or decline pairing. |
What makes me think that this is definitely related to on of the dependencies is that for me everything runs fine and I did not update any of my dependencies since a long time. Besides you all report the same issue that even after downgrading the plugin to a previous version the issue is still there where before it was not there. So the question is now which dependency it is🙃 |
I am thinking it must either be node or a dependent. I am having issues with another plugin too one that sends a login credentials to an external web server, that keeps reporting incorrect username or password (which are correct as i can log in to the web server with them).. Since i am doing a fresh rebuild. I might re-start the rebuild and install an older version of node and npm and see how that pans out. At this stage i am fresh out of ideas as to what is causing the issues. |
You should try to downgrade node to version 13.x or even 12.x and see if that helps. I will later check which one I have installed... |
Just for interest i had an old rapberry pi 3b hanging around and set that one up again with the old plugins and it is running node v14.17.1. and everything was working. so i started updating the plugins and now it is failing again. looks like one of those plugin updates has change a dependent which is causing the issues.. |
no good i'm afraid.. even with a fresh install and only the CBus plugin installed it still loops homebridge.. unfortunately the fault is not only this plugin but the one by grzegorz as well. when it connects to the LG TV homebridge reboots.. |
I don't know if this helps but this is what I get in the log window after I press to accept the connection in the TV [9/30/2021, 9:47:38 AM] [webostv] [LG TV] Connected to TV Please let us know what we can help to solve this issue. This is one of the plugins I use the most. Kind regards |
Like in my post, the other webos plug-in has the same issues. The only thing different that it happens at the moment you accept the plug-in to control your tv. Recently the tv received an update as well. |
The problem here is that the error output for the issue is really bad or basically does not not exists... We can certainly say that one of the dependencies is the root cause here but the dependency needs to be identified.
I think depth=4 should be enough for now. From those above only BTW, i am still running on nodejs 12.22.4 |
├─┬ [email protected] looks like utf-8-validate is newer with mine |
I do not think that utf-8-validate should have anything to do with that... |
tried to downgrade it but no luck. |
Yes, you should not install it using with the -g command which installs it globally. You have to navigate to the homebrige-webos-tv directory and the go to node_modules and there you have to navigate yourself through the lgtv2, websocket and bufferutils directories(they should again be in the node_modules directories) and there you execute the npm install command but without the -g parameter and that should work. |
Successfully downgraded nod-gyp-build to 4.2.3 Same issue though. after accepting the pairing on the TV, everything crashes and homebridge reboots. so node-gyp-build was not the cause. |
Try 2.2.5, now it should hopefully work... |
that one appears to be working fine :) |
i guess the next thing to figure out now that it has been fixed, is what caused bufferutil to break the plugin in the first place. Eventually (will take a while) but bufferutil 4.0.3 will eventually be deprecated, so hopefully the issue with 4.0.4 get rectified and does not get carried over to newer packages. |
I will investigate that... Important for now is that the plugin is working again! |
yup |
I confirm, all good with 2.2.5. |
Hi guys, I have the same issue with version 2.2.5. as you described. What should I do?
|
@hruskat |
@hruskat should have had you upload that as a txt file but oh well. I do not see the webos package listed in the tree. are you sure it is installed? NM Homebridge not showing either so you must be missing a lot of the data. Pipe the output to a txt file and upload the txt file.. your tree has a lot of packages in it that it is scrolling out the top packages past the console buffer. then use a FILE transfer program like filezilla to remote in and grab the txt file to upload it here. |
@hruskat alternatively the main package we are looking for is bufferutil as that is what originally caused the issue. you can retrieve that info by using the command. that will list the version of all bufferutil packages. the 4.0.4 package version breaks the plugin so if you have 4.0.4 you will need to downgrade it to 4.0.3... |
dependencies.zip hoobs@hoobs:~ $ npm list -g bufferutil |
@hruskat thats strange you should have got output like. are you running the commands from a SSH terminal program like putty or the terminal within homebridge web UI? I'll check the txt.. |
@hruskat I think Hoobs is the issue. It got a wierd NPM package structure and does not show any packages associated with homebridge (including the homebridge package). It could be hidden deeper in the dependency tree. re-run the command again this time make the depth=8 upload the rtf file. Or HOOBS could be running the homebridge from within a docker VM. I am not familiar with HOOBS setup. . |
@hruskat it would appear HOOBS is just another UI instead of the homebridge web UI X interface that buster (Raspian) users uses. not sure on why the homepridge plugins ets are not listed in the NPM list though :(. anyway try locate the directory where the webos plugin is located. run ls again and see if the bufferutil directory is there. It is possible that HOOBS updated all the packages to the latest ones in which case your bufferutil will be version 4.04.. downgrade it back to version 4.0.3 by using the following command within the homebridge-webos-tv/node_modules/ directory. sudo npm install [email protected] that will downgrade the bufferutil package to 4.0.3 restart homebridge and it should hopefully solve the issue. Bare in mind if HOOBS updates plugin dependencies automatically or when you upgrade to a new version it may also upgrade this bufferutil package and break the webos plugin so all you have to do to fix is repeat the downgrade again to 4.0.3. |
@OrigSorceror thanks for your help, but my knowledge is on the low level :) so I tried to do what you advices, but not sure if correct :) rft file is attached - it looks like the same like =4. I also tried to manually install webostv by sudo with error. hoobs@hoobs:~ $ npm ERR! A complete log of this run can be found in: installation [email protected] also unsuccessful
npm WARN saveError ENOENT: no such file or directory, open '/home/hoobs/package.json'
hoobs@hoobs:~ $ |
@hruskat that 404 error is because you got the package name wrong so it could not find the package. try /lib/node_modules Looks as though the install of [email protected] did succeed. Sorry i have not played with a HOOBS build, so without access to a hoobs build device it is hard to diagnose. |
@hruskat I a building w HOOBS Pi using a spare rPi 3b i have laying around.. I'll have a look and see what i can find out that can be of assistance. |
@hruskat so in terminal cd to /var/lib/hoobs/webostvbridge/node_modules/ You should get the following.
npm notice created a lockfile as package-lock.json. You should commit this file.
40 packages are looking for funding found 0 vulnerabilities confirm it is installed by re running the npm list bufferutil command again to get the following. That should install the correct version and your web os TV bridge should be working from then on and not reset once paired. HOOBS is weird as it installs all the dependent packages to the one directory taking them out of the package directory... So if you cd to homebridge-webos-tv/node_modules/ and run ls it will show an empty directory (strange it does that even though it appears correct in the tree structure on install according to NPM tree) but anyway the way node works is to always use the dependant that is either in the package or if there is not one there use one higher up in the NPM tree.. so by installing (downgrading the bufferutil to 4.0.3) we are actually installing it up a level in the tree, and then due to NPM's removal of duplicate references it reports the package as deduped.. Let me know how you proceed. |
As a small update for the people who are still affected. I have been in contact with the bufferutil devs and helped them to identify the problem with the their package. They should provide an update soon which will fix the issue for everyone. |
@merdok what was the issue just out of interest?? |
You can have a look here websockets/bufferutil#137 |
@merdok |
I am still having this exact issue |
@iCarl either your |
I updated to version 2.2.3 this evening. I noticed if I interact with my TVs in the Home app, it sends my Homebridge service into a restart loop. Each time the loop cycles, my LG TV asks me if I want to accept the pairing request for the LG Connect app. When I click yes, nothing happens on the TV and then the Homebridge service restarts.
I had to uninstall the plugin to stabilize Homebridge. This plugin has worked seamlessly for me for the better part of two years now so I'm not sure what changed. All configurations on my end remain the same.
The text was updated successfully, but these errors were encountered: