tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.05k stars 2.22k forks source link

Version 3.2.3 | NotImplementedError: Unhandled stream:error node: (see also last output with debug info) #2730

Open jowiemann opened 5 years ago

jowiemann commented 5 years ago

Error after sending a message with echo client:

</stream:error>
</bad-mac>
<bad-mac>
<stream:error>
NotImplementedError: Unhandled stream:error node:
    raise NotImplementedError("Unhandled stream:error node:\n%s" % node)
  File "/opt/fhem/yowsup-master/yowsup/layers/auth/layer_authentication.py", line 72, in handleStreamError
    recv(node)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 130, in receive
    s.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 194, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(protocolTreeNode)
  File "/opt/fhem/yowsup-master/yowsup/layers/axolotl/layer_receive.py", line 34, in receive
    s.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 194, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(protocolTreeNode)
  File "/opt/fhem/yowsup-master/yowsup/layers/axolotl/layer_control.py", line 35, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/logger/layer.py", line 14, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(node)
  File "/opt/fhem/yowsup-master/yowsup/layers/coder/layer.py", line 21, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(self._wa_noiseprotocol.receive())
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer.py", line 144, in _flush_incoming_buffer
    self._flush_incoming_buffer()
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer.py", line 156, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(bytes(data))
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer_noise_segments.py", line 39, in receive
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.toUpper(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/network/layer.py", line 103, in receive
    self.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/network/layer.py", line 100, in onRecvData
    self.connectionCallbacks.onRecvData(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/network/dispatcher/dispatcher_asyncore.py", line 48, in handle_read
    self.handle_read()
  File "/usr/lib/python3.5/asyncore.py", line 423, in handle_read_event
    obj.handle_read_event()
  File "/usr/lib/python3.5/asyncore.py", line 83, in read
E 2019-05-08 08:32:24,328 yowsup.layers.network.dispatcher.dispatcher_asyncore - Traceback (most recent call last):
jowiemann commented 5 years ago

Hello, next occurance of this error while sending a message. I've started echo client now with debug option.

Greetings Jörg

jowiemann commented 5 years ago

Ok, now with debug Infos:

D 2019-05-10 22:03:17,564 yowsup.layers.logger.layer - rx:
<iq id="55" type="result" t="1557518597" from="49xxxxxxxxxxxxxx@s.whatsapp.net">
</iq>

D 2019-05-10 22:04:07,244 yowsup.layers.protocol_iq.layer - ping queue size: 1
D 2019-05-10 22:04:07,249 yowsup.layers.logger.layer - tx:
<iq id="56" xmlns="w:p" type="get">
</iq>

D 2019-05-10 22:04:07,729 yowsup.layers.logger.layer - rx:
<iq id="56" type="result" t="1557518647" from="49xxxxxxxxxxxxxx@s.whatsapp.net">
</iq>

D 2019-05-10 22:04:33,822 yowsup.layers.logger.layer - rx:
<stream:error code="503">
</stream:error>

E 2019-05-10 22:04:34,002 yowsup.layers.network.dispatcher.dispatcher_asyncore - Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/usr/lib/python3.5/asyncore.py", line 423, in handle_read_event
    self.handle_read()
  File "/opt/fhem/yowsup-master/yowsup/layers/network/dispatcher/dispatcher_asyncore.py", line 48, in handle_read
    self.connectionCallbacks.onRecvData(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/network/layer.py", line 100, in onRecvData
    self.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/network/layer.py", line 103, in receive
    self.toUpper(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer_noise_segments.py", line 39, in receive
    self.toUpper(bytes(data))
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer.py", line 156, in receive
    self._flush_incoming_buffer()
  File "/opt/fhem/yowsup-master/yowsup/layers/noise/layer.py", line 144, in _flush_incoming_buffer
    self.toUpper(self._wa_noiseprotocol.receive())
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/coder/layer.py", line 21, in receive
    self.toUpper(node)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/logger/layer.py", line 14, in receive
    self.toUpper(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/axolotl/layer_control.py", line 35, in receive
    self.toUpper(protocolTreeNode)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 194, in receive
    s.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/axolotl/layer_receive.py", line 34, in receive
    self.toUpper(protocolTreeNode)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 194, in receive
    s.receive(data)
  File "/opt/fhem/yowsup-master/yowsup/layers/__init__.py", line 130, in receive
    recv(node)
  File "/opt/fhem/yowsup-master/yowsup/layers/auth/layer_authentication.py", line 72, in handleStreamError
    raise NotImplementedError("Unhandled stream:error node:\n%s" % node)
NotImplementedError: Unhandled stream:error node:
<stream:error code="503">
</stream:error>

D 2019-05-10 22:04:34,008 yowsup.layers.network.dispatcher.dispatcher_asyncore - handle_close
D 2019-05-10 22:04:34,012 yowsup.layers.network.layer - Disconnected
D 2019-05-10 22:04:34,031 yowsup.layers.axolotl.layer_control - Disconnected, reboot_connect? = False
D 2019-05-10 22:04:34,040 yowsup.layers.protocol_iq.layer - stopping ping thread
D 2019-05-10 22:04:34,365 yowsup.layers.protocol_iq.layer - YowPingThread-4 - ping thread stopped
paco020295 commented 5 years ago

Has anyone been able to figure out what causes this problem? How to prevent it? Or any other info to add?

YashinDaniil commented 4 years ago

Faced this problem, when I started demos with the echo parameter, through proxychains-ng. After this message is not sent or received