Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
5 stars 3 forks source link

Crash report - delete physical device by id when expecting object #50

Closed Baldhor closed 8 months ago

Baldhor commented 8 months ago

Describe the bug Received a crash report:

Note: this e-mail is sent because an unhandledRejection occurred in your app. Make sure to catch all errors, this might crash your app in the future. Stack trace attached below:

  TypeError: Cannot read properties of null (reading 'id')
    at Function._delete (/drivers/esphome-wizard/physical-device-manager.js:106:62)
    at PhysicalDevice.<anonymous> (/drivers/esphome-wizard/driver.js:306:43)
    at PhysicalDevice.emit (node:events:526:28)
    at PhysicalDevice.disconnectedListener (/drivers/esphome-wizard/physical-device.js:355:14)
    at Client.<anonymous> (/drivers/esphome-wizard/physical-device.js:88:44)
    at Client.emit (node:events:526:28)
    at Client.errorListener (/drivers/esphome-wizard/client.js:183:14)
    at EsphomeNativeApiClient.nativeApiClient.on.signal (/drivers/esphome-wizard/client.js:137:58)
    at EsphomeNativeApiClient.emit (node:events:526:28)
    at EsphomeNativeApiConnection.<anonymous> (/node_modules/@2colors/esphome-native-api/lib/client.js:60:18)

To Reproduce unknown

Expected behavior no crash report :)

Baldhor commented 8 months ago

fix live