mrbungle64 / ecovacs-deebot.js

A Node.js library for running Ecovacs Deebot and yeedi vacuum cleaner robots
GNU General Public License v3.0
118 stars 37 forks source link

Error in xml parsing #61

Closed nicoduj closed 3 years ago

nicoduj commented 3 years ago

Software version (please complete the following information):

Deebot model (please complete the following information):

Describe the bug An error is thrown in the lib with xml parsing . Should be nice to handle them in order to prevent sigterm

[xmldom warning] attribute space is required"td"!! @#[line:1,col:1] [xmldom warning] attribute value must after "=" @#[line:1,col:1] [xmldom error] element parse error: Error: attribute value no end ''' match @#[line:1,col:1] [1/28/2021, 11:48:04 AM] TypeError: Cannot read property 'attributes' of undefined at EcovacsMQTT_XML._command_to_dict (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT_XML.js:184:28) at EcovacsMQTT_XML._handle_message (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT_XML.js:168:27) at MqttClient. (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/ecovacs-deebot/library/ecovacsMQTT.js:42:18) at MqttClient.emit (events.js:315:20) at MqttClient._handlePublish (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:1277:12) at MqttClient._handlePacket (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:410:12) at work (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:321:12) at Writable.writable._write (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/lib/client.js:335:5) at doWrite (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:409:139) at writeOrBuffer (/homebridge/node_modules/homebridge-deebotecovacs/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:398:5) [1/28/2021, 11:48:04 AM] Got SIGTERM, shutting down Homebridge...

Additional context

User in homebridge plugin

mrbungle64 commented 3 years ago

Hi @nicoduj

Does this error already occur at startup? Can you reproduce this error?

nicoduj commented 3 years ago

Was fine at startup . It happened while I sent an order I think, will try to reproduce but it works most of the time

mrbungle64 commented 3 years ago

@nicoduj

Please try version 0.5.5-alpha.4. Cannot read property 'attributes' of undefined should be fixed.

mrbungle64 commented 3 years ago

@nicoduj

I just released version 0.5.5

mrbungle64 commented 3 years ago

@nicoduj

Can you please give me some feedback?

nicoduj commented 3 years ago

Hi,

sorry, did not have time to test. I have bumped dep on my lib, will take a look and let you know if the problem occurs again ! Thank you !