tgalal / yowsup

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

Encryption not working #696

Closed poma closed 5 years ago

poma commented 9 years ago

I'm getting error "Sent keys were not accepted" when try to use encryption:

yowsup-cli demos -l ***:*** --debug --moxie -s *** qwe
DEBUG:yowsup.layers.logger.layer:rx:
<iq type="error" from="s.whatsapp.net" id="1">
<error text="not-authorized" code="401">
</error>
</iq>

Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 5, in <module>
    pkg_resources.run_script('yowsup2==2.2.78', 'yowsup-cli')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.78-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 304, in <module>

  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.78-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 227, in process

  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.78-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 274, in startSendClient

  File "build/bdist.linux-x86_64/egg/yowsup/demos/sendclient/stack.py", line 58, in start
  File "build/bdist.linux-x86_64/egg/yowsup/stacks/yowstack.py", line 170, in loop
  File "/usr/lib/python2.7/asyncore.py", line 216, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 156, in poll
    read(obj)
  File "/usr/lib/python2.7/asyncore.py", line 87, in read
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 48, in handle_read
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 55, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "build/bdist.linux-x86_64/egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "build/bdist.linux-x86_64/egg/yowsup/layers/coder/layer.py", line 35, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "build/bdist.linux-x86_64/egg/yowsup/layers/logger/layer.py", line 14, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 97, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 134, in processIqRegistry
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 245, in onSentKeysError
Exception: Sent keys were not accepted

Without encryption everything works fine

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

jlguardi commented 9 years ago

Try to regenerate keys with this app.

tgalal commented 9 years ago

@poma is this still happening ?