huttotw / homebridge-kia-connect

Connect your Kia vehicle to HomeKit
Apache License 2.0
13 stars 1 forks source link

Started 4/25/24 | TypeError: Cannot read properties of undefined (reading 'vehicleInfoList') #12

Open asabatino88 opened 5 months ago

asabatino88 commented 5 months ago

Describe The Bug: Getting an error that sends home bridge into a sig term reboot loop

To Reproduce: Just started happening - did not change anything.

Expected behavior: Plugin loads and behaves normally

Logs:

TypeError: Cannot read properties of undefined (reading 'vehicleInfoList')
    at KiaConnect.vehicleInfo (/usr/local/lib/node_modules/homebridge-kia-connect/src/kiaconnect/client.ts:207:31)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Car.refresh (/usr/local/lib/node_modules/homebridge-kia-connect/src/platformAccessory.ts:258:17)

Plugin Config:

Not applicable - didn't change anything. Started happening on 4/25/24.

Screenshots: N/A

OS | macOS Sonoma Node.js | v20.11.0

asabatino88 commented 5 months ago

Looks to have been Kia server side as the error stopped happening. Is there a way to better manage error handling? Would be good to have a try/catch/throw type of code wrapper that prevents errors from completely stopping the home bridge service. Ideally, an error would be reported but the plugin wouldn't kill home bridge. Further, the accessory should still show up in homebridge/homekit so that it's not removed from my iDevices (which requires recreating automations).

Last time there was a Kia server outage, I decided to "disable" this plugin in Homebridge to stop the boot loops (which impact all home bridge devices). However, that deleted the accessory completely, which meant I had to recreate all of my automations. This time, I dealt with a home bridge outage for several hours to avoid rebuilding automations. Fortunately, the kia server came back without significant downtime.

mwouda commented 1 month ago

I have the same problem. I also disabled the plugin for now. hope there will be a solution fast.