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
AssertionError [ERR_ASSERTION]: Difference is Invalid #2
Comments
I tried on linux ubuntu 17 with nodejs 8 and got the same error (this come from hap-client-tool but it same for the script above which use hap-client) :
|
@dragouf Apologies, I was away from my computer all weekend. I will take a look at this sometime this evening. |
@dragouf Usually buffer issues like this turn out to be either an old version of Node, or something weird about the data being returned by the device itself. Since you've tried with Node 8, we can be pretty sure Node isn't the problem :-) What kind of device are you trying to connect to? |
Thanks for your reply. |
Yeah, I haven't tested with that device before. It's probably returning some unexpected data; let's see if we can figure out what. Could you please try again (either with hap-client-tool or with your original hap-client code), but this time set the environment variable |
ok no problem. Here is the result of the hap-client-tool command in debug :
|
also tried with the dump command :
in the previous result it also has the |
in case here is what I get with avahi-browse :
|
@dragouf I think what's going on here is that the HTTP response from the device is being split over multiple network messages, which the parsing code isn't set up to handle. If you wouldn't mind helping debug, could you please go into your let parsed;
try {
parsed = this._parseMessage(new _bufferReader2.default(processed));
} catch (e) {
// parsing failed; wait for more data
return [[], buf];
} This should catch the exception and wait for more data to come in before trying again. If you have trouble making this change, I can put together a new version for you to test with this weekend. Thanks! |
@forty2 thanks for the fix, I tried with
|
Hi @forty2, no idea about this error ? |
I'm having similar issues, except with an iHome Smart Plug iSP6X. Making the fix to line 187 for multi part responses got me past the Difference Is Invalid error, but now I'm stuck at the MaxAuthenticationAttempts pairing failure as well. Here's my log in case it helps: C:\Users\username\AppData\Roaming\npm\node_modules>hap-client-tool pair -d 192.168.1.117 -p 80 > output |
Same problem here |
thanks for this library, anyway I got this :
when I try to execute this :
any idea ?
I execute this on windows 10
The text was updated successfully, but these errors were encountered: