Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

The keys are not updated correctly #79

Open
Jeronimo17 opened this issue Jun 3, 2018 · 30 comments
Open

The keys are not updated correctly #79

Jeronimo17 opened this issue Jun 3, 2018 · 30 comments
Labels

Comments

@Jeronimo17
Copy link

I went from windows to linux and forgot to copy the key database; I can update the key when I speak privately with someone, the keys are not updated from the group

I use https://github.com/hoehermann/wxpyWha

Received a message from [email protected] of type text
Writing 194 messages...
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxx5923, going to send a retry
Received a message from [email protected] of type text
Writing 195 messages...
Received a receipt with ID xxxxxxx020-22, sending ack.
Received a message from [email protected] of type text
Writing 196 messages...
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxx5923, going to send a retry
Received a message from [email protected] of type text
Writing 197 messages...
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxx9296, going to send a retry
WARNING:axolotl.sessionbuilder:We've already setup a session for this V3 message, letting bundled message fall through...
Received a message from [email protected] of type text
Writing 198 messages...
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxx5923, going to send a retry
Received a message from [email protected] of type text
Writing 199 messages...
Received a message from [email protected] of type text
Writing 200 messages...
Received a message from [email protected] of type text
Writing 201 messages...
Received a message from [email protected] of type text
Writing 202 messages...
Received a message from [email protected] of type text
Writing 203 messages...
Received a message from [email protected] of type text
Writing 204 messages...
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxx5923, going to send a retry
Received a message from [email protected] of type media
Writing 205 messages...

Thank you

@Aragur
Copy link
Owner

Aragur commented Jun 5, 2018

So keys should update after a message which cant be decrypted is recieved.
Could you please check this?

@Jeronimo17
Copy link
Author

I do not understand what you want to say to me, I think that when you speak privately with someone who does not have the right key, it is updated well but when in the group someone you have not talked to before speaks, the key is not updated at least that you speak in private with him, then already if the messages arrive by the group of that person

@Aragur
Copy link
Owner

Aragur commented Jun 6, 2018

Okay
They should definitly update, and I can not reproduce that.
We are experiencing currently encryption problems in groups maybe that could be your cause.
If you need any advice please jump on our discord, so we can trace and fix the issue.

@Aragur Aragur added the bug label Jun 6, 2018
@pabloruan0710
Copy link

+1

@Jeronimo17
Copy link
Author

Jeronimo17 commented Jun 16, 2018

Yowsup Cli client
==================
Type /help for available commands

[offline]:/L
Auth: Logged in!
[connected]:WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxxx955, going to send a retry
INFO:yowsup.layers.axolotl.layer_receive:Trying GetKeys for xxxxxxxx955, getting keys now
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxxx955, going to send a retry
INFO:yowsup.layers.axolotl.layer_receive:Trying GetKeys for xxxxxxxx955, getting keys now
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxxx955, going to send a retry
INFO:yowsup.layers.axolotl.layer_receive:Trying GetKeys for xxxxxxxx955, getting keys now
WARNING:yowsup.layers.axolotl.layer_receive:InvalidMessage or InvalidKeyIdException for xxxxxxxx955, going to send a retry
INFO:yowsup.layers.axolotl.layer_receive:Trying GetKeys for xxxxxxxx955, getting keys now

This error comes out every time I log in now
I can not avoid this error, I do not get more messages from no one

@juanpmarin
Copy link

@Jeronimo17 Do you found a fix for that ? I'm receiving the same behavior

@Aragur
Copy link
Owner

Aragur commented Jun 21, 2018

@Jeronimo17 @juanpmarin
Same issue happening on my side.
I have no idea how to fix this.
It seems that retry messages are not coming through.

@juanpmarin
Copy link

@AragurDEV so the issue is on the client or on the whatsapp backend ?

@Aragur
Copy link
Owner

Aragur commented Jun 21, 2018

Both :P
WhatsApp may have changed something on the Backend, so yowsup can't respond to that

@juanpmarin
Copy link

@AragurDEV :(
Do you know where can we start to search ?

@Aragur
Copy link
Owner

Aragur commented Jun 21, 2018

Only with reverse engineering or packet sniffing I think.

@juanpmarin
Copy link

Hi @AragurDEV, how can I help on the research ? How can I sniff the packets ?

@Jeronimo17
Copy link
Author

The same is said in the original tgalal#2516
Apparently the problem is just receiving not sending

@Aragur
Copy link
Owner

Aragur commented Jun 24, 2018

@juanpmarin You can use a Proxy and than sniff with Wireshark (also you have to send a "fake" SLL cert to the client to decrypt these properly)

@Jeronimo17 Yes it is only the recieving part (in groups) also this PR doesn't fix anything^^

@mikesalmonuk
Copy link

@aero9 - you should open a new issue or use the discord chat, your issue has nothing to do with this issue #79 and distracts everyone from the original problem.

@gauchoarg
Copy link

@AragurDEV in our case the problem with group is affecting the whole bot, so we cannot receive any massage in the group or one on one messages between contacts... any idea how to back to normal?

@Aragur
Copy link
Owner

Aragur commented Jun 26, 2018

@gauchoarg No idea. Sorry. Maybe a account deletion -> reregistration could help.

@Jeronimo17
Copy link
Author

Today, I have tried again and with the errors, I have received messages from the groups of 5 days ago, more recent do not arrive: S

@Aragur Aragur changed the title The keys are not updated from the group The keys are not updated correctly updated Jul 16, 2018
@j-gkr
Copy link

j-gkr commented Jul 30, 2018

hey guys, i have the same issue. Will there be a fix for this problem? I would really appreciate it because i am struggling with this issue some weeks now. or does anybody has some news to this?

@Jeronimo17
Copy link
Author

Jeronimo17 commented Jul 30, 2018

I have not been connected for a long time waiting for a solution

@franquitt
Copy link

The exception code is this
`

    except (InvalidMessageException, InvalidKeyIdException) as e
        logger.warning("InvalidMessage or KeyId for %s, going to send a retry", encMessageProtocolEntity.getAuthor(False))
        
        from yowsup.layers.axolotl.protocolentities.iq_key_get import GetKeysIqProtocolEntity
        entity = GetKeysIqProtocolEntity([encMessageProtocolEntity.getAuthor(False)])
        retry = RetryOutgoingReceiptProtocolEntity.fromMessageNode(node, self.store.getLocalRegistrationId())
        self.toLower(retry.toProtocolTreeNode())`

but the GetKeysIqProtocolEntity its never sended, why?

@juanpmarin
Copy link

@franquitt I saw the same issue and I tried to send it with different ways but the keys were never retreived anyway

@Jeronimo17 Jeronimo17 changed the title The keys are not updated correctly updated The keys are not updated correctly Jul 30, 2018
@dietzi
Copy link

dietzi commented Aug 5, 2018

I get in my chat "XXX security code changed. Tap for more info.". When I tap I should verify the security codes by scanning QR-code. Deleting axolotl.db brings up the message again.....

@Aragur
Copy link
Owner

Aragur commented Aug 6, 2018

@franquitt @juanpmarin
Indeed that is what I found. RetryOutgoingReceiptProtocolEntity is never received, WhatsApp may has changed some backend api endpoints...

@jegue
Copy link

jegue commented Aug 14, 2018

no work around about this at this point?
this is an annoying erro!

@j-gkr
Copy link

j-gkr commented Aug 16, 2018

i don't know...

can we do anything to get this work again?

@jegue
Copy link

jegue commented Aug 28, 2018

so there is a way of passing the keys direct to the code on the class GetKeysIqProtocolEntity?
get the code from wahtassp App like a qr code reader.
and how? thanks

i got this reading the code

Raw text ���- !��>� �����^����!T矁NU*Yp� �4!����55984152�- !�,� P���r-��(`qс�(՘��T.W���n)/���55331058
Raw bytes 46 00 80 01 22 d0 a2 10 5f 33 ee 20 d1 1a 1e ea 8e 91 25 e8 2b f1 6c b2 15 4e 79 f8 14 e5 52 a5 97 0f 10 9a f3 42 1f 17 f1 20 83 53 53 93 83 43 13 53 21 a2 d0 a2 10 52 cb 80 d5 0a eb 68 f7 22 da 6e 52 86 07 1d 18 1f f2 8d 59 81 6e c5 42 e5 79 c8 21 56 e2 92 f1 81 20 83 53 53 33 33 13 03 53 80 ec 11 ec 11 ec 11 ec 11 ec 11
Barcode format QR_CODE
Parsed Result Type TEXT
Parsed Result ���- !��>� �����^����!T矁NU*Yp� �4!����55984152�- !�,� P���r-��(`qс�(՘��T.W���n)/���55331058

@alejandroguille

This comment has been minimized.

@alejandroguille
Copy link

Try this:

1 - rm -rf root/.yowsup .
2 - python -m compileall .
3- login

@savek-cc
Copy link

Re-Creating the keys as per @alejandroguille worked for me.

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

No branches or pull requests