-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
Crashes Homebridge: RangeError: Maximum call stack size exceeded #1240
Comments
I don’t see any config for this plugin in what you shared, so it shouldn’t even be getting loaded… I’ve never seen this issue before, but it really doesn’t make a lot of sense to me. Could you be using a super old version of NodeJS or something? |
If I just install the plug in, it crashes Homebirdge, and puts it in a Reboot Loop. Its a brand new install of Homebridge, only 4-5 days old from scratch. |
Can you send me a copy of a working NodeJS, and I will try and manually replace the file, is that worth a try? |
Looks like the root cause is montagejs/collections#241. I'm having trouble tracking down exactly where the |
@dgreif Interesting that that issue is a year and a half old and it’s only just bitten us? One of the comments over there mentions it is a dependency of mqtt, which I do use. If you got bit by it too, it’s probably also somewhere else though. I guess I’ll freshly install my plugin on something to see if I can reproduce. |
Looks like collections was a new addition to mqtt in October, already at 5.1.12. mqttjs/MQTT.js@c92b877 collections 5.1.12 is also used in number-allocator from the very beginning of that package, which is also used by mqtt since June. mqttjs/MQTT.js@0eb3396 Now I’m really confused as to how this is the first report of this problem if it’s possibly been happening for this long? Also, in case anyone happens to ever need it in the future. The best way I’ve found for figuring out the tree of dependencies is https://npm.anvaka.com/ |
Is there a fix, I can try? |
Not yet. |
I have spent a chunk of the day testing, and I have not been able to recreate this issue… |
Thanks for digging into it @Sunoo. I don't think the ring plugin is actually being affected directly, it just happened to show the stack overflow in the Ring logs, but the path pointed to homebridge camera ffmpeg as the source of the collections dependency |
Gotcha. I didn’t see it anywhere in Ring’s dependency tree, so it probably is just a user with both plugins installed and this one is barfing all over Homebridge. Outside of possible rolling back to mqtt 4.2.6 or older, I’m not sure what else I could do. Especially since I can’t figure out what causes the issue… @DiggyS What are you running Homebridge on? Maybe it’s something more unique to your setup? |
"Outside of possible rolling back to mqtt 4.2.6 or older" |
@NebzHB “mqtt >= 2.18.8” will currently evaluate to mqtt 4.3.1. |
Running on Synology NAS Version 7.x |
shouldn't we create an issue at mqtt.js ? |
I had to install a new system to recreate the issue. |
Looking thru the commit log on mqtt, collections was added as a dependency here https://github.com/mqttjs/MQTT.js/pull/1301/files As I can recreate the issue, I’m going to try pinning the mqtt version to the one prior |
according to mqtt changlog 4.2.8 does work too : https://github.com/mqttjs/MQTT.js/blob/master/CHANGELOG.md edit: indeed i think i'm misinterpreting ... 4.3.1 installed, but strangely my system doesn't crash anymore since homebridge-alexa's workaround |
@DiggyS Can you try v3.1.4 of this plugin when you have a chance? |
Works Perfectly ! No error messages ! Thank you! |
Fantastic. Glad we got that resolved. Thanks for the assist on this, @dgreif, @NorthernMan54, and @NebzHB. |
Describe The Problem:
When I install this plugin, it crashes Homebridge, both with or without config details.
To Reproduce:
Yes, everytime, ongoing.
Logs:
RangeError: Maximum call stack size exceeded
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
at Function.Array.from (/homebridge/node_modules/homebridge-camera-ffmpeg/node_modules/collections/shim-array.js:31:22)
[12/26/2021, 10:46:49 PM] Got SIGTERM, shutting down Homebridge...
Homebridge Config:
{
"mdns": {
"interface": "192.168.3.20"
},
"bridge": {
"name": "",
"username": "",
"port": 51600,
"pin": "****",
"bind": [
"bond0"
]
},
"accessories": [],
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"controllers": [
{
"address": "192.168.3.1",
"password": "*****",
"username": "homebridge"
}
],
"verboseFfmpeg": false,
"platform": "UniFi Protect"
},
{
"platform": "CoolMasterTelnet",
"ip": "192.168.3.52",
"accessories": [
{
"displayName": "Samir's Bedroom",
"uniqueId": "001"
},
{
"displayName": "Sahir's Bedroom",
"uniqueId": "002"
},
{
"displayName": "Master Bedroom",
"uniqueId": "003"
}
]
}
],
"disabledPlugins": []
}
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: