Yowsup: Cannot send to Group (it start just in a couple hour ago)

Created on 15 Mar 2016  路  32Comments  路  Source: tgalal/yowsup

My yowsup failed to send message to a group, it start just in a couple hour ago.

$yowsup-cli demos -c conf.txt -s [email protected] test

Traceback (most recent call last):
File "/usr/local/bin/yowsup-cli", line 4, in
import('pkg_resources').run_script('yowsup2==2.4.48', 'yowsup-cli')
File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 696, in run_script

File "build/bdist.linux-x86_64/egg/pkg_resources/init.py", line 1621, in run_script

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

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

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

File "build/bdist.linux-x86_64/egg/yowsup/demos/sendclient/stack.py", line 54, in start
File "build/bdist.linux-x86_64/egg/yowsup/stacks/yowstack.py", line 195, 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 86, in handle_read
File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 94, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/init.py", line 59, 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 59, 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 59, 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 59, 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 59, in toUpper

File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 115, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/init.py", line 136, in processIqRegistry

File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 175, in
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 339, in onGetKeysResult
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 87, in fromProtocolTreeNode
AttributeError: 'NoneType' object has no attribute 'getChild'

Most helpful comment

Hourly you can use the -M option in the message send command , disabling encryption.

All 32 comments

@nurdan Change env to S40 to disable group encryption which is not supported by the API yet.

Replace CURRENT_ENV = AndroidYowsupEnv() byCURRENT_ENV = S40YowsupEnv() in yowsup/env/init.py

It is already set on my yowsup/env/_init_.py but still on problem :

from .env_android import AndroidYowsupEnv
from .env_s40 import S40YowsupEnv

CURRENT_ENV = S40YowsupEnv()

Same here. Just downloaded @jlguardi fork with the fixed __init__.py but the code still crashes when trying to send to a group

Traceback (most recent call last):
  File "run/stack.py", line 25, in <module>
    stack.loop()
  File "build/bdist.linux-x86_64/egg/yowsup/stacks/yowstack.py", line 195, 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 86, in handle_read
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 94, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, 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 59, 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 59, 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 59, 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 59, in toUpper

  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 115, in receive
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 136, in processIqRegistry

  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 175, in <lambda>
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 339, in onGetKeysResult
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 87, in fromProtocolTreeNode
AttributeError: 'NoneType' object has no attribute 'getChild'

I discovered that when the stack is created with axolotl=False, the code can send messages to groups, but not to individuals. If axolotl=True it is the other way around: it can send private messages but not to groups.

Can anybody think of a temporal workaround to this? I'm not keen on yowsup's internals

I have the same problem.

same problem. private message too.

Same problem. Group messages not working.

Same problem here with the version of Dic 14.

same problem. private message too.

Have any one tried to register again (with the new Id) with #1335 but used S40 env after that?

I encounter the seame issue. I re-register with the Android env as stated previously by @jlguardi in issue #1335. Registration works fine. But the problem when I try to send a group message remains :

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/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'

As cfenollosa commented:
Removing Axolotl (either with axolotl=Falseor removing the YowAxolotlLayerlayer) does work for sending group messages, but not private messages :(

Same problem. Group messages not working. =(

As cfenollosa commented:
Removing Axolotl (either with axolotl=Falseor removing the YowAxolotlLayerlayer) does work for sending group messages, but not private messages :(

Where do I change this ?

@WilliamSouza indeed you can 'fix it' by commenting yowstack.py on getDefaultLayer:

def getDefaultLayers(axolotl = False, groups = True, media = True, privacy = True, profiles = True):
        coreLayers = YowStackBuilder.getCoreLayers()
        protocolLayers = YowStackBuilder.getProtocolLayers(groups = groups, media=media, privacy=privacy, profiles=profiles)

        allLayers = coreLayers
        #if axolotl:
            #from yowsup.layers.axolotl import YowAxolotlLayer
            #allLayers += (YowAxolotlLayer,)

        allLayers += (YowParallelLayer(protocolLayers),)

        return allLayers 

But this disables private messages...

@alafanechere What is the name of file should I edit it? I can't send msg via YowSup to group. Did u face this problem too ? or u fix it ? thnx.

This is not a proper fix but allow group sending. I edited yowstack.py. Please read my last answer

@alafanechere did not work. error persists =(

@alafanechere Tried too and this not work :(

Same problem here. Tried these but not working.

Same here! Pls help! =/

I comment the 3 lines below in the file yowstack.py, but not work to send to group,
anything else?

         #if axolotl:
        #from yowsup.layers.axolotl import YowAxolotlLayer
        #allLayers += (YowAxolotlLayer,)

Hourly you can use the -M option in the message send command , disabling encryption.

@CARLOSCAROSA, Tks -M works!!! :+1:

@CARLOSCAROSA Works fine! Tks! :+1:

-M Works!!!!! Tks!

Yup, -M does the trick!

TKS @CARLOSCAROSA :raised_hands:

I've made a PR #1361 to disable group messages encryption (due to it's not supported yet) but encryption is enabled by default in echo/send client.

With this PR we have groups/private messages working again.

Thank you so much @CARLOSCAROSA, @jlguardi n all..
May Allah Ta'ala the almighty give you better reward.

Works for me tks @CARLOSCAROSA

-M work, thank @CARLOSCAROSA

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MauricioAHM picture MauricioAHM  路  5Comments

Realitaetsverlust picture Realitaetsverlust  路  4Comments

EliasinnKamachoo picture EliasinnKamachoo  路  3Comments

abhiroock picture abhiroock  路  5Comments

dickbutt2 picture dickbutt2  路  3Comments