tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.06k stars 2.23k forks source link

Yowsup stops on receive broadcast messages #2203

Open sealabr opened 7 years ago

sealabr commented 7 years ago

Hello my yowsup is stopping when receive a message from a broadcast.

this number in the past was registered in an android device, maybe messages from broadcast is stoping my aplication...

stops here...

08-11 10:45:49 yowsup.layers.axolotl.layer_send DEBUG    Axolotl layer does not have the message, bubbling it upwards
08-11 10:45:49 yowsup.layers.logger.layer DEBUG    tx:
<ack to="1469457287@broadcast" type="retry" id="17EBC00D35EC63C477" class="receipt">
</ack>

08-11 10:46:39 yowsup.layers.protocol_iq.layer DEBUG    ping queue size: 1
08-11 10:46:39 yowsup.layers.logger.layer DEBUG    tx:
<iq xmlns="w:p" type="get" id="1">
</iq>

and after while this messages appers:

Stream Error type: xml-not-well-formed

@jlguardi can you help me??

Edit....

I'm also running yowsup with Yowsup-Restful.. a solution for flask aplication https://github.com/EliasKotlyar/Yowsup-Restful...

Edit Again....

running this number in recent clonned yowsup gives me this error... also in EliasKotlyar solution....


  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/layer_receive.py", line 41, in receive
    self.onMessage(protocolTreeNode)
  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/layer_receive.py", line 74, in onMessage
    self.handleEncMessage(protocolTreeNode)
  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/layer_receive.py", line 86, in handleEncMessage
    self.handlePreKeyWhisperMessage(node)
  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/layer_receive.py", line 125, in handlePreKeyWhisperMessage
    plaintext = sessionCipher.decryptPkmsg(preKeyWhisperMessage)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/axolotl/sessioncipher.py", line 95, in decryptPkmsg
    unsignedPreKeyId = self.sessionBuilder.process(sessionRecord, ciphertext)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/axolotl/sessionbuilder.py", line 50, in process
    unsignedPreKeyId = self.processV3(sessionRecord, message)
  File "/opt/rh/python27/root/usr/lib/python2.7/site-packages/axolotl/sessionbuilder.py", line 121, in processV3
    parameters.setOurOneTimePreKey(self.preKeyStore.loadPreKey(message.getPreKeyId()).getKeyPair())
  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 34, in loadPreKey
    return self.preKeyStore.loadPreKey(preKeyId)
  File "/root/new_yowsup/yowsup/yowsup/layers/axolotl/store/sqlite/liteprekeystore.py", line 21, in loadPreKey
    raise Exception("No such prekeyRecord!")
Exception: No such prekeyRecord!

tried deleting axolotl.db multiple times, but this error always occurs.

jlguardi commented 7 years ago

I haven't access to my code now. I remember a fix that I made: the problem is that broadcast messages should return receipt like group messages, I mean, include from and participant.

sealabr commented 7 years ago

@jlguardi in your rep?

jlguardi commented 7 years ago

No, it's just my private develop code.

mikkelam commented 7 years ago

@jlguardi I this something you could share 😄 ? I'm running into this issue myself

jlguardi commented 7 years ago

I had stopped sharing code due to spammers.

pabloruan0710 commented 7 years ago

I too have same problem @jlguardi