Assertion Error in Asyncore Layer Integration
Hi guys... this is a current error after ./start.sh
D 2019-05-07 17:52:35,144 yowsup.config.manager - load_path(path=/Users/alexanderdaza/Library/Application Support/yowsup/573114946690/config.json)
DEBUG:yowsup.config.manager:load_path(path=/Users/alexanderdaza/Library/Application Support/yowsup/573114946690/config.json)
D 2019-05-07 17:52:35,144 yowsup.config.manager - Detected config type: json
DEBUG:yowsup.config.manager:Detected config type: json
D 2019-05-07 17:52:35,144 yowsup.config.manager - Opening config for reading
DEBUG:yowsup.config.manager:Opening config for reading
D 2019-05-07 17:52:35,156 yowsup.config.manager - Loading config
DEBUG:yowsup.config.manager:Loading config
E 2019-05-07 17:52:35,228 yowsup.layers.network.dispatcher.dispatcher_asyncore - Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncore.py", line 91, in write
obj.handle_write_event()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncore.py", line 441, in handle_write_event
self.handle_connect_event()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncore.py", line 429, in handle_connect_event
self.handle_connect()
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/network/dispatcher/dispatcher_asyncore.py", line 34, in handle_connect
self.connectionCallbacks.onConnected()
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/network/layer.py", line 53, in onConnected
self.emitEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECTED))
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 94, in emitEvent
self.__upper.emitEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 94, in emitEvent
self.__upper.emitEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 94, in emitEvent
self.__upper.emitEvent(yowLayerEvent)
[Previous line repeated 3 more times]
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 88, in emitEvent
if self.__upper and not self.__upper.onEvent(yowLayerEvent):
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 212, in onEvent
stopEvent = stopEvent or s.onEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 109, in onEvent
return self.event_callbacks[eventName](yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/auth/layer_authentication.py", line 36, in on_connected
passive=self.getProp(self.PROP_PASSIVE, False)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 202, in subBroadcastEvent
self.broadcastEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 103, in broadcastEvent
self.__lower.broadcastEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 103, in broadcastEvent
self.__lower.broadcastEvent(yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 103, in broadcastEvent
self.__lower.broadcastEvent(yowLayerEvent)
[Previous line repeated 1 more time]
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 98, in broadcastEvent
if self.__lower and not self.__lower.onEvent(yowLayerEvent):
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 109, in onEvent
return self.event_callbacks[eventName](yowLayerEvent)
File "/Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/noise/layer.py", line 63, in on_auth
assert type(local_static) is KeyPair
AssertionError
same error here. It worked to register a new number, and it synced something, but then gave the same assertionerror
It is correct, I am reviewing each of the components of the framework to find the error. We need more people who can help us. We hope to have more community soon.
I've done some programming, but this is a bit above my level I feel -- overwhelming.
Do not worry, let's go step by step to solve this problem. I do not have much time but I try to work a couple of hours a day on the project. As soon as I have more news, I will publish them in the repository.
update yowsup to 3.2.3 it will fix the issue...
update yowsup to 3.2.3 it will fix the issue...
I will update yowsup and check if this update solves the problem. Thank you @Sharissa90
After upgrade, ./start.sh generate news errors. New issue created in #5
same issue, how can i update yowsup?
I have been updating yowsup every time a new version is released. I already consult @tgalal and I am waiting for your answer, because this same error occurs when I created the example echo application exposed on your wiki
Hi! This error has defined in https://github.com/tgalal/yowsup/milestone/2 with the name Asyncore Error Awaiting the response from the creator.
I believe this issue about yowsup cant read config file, if you look your config file it have "client_static_keypair": this issue raise when yowsup cant access or cant get this client static keypair...
That's right, but Yowsup in version 3 already has the necessary connections to get to the phone's configuration file. If you notice, in the debugging of the application by console, it indicates that it connects correctly to the whatsapp socket, however the connection and death is not maintained.
open /Users/alexanderdaza/Desktop/yowsapp-framework/venv/lib/python3.6/site-packages/yowsup/layers/noise/layer.py
find
if type(local_static) is bytes:
local_static = KeyPair.from_bytes(local_static)
and change to
if type(local_static) is bytes:
local_static = KeyPair.from_bytes(local_static)
else:
local_static = KeyPair.from_bytes(local_static.encode())
I hope it will quick dirty fix for now...