Skip to content
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

Non-whitespace before first tag error #65

Open
MichaelKohler opened this issue Nov 14, 2018 · 4 comments
Open

Non-whitespace before first tag error #65

MichaelKohler opened this issue Nov 14, 2018 · 4 comments

Comments

@MichaelKohler
Copy link

We're calling discover the following way where this._wemo is the wemo client instance without any specific options:

this._wemo.discover((error, deviceInfo) => {
   ...
});

From time to time, not always, according to our logs, this has the error parameter set with the error:

Non-whitespace before first tag

This seems to come from xml2js:
Leonidas-from-XIV/node-xml2js#345
Leonidas-from-XIV/node-xml2js#390

Unfortunately I can't reproduce this reliably so I can't really debug it.

@neophob
Copy link

neophob commented Nov 14, 2018

Maybe https://www.screenaware.com/en/blog/xml2js-sax-js-non-whitespace-before-first-tag (found it in the node-xml2js) is a work around?

@timonreinhard
Copy link
Contributor

@MichaelKohler Does that apply to specific Wemo devices?

@MichaelKohler
Copy link
Author

I honestly can't say, @neophob what do you think?

@jimmywarting
Copy link
Owner

wondering if it would help to trim some values beforehand somewhere...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants