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

Disconnect every 6-7 minutes with Tag: stream:error #401

Open
semitom opened this issue Mar 25, 2016 · 25 comments
Open

Disconnect every 6-7 minutes with Tag: stream:error #401

semitom opened this issue Mar 25, 2016 · 25 comments

Comments

@semitom
Copy link

semitom commented Mar 25, 2016

version: v0.9.0
pidgin version: Pidgin 2.10.11-16.fc22 (libpurple 2.10.11)

About every 6 or 7 minutes I get disconnected from whatsapp. I built the package with make DEBUG and disconnects happen after the following message:

Tag: stream:error
Data:  ...
 Tag: ack
 at[id]=564BE89EB34399E4479294FA510062
 Data:  ...

After re-connection it retrieves all recent group chat messages again.

@simgekim
Copy link

same here. devel version.

@ariasrodolfo
Copy link

After re-connection it retrieves** all recent group chat messages again**.
same problem.
"ProductName", "Whatsapp for Purple"
"ProductVersion", "0.9.0"
Pidgin 2.10.10-3.fc20 (libpurple 2.10.10)

@saviola777
Copy link

Same here, disconnect every 6 (+/- 5 seconds) minutes, then a replay of old group chat messages (from about the time it started happening, a couple of days ago) mixed with newer messages (seemingly random order). My own messages are sent correctly, receiving of non-group messages works but is sometimes delayed.

Tested with version 0.9.0 and the most recent git master, resource Android-2.31.151-443.

@Imhotep-2700bc
Copy link

Same effect with my installation. It appeared on Tu. 22nd of March.
Pidgin 2.10.12 (libpurple 2.10.12), whatsapp for purple 0.9.0 resource Android-2.31.151-443

@Imhotep-2700bc
Copy link

Question @semitom
I tried "make debug" but got only a message "do nothing". Can you give me a hint how to build a debug version?

@ghost
Copy link

ghost commented Mar 26, 2016

same problem here. whatsapp-purple 0.9.0 resource Android-2.31.151-443.
Group messages create disconnects every 10 seconds and old and new messages get repeated.

@semitom
Copy link
Author

semitom commented Mar 27, 2016

@Imhotep-2700bc It really is as simple as cloning the repo and instead of building with make as documented in the readme, you build with make debug. If you already build it before, you may need to do a make clean to remove the old build files.

@Imhotep-2700bc
Copy link

@semitom Thanks for your hint, it works after cleaning the build.
Some things are quite simple, I should have thought on this myself.

Now I simply started pidgin from bash shell and I'm able to redirect the debug output into a file. Do you know it there is any debug parameter or predefined output file?

@semitom
Copy link
Author

semitom commented Mar 27, 2016

@Imhotep-2700bc Unfortunately I have no knowledge about other possible debugging options

@hoehermann
Copy link

I too am affected by this bug.
Development build from git revision a802c9a .
I am using S40-2.13.30-443 for the client version string.

@magnific0
Copy link

Same problem. BitlBee-LIBPURPLE 3.4.2, whatsapp-purple (latest master, x64 default build) with Android-2.12.440-443.

@whatsIGit
Copy link

Same problem with latest master on x64 linux (also same debug output with stream:error etc.). BUT: I had two groups popping up with old messages after the reconnect. One of them eventually stopped to produce the same old messages. After I left the other group (that went on popping up with old messages in random order) the server stopped disconnecting every 5-6 minutes!

@hoehermann
Copy link

A keen observation. I too experience old messages being received over and over again. I did not suspect a correlation at first. It could be that we fail to send acknowledgement messages. It could be that we actively request resends. Either behaviour could lead to a server side forced disconnect.

@s09bQ5
Copy link

s09bQ5 commented Mar 29, 2016

The order of the messages appears to be messed up because we ask each sender to reencrypt the messages, which updates to timestamp. The sender also does not process our requests in order.

We request reencryption because of these errors:

  • (parseWhisperMessage): No such signedprekeyrecord! XXXX Unknown error
  • (parseGroupWhisperMessage): InvalidKeyIdException No key state XXXX in record!

with varying numbers XXXX.

@jEsuSdA
Copy link

jEsuSdA commented Mar 30, 2016

I can confirm that. I Have the same problem.

@davidgfnet
Copy link
Owner

You might want to try the devel branch. In a recent commit I started making use of the "count" field to try to limit the amount of resends we do, so hopefully after 3 or 4 re-sends it will stop somehow.

@Imhotep-2700bc
Copy link

¡Hola!
I run the devel branch.
The repetition of the messages within one session stops after tree times. But the server disconnects the session after a while. After the reconnection all the old messages are sent again.

@andreas-42
Copy link

With devel version, I get duplicated group messages as well (I get disconnected and reconnected every couple of minutes, with old messages repeated), for about half an hour, then it stops.
At the moment when the second copy of the message arrives, I get an "Axolotl exception (parseGroupWhisperMessage): DuplicateMessageException Received message with old counter" in the logs. However, the resending then continues for a while as described above - without further exceptions, but lots of stream:error messages as described by others above.

@ghost
Copy link

ghost commented Mar 30, 2016

I've been running the devel branch for about 45mins, still keep on getting disconnected every 6-7 minutes and old messages repeated.

@s09bQ5
Copy link

s09bQ5 commented Mar 30, 2016

As you can see in the initial comment of this issue, the server sends an id (564BE... above) which is the id of the first message received from the server after having connected. I guess the server is still waiting for us to acknowledge this message.
In my case the first disconnect was caused by a group message that I received while I was online, so this problem is not restricted to offline messages.

@davidgfnet
Copy link
Owner

OK got it, can you please share a full log so I can get a better look at it?

@andreas-42
Copy link

I just sent you a log by e-mail.

@whatsIGit
Copy link

Update: For a friends account the method described below did not work. Moreover, it seems that after a couple of group messages the whatsApp server stops delivering further messages of that group, as if it is waiting for a confirmation from the client. In this state my friend could not receive messages from me, though she could send messages to me.

Meanwhile I've found a workaround that makes the recurring group messages stop: I quit pidgin. Then I remove the WhatsApp-Account from .purple/accounts.xml and all WhatsApp-contacts from .purple/blist.xml and start pidgin again. After pidgin has connected to one of my other accounts I stop it again, restore the previous state of accounts.xml and blist.xml, and finally start pidgin.
I have no idea why this works. I couldn't find any other config file that has changed in a way that would explain, why the behavior changed. But it seems to work.

@saviola777
Copy link

@whatsIGit

The workaround did not work for me either (but I only have the whatsapp account on pidgin, so I could not connect it to any other accont), and I have observed the same behavior as your friend (but that was before the attempted workaround): eventually I stopped receiving messages for the only group chat I'm in. Leaving and re-joining the group fixed that (well, it went back to 6 minute disconnect + spamming of old and new message in random order).

@ghost
Copy link

ghost commented Apr 2, 2016

I also use https://github.com/agamez/yappari whatsapp client with Nokia N900. This client is running ok, so maybe the code can be compared? Or maybe not?!.

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