wiomoc / whatsappweb-rs

WhatsApp Web client for Rust
MIT License
121 stars 37 forks source link

Error parsing node structure of contacts at login #3

Open azharuddinkhan8898 opened 6 years ago

azharuddinkhan8898 commented 6 years ago

@wiomoc Thanks for the great project but getting below error after getting connected.

2018-07-05 20:27:43 INFO  [ws] Queuing connection to wss://w7.web.whatsapp.com/ws
2018-07-05 20:28:05 INFO  [presence] new state: Connected
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error(Msg("Node has invalid binary format"), State { next_error:Some(Error(Msg("Couldn\'t read node content (list), node decription: response"), State { next_error: Some(Error(Msg("Couldn\'t read list item: 115, size: 37635"), State { next_error: Some(Error(Msg("Couldn\'t read attribute :notify, node decription: user"), State { next_error: Some(Error(Msg("invalid jid surfix N"), State { next_error: None, backtrace: InternalBacktrace { backtrace: None } })), backtrace: InternalBacktrace { backtrace: None } })), backtrace: InternalBacktrace { backtrace: None } })), backtrace: InternalBacktrace { backtrace: None } })), backtrace: InternalBacktrace { backtrace: None } })', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any', libcore/result.rs:945:5

Is there any solution for this? Thanks.

emehmet commented 6 years ago

I get this error too. Can it be because of different lib version? Or what do you think?

azharuddinkhan8898 commented 6 years ago

@emehmet I tried everything but getting this error again, I am new to rust and I guess that's the reason I am not able to figure it out. @wiomoc Can you please help us out?

emehmet commented 6 years ago

I think We make a mistake when try install this on windows. Because you don't get same error. Maybe you can publish docs for full installation on windows. Maybe there is a wrong things for protoc installation.

wiomoc commented 6 years ago

@emehmet As I mentioned, the problem is related to the node parser I wrote, but I can't reproduce these problems. This code acts on every platform the same

eeeeeta commented 6 years ago

Weird jid types definitely exist. I was running into this error until I patched my fork with this commit: https://github.com/eeeeeta/whatsappweb-rs/commit/75d2545053bdea08845bba397be577f4e3220b7a With that, it runs, revealing the existence of a temp suffix:

WARN whatsappweb::node_wire - Invalid jid surfix temp
wiomoc commented 6 years ago

@azharuddinkhan8898 @eeeeeta One of the problems is addressed in https://github.com/wiomoc/whatsappweb-rs/issues/6

@eeeeeta I'm going to cherry-pick some of your changes soon

eeeeeta commented 6 years ago

@wiomoc Sure, go ahead! Thanks for https://github.com/wiomoc/whatsappweb-rs/commit/dacf1ef4d9879c3ca2346620ebd94ed449bab654 - I don't seem to have run into any endianness-related issues on my fork, yet, but it might be worth my cherrypicking and testing it anyways...