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

XML Parse Error on Device Detection #18

Closed
thomas-br opened this issue Jan 5, 2020 · 3 comments
Closed

XML Parse Error on Device Detection #18

thomas-br opened this issue Jan 5, 2020 · 3 comments
Assignees
Labels

Comments

@thomas-br
Copy link

Hi,

I'm running into issues on device detection with Wemore running as a docker container in my Smarthome network with my Echo Dot 3rd Gen.

On device detection phase wemore is receiving the xml:

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:GetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:GetBinaryState></s:Body></s:Envelope>

which fails on parsing (https://github.com/dhleong/wemore/blob/master/lib/emulate.js#L323) due to the missing space between envelope/" and s:encodingStyle

Error: No whitespace between attributes
Line: 0
Column: 102
Char: s

Any idea?

Echo Dot version: 3389730436

@dhleong
Copy link
Owner

dhleong commented Jan 5, 2020

Thanks for the report. This gives some context to the error described here.

It looks like the XML parser is barfing on that malformed data the Echo is sending, but I think we can just disable strict parsing.

@dhleong dhleong closed this as completed in 8d04175 Jan 5, 2020
@dhleong
Copy link
Owner

dhleong commented Jan 5, 2020

Just published 0.6.2; please give it a shot and let me know if it works. I tested it briefly but I'm not at home and don't have my normal setup here.

@dhleong dhleong self-assigned this Jan 5, 2020
@dhleong dhleong added the bug label Jan 5, 2020
@thomas-br
Copy link
Author

works 👍

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

No branches or pull requests

2 participants