-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error : Unhandled rejection TypeError: Cannot read properties of undefined (reading 'updateCharacteristic') #16
Comments
Thanks for the report, I think this bug was introduced in my recent refactor. That's what I get for not having any tests 😅 I'll look into it later this week or this weekend! |
@nodecentral Can you turn on Debug logging in Homebridge (UI X) settings, and share the full logs the next time this happens again? I'd like to understand more clearly exactly what the properties are of the accessory that's being updated when this error occurs. |
I'm seeing a similar issue. I will open a new issue report since the output is different. I have just enabled debug logging on my homebridge. |
Was there ever a fix for this? |
The error seems caused due to lack of type definition in this function homebridge-unifi-occupancy/src/platform.ts Lines 18 to 29 in cd96aff
Then in the constructor of a child class of I tried to add type definition function ensure<K, V>(map: Map<K, V>, uuid: K, updater: (item: NonNullable<V>) => void, builder: () => V) {
let item: V | null = map.get(uuid) || null;
if (item) {
updater(item);
} else {
item = builder();
if (item) {
map.set(uuid, item);
}
}
return item;
} but a type error arose from I got stuck here because I'm not familiar with this repo. IMHO, I'd suggest the maintainer start from fixing the type errors |
I'm still getting this error, or one like it.. Unhandled rejection TypeError: Cannot read properties of undefined (reading 'updateCharacteristic') |
Nothing visible that i can see, however I am still setting things up..
Unsure how to explain what it is, but have included the logs below..
It happens after a while, so it seems to be periodic,
Expected behavior:
No errors :-) ?
Logs:
Plugin Config:
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: