Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Messages are not sent to groups #81

Open
Megver83 opened this issue Jun 14, 2017 · 10 comments
Open

Messages are not sent to groups #81

Megver83 opened this issue Jun 14, 2017 · 10 comments

Comments

@Megver83
Copy link

Hi, when I send a message to a group, no one receives it. From my client, it looks like it was sent, but no one receives it (as I said). However, I can see messages, so IDK what could be the issue and the solution.

@afish
Copy link

afish commented Nov 19, 2017

I have the same issue. I tried two clients (Pidgin and Miranda NG), both of them can join the chat room and receive messages in it, but my messages do not get delivered to other Whatsapp users. Below is a piece of XML communication:

Joining chatroom:

<presence to="48123123123-1231231231@whatsapp.server/resource">
<priority>5</priority>
<x xmlns="http://jabber.org/protocol/muc" />
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://miranda-ng.org/caps" ver="FRVQ6yERuJWzsxqnSCHGbLH3pLA=" ext="x86 mood activity mir_notes" />
<x xmlns="vcard-temp:x:update">
<photo />
</x>
<status></status>
</presence>
­
<presence from="48123123123-1231231231@whatsapp.server/resource" to="resource2@server/Miranda">
<status>14147682475</status>
<x xmlns="http://jabber.org/protocol/muc#user">
<status code="110" />
<item affiliation="member" role="participant" />
</x>
</presence>
­
<presence from="48123123123-1231231231@whatsapp.server/48123123123" to="resource2@server/Miranda">
<status>48123123123</status>
<x xmlns="http://jabber.org/protocol/muc#user">
<item affiliation="admin" role="moderator" />
</x>
</presence>
­
<message from="48123123123-1231231231@whatsapp.server/48123123123" to="resource2@server/Miranda" type="groupchat">
<subject>RoomName</subject>
</message>
­
<message from="48123123123-1231231231@whatsapp.server/ " to="resource2@server/Miranda" type="groupchat">
<composing xmlns="http://jabber.org/protocol/chatstates" />
</message>
­
<presence from="48123123123-1231231231@whatsapp.server/48123123123" to="resource2@server/Miranda">
<status>48123123123</status>
<x xmlns="http://jabber.org/protocol/muc#user">
<item affiliation="admin" role="moderator" />
</x>
</presence>

Message sent from Whatsapp client on Android (received correctly via transwhat):

<message from="48123123123-1231231231@whatsapp.server/John doe" to="resource2@server/Miranda" type="groupchat">
<body>From WA</body>
<delay xmlns="urn:xmpp:delay" stamp="2017-11-19T15:34:06Z" />
</message>

Message sent from Miranda to transhwat - doesn't appear on Whatsapp client:

<message id="z3ql8s3eo" to="48123123123-1231231231@whatsapp.server" type="groupchat">
<body>To WA</body>
</message>
­
<message from="48123123123-1231231231@whatsapp.server/resource" to="resource2@server/Miranda" type="groupchat">
<body>To WA</body>
</message>

Help would be very appreciated. Also if you could just dump the correct XML requests to send message to any group chat I would be happy because I am writing my own bot so I can hardcode them directly instead of relying on XMPP library.

@vitalyster
Copy link
Contributor

missing <x xmlns="http://jabber.org/protocol/muc" /> in outgoing message?

@afish
Copy link

afish commented Nov 19, 2017

Didn't help, this doesn't work:

<message id="fevcx51cxf" to="48123123123-1231231231@whatsapp.server" type="groupchat">
<body>To WA</body>
<x xmlns="http://jabber.org/protocol/muc" />
</message>

@vitalyster
Copy link
Contributor

what is in backend.log?

@Megver83
Copy link
Author

what is in backend.log?

My account is in a public node (jabjab.de) which looks like the admin disabled, or removed, transwhat :S
https://jabjab.de/status.php

@afish
Copy link

afish commented Nov 20, 2017

The log is below. Are you able to dump some correct XML communication? I can test it in Miranda to see whether this is client related.

2017-11-19 15:34:09,526 INFO Session: Message sent from 14147682475 to 48123123123-1231231231: To WA (xhtml=)
2017-11-19 15:34:09,699 ERROR transwhat: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/transwhat-0.2.2-py2.7.egg/transWhat/transwhat.py", line 107, in main
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/local/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/local/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/local/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/local/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/local/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/network/layer.py", line 102, in handle_read
    self.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/network/layer.py", line 110, in receive
    self.toUpper(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
    self.processReceived()
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
    self.toUpper(oneMessageData)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 65, in receive
    self.toUpper(payload)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/logger/layer.py", line 14, in receive
    self.toUpper(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_control.py", line 44, in receive
    self.toUpper(protocolTreeNode)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 194, in receive
    s.receive(data)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_send.py", line 64, in receive
    if not self.processIqRegistry(protocolTreeNode):
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/__init__.py", line 161, in processIqRegistry
    successClbk(protocolTreeNode, originalIq)
  File "/usr/local/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/layers/axolotl/layer_send.py", line 215, in sendToGroup
    jids.remove(ownJid)
ValueError: list.remove(x): x not in list

@vitalyster
Copy link
Contributor

So, transwhat is crashing and that is why message not sent

@afish
Copy link

afish commented Nov 20, 2017

Cool. Any idea why it crashes?

@nicolas-it
Copy link
Contributor

Maybe this tgalal/yowsup#2084 helps...

@afish
Copy link

afish commented Nov 20, 2017

It did help, thanks!

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

No branches or pull requests

4 participants