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

Range error on shim-array #481

Closed
aaronkbutler opened this issue Dec 25, 2021 · 19 comments
Closed

Range error on shim-array #481

aaronkbutler opened this issue Dec 25, 2021 · 19 comments

Comments

@aaronkbutler
Copy link

I’m getting an error in the Homebridge console every few minutes which causes Homebridge to restart.

61177D18-751C-40CA-ACC8-A65586682C54

@NorthernMan54
Copy link
Owner

Something weird is happening here. The package collections and shim-array are not a dependency of homebridge-alexa. Did you make any recent changes or are you running something non-standard ?

Have you tried removing the plugin and re-installing ?

@aaronkbutler
Copy link
Author

The issue seems to arise whenever I set routines to true in my config.

@aaronkbutler
Copy link
Author

Turned out to be an issue with another plugin I was using. Once I got rid of that, I was able to enable routines and everything runs smoothly.

@NorthernMan54
Copy link
Owner

NorthernMan54 commented Dec 25, 2021 via email

@aaronkbutler
Copy link
Author

homebridge-myq

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 26, 2021

Hello @NorthernMan54, it seems the package collections is used by the packages mqtt you have dependencies on. I haven't got the problem myself, but I've encountered it on users using other plugins than the one mentioned by @aaronkbutler. I ask the plugin list to the users who had the problem and let you know.

@NorthernMan54
Copy link
Owner

@NebzHB I went and looked at the collections package, and they have this issue mentioned

montagejs/collections#241

need to read it in detail to see what they are saying

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 26, 2021

It seems they fixed it in march (with a quick overview of the issue)...

Edit : my 2 users are on rpi 3b with nodejs 14. I can't reproduce on a debian vm

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 26, 2021

Hello again @NorthernMan54,

I see you are using a version 2.x of mqtt. And they are version 4.x, could it be that ?

i have the plugin list of one of my users :
homebridge-ring
homebridge-adb
homebridge-broadlink-rm-pro (using mqtt 4.x)
homebridge-ewelink
homebridge-config-ui-x
homebridge-camera-ffmpeg
homebridge-gsh
homebridge-alexa (of course ;))

@NorthernMan54
Copy link
Owner

I have a major renovation planned for this winter, and that is one of many items on the backlog.

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 27, 2021

have a third user with the problem : Rpi3+/buster, plugin list :
homebridge-alexa @ 0.5.42 - Control your Homebridge devices with Amazon Alexa.
homebridge-camera-ffmpeg @ 3.1.3 - Homebridge Plugin Providing FFmpeg-based Camera Support
homebridge-config-ui-x @ 4.41.5 - A web based management, configuration and control platform for Homebridge
homebridge-gsh @ 2.2.0 - Google Smart Home

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 27, 2021

i can reproduce on my debian vm !
tried to install collections globally but it's still installed by homebridge-alexa in his node_modules folder...

@NorthernMan54
Copy link
Owner

@NebzHB Well I was able to recreate the issue by installing myq into my development environment. So far I have tried updating the mqtt package version to the latest version, nope, and then tried the same version as myq, same. I then went and implemented the collections fix to homebridge-alexa ie added "collections": "github:montagejs/collections#85f00f8", to package.json, same. I then added it to myq as well, and success.

Am thinking the only true fix is to have collections package publish the release.

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 28, 2021

strange.. none of my users uses myq... on my own system, i fixed it with adding if(!Array.from) {} wrap around the function re-defining Array.from in collections (as proposed in one of their PR (#montagejs/collections#212)) see https://github.com/NebzHB/collections/blob/master/shim-array.js#L33 . I see in original Issue of Collections that camera-ffmpeg does have the issue too (#homebridge-plugins/homebridge-camera-ffmpeg#1240) and ring throw the issue away too #dgreif/ring#844 ... it seems the error message sticks to the first plugin using mqtt... There will be hot-potato game in that case ;)

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 28, 2021

Another user with mqttthings plugin, it seems all plugins using mqtt have the issue.
image

@NorthernMan54
Copy link
Owner

@aaronkbutler if you can try updating to the latest version, I implemented a workaround for the issue.

@NebzHB
Copy link
Collaborator

NebzHB commented Dec 28, 2021

your fix works for me :)

@NorthernMan54
Copy link
Owner

Tks closing this

@aaronkbutler
Copy link
Author

@aaronkbutler if you can try updating to the latest version, I implemented a workaround for the issue.

Thanks for working on this! Works great now.

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

No branches or pull requests

3 participants