agsh / onvif

ONVIF node.js implementation
https://onvif.pages.dev
MIT License
703 stars 240 forks source link

Discovery.probe Issue error. #102

Closed JulesL2 closed 4 years ago

JulesL2 commented 6 years ago

Hi, When i start discovery.probe (example4), it works but send an error message. I've tried to modify the code as written here #66 but nothing work. The discovery process seems to continue even if all cameras are discovered.

events.js:154
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property '0' of undefined
    at /var/www/html/plugins/script/core/ressources/node_modules/onvif/lib/utils.js:89:100
    at Parser.<anonymous> (/var/www/html/plugins/script/core/ressources/node_modules/xml2js/lib/parser.js:303:18)
    at emitOne (events.js:90:13)
    at Parser.emit (events.js:182:7)
    at Object.onclosetag (/var/www/html/plugins/script/core/ressources/node_modules/xml2js/lib/parser.js:261:26)
    at emit (/var/www/html/plugins/script/core/ressources/node_modules/sax/lib/sax.js:624:35)
    at emitNode (/var/www/html/plugins/script/core/ressources/node_modules/sax/lib/sax.js:629:5)
    at closeTag (/var/www/html/plugins/script/core/ressources/node_modules/sax/lib/sax.js:889:7)
    at Object.write (/var/www/html/plugins/script/core/ressources/node_modules/sax/lib/sax.js:1436:13)
    at Parser.exports.Parser.Parser.parseString (/var/www/html/plugins/script/core/ressources/node_modules/xml2js/lib/parser.js:322:31)
RogerHardiman commented 4 years ago

Hi Can you repeat this on your LAN please. Various changes have been made to the library recently so hopefully this was caused by some device on your LAN (often a printer responding to discovery) and we can have a go fixing it.

Thanks Roger

chriswiggins commented 4 years ago

Closing out old issue