tgalal / yowsup

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

Getting error while sending messages to a particular group - works for others #1221

Closed mj2472 closed 8 years ago

mj2472 commented 8 years ago

Hello,

While sending messages to one of the group, I consistently keep getting this error. All works well for other numbers and groups - but just not able to send any message to one particular group.

It use to work well till couple days back even for this group. Any pointers? I tried removing axolotl.db but still no luck.

  File "./yowsup-cli", line 323, in <module>
    if not parser.process():
  File "./yowsup-cli", line 227, in process
    self.startCmdline()
  File "./yowsup-cli", line 255, in startCmdline
    stack.start()
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/demos/cli/stack.py", line 25, in start
    self.stack.loop(timeout = 0.5, discrete = 0.5)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/stacks/yowstack.py", line 187, in loop
    asyncore.loop(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 216, in loop
    poll_fun(timeout, map)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 156, in poll
    read(obj)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 87, in read
    obj.handle_error()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/network/layer.py", line 86, in handle_read
    self.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/network/layer.py", line 94, in receive
    self.toUpper(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    self.processReceived()
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    self.toUpper(oneMessageData)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/auth/layer_crypt.py", line 63, in receive
    self.toUpper(payload)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/logger/layer.py", line 14, in receive
    self.toUpper(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/axolotl/layer.py", line 115, in receive
    if not self.processIqRegistry(protocolTreeNode):
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/__init__.py", line 136, in processIqRegistry
    successClbk(protocolTreeNode, originalIq)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/axolotl/layer.py", line 175, in <lambda>
    self._sendIq(entity, lambda a, b: self.onGetKeysResult(a, b, self.processPendingMessages), self.onGetKeysError)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/axolotl/layer.py", line 339, in onGetKeysResult
    entity = ResultGetKeysIqProtocolEntity.fromProtocolTreeNode(resultNode)
  File "/Users/mukund/experiments/yowsup-2.4.48/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 87, in fromProtocolTreeNode
    preKeyId = ResultGetKeysIqProtocolEntity._bytesToInt(preKeyNode.getChild("id").getData())
AttributeError: 'NoneType' object has no attribute 'getChild'

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

mj2472 commented 8 years ago

Strangely images are going - but not text.

jlguardi commented 8 years ago

Group messages are now encrypted (just for text). Described in #1220 and chat-api

msshapira commented 8 years ago

Seems like not all messages are encrypted. Is there any rule to which are and which aren't? On Jan 4, 2016 5:43 PM, "jlguardi" notifications@github.com wrote:

Group messages are now encrypted (just for text). Described in #1220 https://github.com/tgalal/yowsup/issues/1220 and chat-api

— Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1221#issuecomment-168711097.

mj2472 commented 8 years ago

Hi, @tgalal - any timeline on this? or any workaround?

e0xify commented 8 years ago

need a fix for that, too

tgalal commented 8 years ago

WIP in wa16 branch

RiBro commented 8 years ago

@tgalal : Thanks a lot!

carlosfelipe29 commented 8 years ago

Hi, @mj2472. I am new with Yowsup. I barely undertand the layers, but I got send messages and Images to several SIM numbers. could you explain how I use a group in order to send just one Msg and photo. how I can create it?, or use inside a python code with yowsup. I still don't get it. Thanks a lot.

joaoricardo000 commented 8 years ago

Algo getting this, did not found any workaround... Not deleting .db nor removing/adding back to group.
Did anyone manage to reverse it?

relima commented 8 years ago

I am also having the exact same problem. Only happens with a particular group (created on Iphone 6+)

joaoricardo000 commented 8 years ago

Does anybody knows if that is already fixed on WA16 branch? And does WA16 branch is already functional?

relima commented 8 years ago

@joaoricardo000 i have experimented with wa16 (and with all of its proposed commits) and 1) it still does not fixes this issue and 2) it doesnt look like the wa16 will be a direct replacement to the main and develop branches.

joaoricardo000 commented 8 years ago

@relima Thanks! I spent some time debugging the messages exchange on this error, but still not a clue... With me happened on 2 groups that were working for months, with no apparent cause, no new member added/removed, no changes at all...

relima commented 8 years ago

@joaoricardo000 from what I gathered, it is a change on how encryption is implemented on the version of the whatsapp used by the member. It seems Chat API has already fixed this problem. Now, I don`t understand the changes enough as to port them to yowsup. So I will have to wait until someone more knowledgeable can get that sorted out.

See also https://github.com/tgalal/yowsup/issues/1220

tgalal commented 8 years ago

Fixed in latest update