I updated the Nokia token after it was changed last night.
and now I succeed to connect and doesn't get unauthorized but i start to get these errors when receiving messages. anyone knows what to do ??? please?
Traceback (most recent call last):
File "/home//server/server.py", line 78, in <module>
asyncore.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 "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 86, in handle_read
self.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/network/layer.py", line 94, in receive
self.toUpper(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
self.processReceived()
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
self.toUpper(oneMessageData)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/auth/layer_crypt.py", line 63, in receive
self.toUpper(payload)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/logger/layer.py", line 14, in receive
self.toUpper(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 117, in receive
self.onMessage(protocolTreeNode)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 139, in onMessage
self.handleEncMessage(protocolTreeNode)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 222, in handleEncMessage
self.handlePreKeyWhisperMessage(node)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/axolotl/layer.py", line 267, in handlePreKeyWhisperMessage
self.toUpper(node)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 169, in receive
s.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 105, in receive
recv(node)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/protocol_messages/layer.py", line 21, in recvMessageStanza
self.toUpper(entity)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/server/venv-yowsapp/local/lib/python2.7/site-packages/yowsup/layers/interface/interface.py", line 98, in receive
self.callbacks[entityType](entity)
File "/server/layer.py", line 213, in onMessage
'message': messageOut.encode('latin-1').decode() if sys.version_info >= (3, 0) else messageOut})
File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0: invalid start byte
Can you please post the changes you did? the request file and the env file? i will look into it
@rami-dabain Thanks!
i just changed the env file to this (from #1385):
_VERSION = "2.13.39"
_OS_NAME= "S40"
_OS_VERSION = "14.26"
_DEVICE_NAME = "Nokia302"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk{phone}"
_AXOLOTL = True
And your s60env file?
On Mar 23, 2016 9:14 AM, "yniv" [email protected] wrote:
@rami-dabain https://github.com/rami-dabain Thanks!
i just changed the env file to this (from #1385
https://github.com/tgalal/yowsup/pull/1385):
_VERSION = "2.13.39"
_OS_NAME= "S40"
_OS_VERSION = "14.26"
_DEVICE_NAME = "Nokia302"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk{phone}"
_AXOLOTL = True—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200239248
what is the s60 env file?
i don't see any file with this name in the master... please enlighten me!
its in folder "env"
On Mar 23, 2016 9:17 AM, "yniv" [email protected] wrote:
i don't see any file with this name in the master... please enlighten me!
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200239811
I don't have this file.... and i can't see it in the yowsup master either... what branch do you use??
https://github.com/tgalal/yowsup/tree/master/yowsup/env
On Mar 23, 2016 9:20 AM, "yniv" [email protected] wrote:
I don't have this file.... and i can't see it in the yowsup master
either... what branch do you use??—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200240325
well there is no s60 file there..... only env_s40.py and env_android.py.... are you messing with me ? :)
the s40 one then
On Mar 23, 2016 9:24 AM, "yniv" [email protected] wrote:
well there is no s60 file there..... only env_s40.py and
env_android.py.... are you messing with me ? :)—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200241129
yeah, so this is what i sent you
Summarizing, to make yowsup work, I must:
1) download master branch
2) Make the changes in env/env_s40.py:
_VERSION = "2.13.39"
_OS_NAME= "S40"
_OS_VERSION = "14.26"
_DEVICE_NAME = "Nokia302"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk{phone}"
_AXOLOTL = True
3) Re-register the phone number... and... that's all? or have I to do anything else?
getting a bad token, can't register
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 9:33 AM, Fanawen [email protected] wrote:
Summarizing, to make yowsup work, I must:
1) download master branch
2) Make the changes in env/env_s40.py:
_VERSION = "2.13.39"
_OS_NAME= "S40"
_OS_VERSION = "14.26"
_DEVICE_NAME = "Nokia302"
_TOKEN_STRING = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk{phone}"
_AXOLOTL = True
3) Re-register the phone number... and... that's all? or have I to do
anything else?—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200245974
Register isn't required. Just update env file.
If you try to register again and get "invalid token", remove the Id file generated for this line in the previous register.
what do you mean?
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 9:50 AM, jlguardi [email protected] wrote:
Register isn't required. Just update env file.
If you try to register again and get "invalid token", remove the Id file
generated for this line in the previous register.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200252450
Ok, I followed the steps. But I am now getting the
No valid sessionsBad Mac!
message. This time, I cannot make it disappear even by erasing previous data in the .yowsup folder
@rami-dabain @jlguardi I think i have found the solution.
i found this fix from @jlguardi that fixed this error (in axolotl/layer.py)
def decodeInt7bit(self, string):
idx = 0
while ord(string[idx]) >= 128:
idx += 1
consumedBytes = idx + 1
value = 0
while idx >= 0:
value <<= 7
value += ord(string[idx]) % 128
idx -= 1
return value, consumedBytes
def unpadV2Plaintext(self, v2plaintext):
end = -ord(v2plaintext[-1]) # length of the left padding
length,consumed = self.decodeInt7bit(v2plaintext[1:])
return v2plaintext[1+consumed:end]
to summarize things. update the env file and then the axolotl/layer.py code with this code
@jlguardi can you commit this change so everyone can see it... it's seems crucial after updating the s40 env!
and thanks!
So this should fix registration and login ?
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 10:12 AM, yniv [email protected] wrote:
@rami-dabain https://github.com/rami-dabain @jlguardi
https://github.com/jlguardi I think i have found the solution.
i found this fix from @jlguardi https://github.com/jlguardi that fixed
this error (in axolotl/layer.py)def decodeInt7bit(self, string): idx = 0 while ord(string[idx]) >= 128: idx += 1 consumedBytes = idx + 1 value = 0 while idx >= 0: value <<= 7 value += ord(string[idx]) % 128 idx -= 1 return value, consumedBytes def unpadV2Plaintext(self, v2plaintext): end = -ord(v2plaintext[-1]) # length of the left padding length,consumed = self.decodeInt7bit(v2plaintext[1:]) return v2plaintext[1+consumed:end]to summarize things. update the env file and then the axolotl/layer.py
code with this code
@jlguardi https://github.com/jlguardi can you commit this change so
everyone can see it... it's seems crucial after updating the s40 env!
and thanks!—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200261795
@rami-dabain #1336 should fix register. this only fix the login and receiving messages with the new token
​I noticed something odd with registration
when registering with Android:
INFO:yowsup.common.http.warequest:{"status":"fail","reason":"incorrect","sms_length":6,"voice_length":6,"sms_wait":0,"voice_wait":0}
INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"sms","retry_after":25205,"sms_wait":25205,"voice_wait":65}
​
i get 2 responses !
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 10:17 AM, yniv [email protected] wrote:
@rami-dabain https://github.com/rami-dabain #1336
https://github.com/tgalal/yowsup/pull/1336 should fix register. this
only fix the login and receiving messages with the new token—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200263216
@yniv
With you patch - are you uinsg S40 env with encryption enabled?
On Wed, Mar 23, 2016 at 11:21 AM, Rami [email protected] wrote:
​I noticed something odd with registration
when registering with Android:INFO:yowsup.common.http.warequest:{"status":"fail","reason":"incorrect","sms_length":6,"voice_length":6,"sms_wait":0,"voice_wait":0}
INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"sms","retry_after":25205,"sms_wait":25205,"voice_wait":65}
​i get 2 responses !
Kind regards ,
Rami DabainOn Wed, Mar 23, 2016 at 10:17 AM, yniv [email protected] wrote:
@rami-dabain https://github.com/rami-dabain #1336
https://github.com/tgalal/yowsup/pull/1336 should fix register. this
only fix the login and receiving messages with the new token—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200263216—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200264469
And when loggin in:
DEBUG:yowsup.layers.network.layer:Connecting to e9.whatsapp.net:443
DEBUG:yowsup.layers.logger.layer:tx:
stream:features
/stream:features
DEBUG:yowsup.layers.logger.layer:tx:
DEBUG:yowsup.layers.network.layer:Disconnected, reason: Connection Closed
general: Disconnected: Connection Closed
offline:
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 10:20 AM, Rami Dabain [email protected] wrote:
​I noticed something odd with registration
when registering with Android:INFO:yowsup.common.http.warequest:{"status":"fail","reason":"incorrect","sms_length":6,"voice_length":6,"sms_wait":0,"voice_wait":0}
INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"sms","retry_after":25205,"sms_wait":25205,"voice_wait":65}
​i get 2 responses !
Kind regards ,
Rami DabainOn Wed, Mar 23, 2016 at 10:17 AM, yniv [email protected] wrote:
@rami-dabain https://github.com/rami-dabain #1336
https://github.com/tgalal/yowsup/pull/1336 should fix register. this
only fix the login and receiving messages with the new token—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200263216
@msshapira yes
@jlguardi btw are you sure the new token should be without the phone number??? this looks strange, but it works so i donno.. i'm afraid they will block us or something
@rami-dabain looks like you close the connection after login.. sounds like a bug in your code or something
that is the default yowsup-cli demos -y thingy
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 10:30 AM, yniv [email protected] wrote:
@rami-dabain https://github.com/rami-dabain looks like you close the
connection after login.. sounds like a bug in your code or something—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200267815
@yniv PR #1390 for padding
@yniv timestamp included in #1385 for registration with S40 (you were rigth!)
@yniv your initial question seems to be due to your layer. The exception is in server.py with json and I think this is not in yowsup layers.
its in layer.py
@jlguardi i haven't changed nothing with my code and it worked before. only started to crush after i changed the token.
now i start to get these errors for image messages.... :
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 128, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 150, in onMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 235, in handleEncMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 292, in handleWhisperMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 169, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 105, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/protocol_media/layer.py", line 40, in recvMessageStanza
AttributeError: 'NoneType' object has no attribute 'getAttributeValue'
specifically
'messageOut.encode('latin-1').decode()'
@jlguardi looks like the padding is not fully working
now i get these errors:
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 128, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 150, in onMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 235, in handleEncMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 292, in handleWhisperMessage
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 169, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 105, in receive
File "build/bdist.linux-x86_64/egg/yowsup/layers/protocol_messages/layer.py", line 21, in recvMessageStanza
File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
File "build/bdist.linux-x86_64/egg/yowsup/layers/interface/interface.py", line 98, in receive
File "/home/bumpadmin/bumpyard/whatsapp_client/bumpyard_layer.py", line 214, in onMessage
'message': messageOut.encode('latin-1').decode() if sys.version_info >= (3, 0) else messageOut})
File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xbd in position 131: invalid start byte
Well..... i don't know what to do now. I'm having these errors all the time. it's not working.
looks like something was changed with the protocol.
anyone have a solution ?? idea? please?
@yniv Are you using android env for runtime? Or have you done it? You are getting encrypted images (which is not supported by the api)
Try to start with S40 new token but remove axolotl be starting. So all people will receive a notification fo update your keys and they will start to send images unencrypted.
Probably you'll need to ack all pending messages (retry didn't worked for me) and skip them.
@jlguardi i'm using the s40 env.
how to remove axolotl?
@jlguardi you mean delete the axolotl.db file???
it's not dangerous??
@yniv rm HOME/.yowsup/phone/axolotl.db and restart the app.
@jlguardi i've removed the axolotl and after restart it generated prekeys but now when i send messages i always get:
ERROR:yowsup.layers.axolotl.layer:No session for: xxx, 1
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for phone xxx
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for phone xxx
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
restart it
Kind regards ,
Rami Dabain
On Wed, Mar 23, 2016 at 12:12 PM, yniv [email protected] wrote:
@jlguardi https://github.com/jlguardi i've removed the axolotl and
after restart it generated prekeys but now when i send messages i always
get:ERROR:yowsup.layers.axolotl.layer:No session for: xxx, 1
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for phone xxx
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for phone xxx
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200299469
Restart didn't work for me.
This is the same as #1378. It looks like an IOS issue...
Android messages are arriving ok.
2016-03-23 8:13 GMT-03:00 Rami [email protected]:
restart it
Kind regards ,
Rami DabainOn Wed, Mar 23, 2016 at 12:12 PM, yniv [email protected] wrote:
@jlguardi https://github.com/jlguardi i've removed the axolotl and
after restart it generated prekeys but now when i send messages i always
get:ERROR:yowsup.layers.axolotl.layer:No session for: xxx, 1
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for
phone xxx
ERROR:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 51886 for
phone xxx
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200299469—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200299767
@rdiasfreitas i don't use iphone. i use s40... from what i understood the android version has some other problems so i don't use it for now
@rami-dabain restart didn't work
@yniv I mean: the issue happens when we receive a message from an iPhone
device.
It looks like last Friday the AppStore was updated with a new iOS version,
it this broke something on encryption.
2016-03-23 8:18 GMT-03:00 yniv [email protected]:
@rami-dabain https://github.com/rami-dabain restart didn't work
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200301218
@rdiasfreitas i'm sending from an android... still happens. do you use the android env?
looks like this library is going to garbage.... @tgalal is not supporting this anymore and there are many issues that needs to be resolved... i'm almost desperate now.
@yniv, same situation here. The problem now is the bad mac, this rappens with iphone and android contacts...
@jlguardi i removed the axolotl and sent messages to the bad mac users but still when receiving images it crashes and mess up with the encryption
Try to use -M when send messages.
@jhonnyvey i'm not using the cli ... whats -M? also, i don't send to much messages... mainly i need to recieve :-/
-M its to bypass axolotl use.
@jhonnyvey it will work only for send... i need to receive messages
I have a similar but different issue
I have two numbers, I am using the latest S40 env discussed here and have update the V2 fix, cleared axolotl.db (multiple times) etc...
Both lines connect but
The error in B debug log:
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/protocol_media/layer.py", line 40, in recvMessageStanza
if mediaNode.getAttributeValue("type") == "image":
AttributeError: 'NoneType' object has no attribute 'getAttributeValue'
It looks like it is no londer receiving messages
@yniv @eduardobento I've fixed Bad Mac!!!
Edit file axolotl/protocolentities/receipt_outgoing_retry.py
@staticmethod
def fromProtocolTreeNode(node):
entity = OutgoingReceiptProtocolEntity.fromProtocolTreeNode(node)
entity.__class__ = RetryOutgoingReceiptProtocolEntity
retryNode = node.getChild("retry")
entity.setRetryData(retryNode["t"], "1", retryNode["count"], node.getChild("registration").data)
#entity.setRetryData(retryNode["t"], retryNode["v"], retryNode["count"], node.getChild("registration").data)
@staticmethod
def fromMesageNode(MessageNodeToBeRetried):
return RetryOutgoingReceiptProtocolEntity(
MessageNodeToBeRetried.getAttributeValue("id"),
MessageNodeToBeRetried.getAttributeValue("from"),
MessageNodeToBeRetried.getAttributeValue("t"),
"1"
# MessageNodeToBeRetried.getChild("enc").getAttributeValue("v")
@jlguardi can you adapt this fix to yowsup protocol and not only to the demo client? please...
@relima this is for yowsup protocol!! I've edited axolotl/protocolentities/receipt_outgoing_retry.py
@jlguardi thanks! it resolved the bad mac issues. but the images still crushes everything and after that some (2-3) regular text messages doesn't work
@jlguardi I try your modification, look the log:
ERROR:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
DEBUG:yowsup.layers.logger.layer:tx:
<receipt to="[email protected]" type="retry" id="C0DA272BA264DFA1B1">
<retry count="1" v="1" t="1458738513" id="C0DA272BA264DFA1B1">
</retry>
<registration>
ÓuUU
HEX:e0755555
</registration>
</receipt>
DEBUG:yowsup.layers.logger.layer:rx:
<ack type="retry" from="[email protected]" class="receipt" id="C0DA272BA264DFA1B1">
</ack>
Here persists the problem... any ideias?
@yniv if you don't ack or send retry, whatsapp closes connection
@jlguardi your fix really helped to move things forward (thank you very much). However, I am now having the same issues as @eduardobento and @yniv - it seems some acks are not being properly sent and a disconnection happens after a short while.
We're continuing the "acks not sent" issue on #1387, if anyone's interested
Hi @jlguardi ,
In this enviroment:
Results (Just for analysis):
It seems that in iPhone enc version=1 and Android enc version=2..
This is my tests for now.
The problem here is that everyone is trying to fix things without knowing what is actually happening and which data is the best to test and run with.
By the way, don't use S40. And check my commits, all the work is already done, the only thing is to translate to python.
Regards
Will you make a branch /repo fork? Cause it's indeed wasting time if 100
people work on different places. Would like having a final yowsup ...is it
possible to make a fork?
Thorsten Fröhlich
Am 23.03.2016 18:50 schrieb "mgp25" [email protected]:
The problem here is that everyone is trying to fix things without knowing
what is actually happening and which data is the best to test and run with.By the way, don't use S40. And check my commits, all the work is already
done, the only thing is to translate to python.Regards
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200464439
I've forked yowsup and merged all PR in https://github.com/jlguardi/yowsup on master branch.
Moreover, I was trying to adapt chatAPI for encrypted media but I get corrupted data (I can read just the url but xml is corrupted. Probably I've used incorrect session). It's too hard for me but I'll try again.
Thanks man! Will try and take your fork and let u know if everything works
so far
Thorsten Fröhlich
Am 24.03.2016 02:54 schrieb "jlguardi" [email protected]:
I've forked yowsup and merged all PR in https://github.com/jlguardi/yowsup
on master branch.Moreover, I was trying to adapt chatAPI for encrypted media but I get
corrupted data (I can read just the url but xml is corrupted. Probably I've
used incorrect session). It's too hard for me but I'll try again.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200612326
you didn't change the token.. but it works for u?
2016-03-24 5:51 GMT+01:00 Thorsten Fröhlich [email protected]:
Thanks man! Will try and take your fork and let u know if everything works
so farThorsten Fröhlich
Am 24.03.2016 02:54 schrieb "jlguardi" [email protected]:I've forked yowsup and merged all PR in
https://github.com/jlguardi/yowsup on master branch.Moreover, I was trying to adapt chatAPI for encrypted media but I get
corrupted data (I can read just the url but xml is corrupted. Probably I've
used incorrect session). It's too hard for me but I'll try again.—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/tgalal/yowsup/issues/1389#issuecomment-200612326
@jlguardi thats great! can you please just post a tweak so the code will not break when getting an image message? just ignore media messages for now
@jlguardi it still breaks after trying your new branch when receiving images and does not work on iphone6 .. even if we are not able to get images because they are encrypted it will be great - if it works on all platforms and more importantly the image does not break the code and is silently ignored .. do u knw what change needs to be done? can u help?
@yniv sorry posted similar stuff together, it will b great to just ignore them for now ..
I've just added to axolotl/layer.py
if protocolTreeNode.tag == "message" or protocolTreeNode.tag == "media":
And It crashes while decrypted data parsing.
I've edited too ython-axolotl/axolotl/sessionbuilder.py to avoid None return:
if sessionRecord.hasSessionState(message.getMessageVersion(), message.getBaseKey().serialize()):
logger.warn("We've already setup a session for this V3 message, letting bundled message fall through...")
logger.warn("Ignored")
# return None
But chatapi checks in old sessions to try to decrypt. Probably this is my fault.
@jlguardi great, thanks a lot! could you please commit your change to master, i can take from there and test it out ..
@pag16 @jlguardi small fix to ignore media messages
def recvMessageStanza(self, node):
if node.getAttributeValue("type") == "media":
mediaNode = node.getChild("media")
if mediaNode == None:
return None
if mediaNode.getAttributeValue("type") == "image":
entity = ImageDownloadableMediaMessageProtocolEntity.fromProtocolTreeNode(node)
self.toUpper(entity)
elif mediaNode.getAttributeValue("type") == "audio":
entity = AudioDownloadableMediaMessageProtocolEntity.fromProtocolTreeNode(node)
self.toUpper(entity)
elif mediaNode.getAttributeValue("type") == "video":
entity = VideoDownloadableMediaMessageProtocolEntity.fromProtocolTreeNode(node)
self.toUpper(entity)
elif mediaNode.getAttributeValue("type") == "location":
entity = LocationMediaMessageProtocolEntity.fromProtocolTreeNode(node)
self.toUpper(entity)
elif mediaNode.getAttributeValue("type") == "vcard":
entity = VCardMediaMessageProtocolEntity.fromProtocolTreeNode(node)
self.toUpper(entity)
maybe i need to send ack also?
File "/opt/transwhat/transwhat.py", line 95, in
asyncore.loop(timeout=1.0, count=10, use_poll = True)
File "/usr/lib/python2.7/asyncore.py", line 220, in loop
poll_fun(timeout, map)
File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
readwrite(obj, flags)
File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
obj.handle_error()
File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
obj.handle_read_event()
File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
self.handle_read()
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 86, in handle_read
self.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 94, in receive
self.toUpper(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/init.py", line 59, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
self.processReceived()
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
self.toUpper(oneMessageData)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init.py", line 59, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
self.toUpper(payload)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init.py", line 59, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init.py", line 59, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 127, in receive
self.toUpper(protocolTreeNode)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init.py", line 59, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init.py", line 169, in receive
s.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/init.py", line 105, in receive
recv(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/auth/layer_authentication.py", line 90, in handleStreamError
raise AuthError("Unhandled stream:error node:n%s" % node)
AuthError: Unhandled stream:error node:
stream:error
/stream:error
@thundergreen this happened after you applied my code?
After running your master branch, I got many of the "missing" messages, but it stops again at encrypted group msgs:
Traceback (most recent call last):
File "run/bonio_whatsapp.py", line 33, in <module>
stack.loop()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/stacks/yowstack.py", line 195, in loop
asyncore.loop(*args, **kwargs)
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 "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 86, in handle_read
self.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 94, in receive
self.toUpper(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
self.processReceived()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 51, in processReceived
self.processReceived()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
self.toUpper(oneMessageData)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
self.toUpper(payload)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/logger/layer.py", line 14, in receive
self.toUpper(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 118, in receive
self.onMessage(protocolTreeNode)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 140, in onMessage
self.handleEncMessage(protocolTreeNode)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 225, in handleEncMessage
self.handleWhisperMessage(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 271, in handleWhisperMessage
encMessageProtocolEntity = EncryptedMessageProtocolEntity.fromProtocolTreeNode(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 53, in fromProtocolTreeNode
encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 24, in setEncProps
assert encType in "pkmsg", "msg"
AssertionError: msg
I've tried disabling Axolotl layer, but that doesn't help, it only changes the error for another:
Traceback (most recent call last):
File "run/bonio_whatsapp.py", line 33, in <module>
stack.loop()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/stacks/yowstack.py", line 195, in loop
asyncore.loop(*args, **kwargs)
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 "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 86, in handle_read
self.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/network/layer.py", line 94, in receive
self.toUpper(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
self.processReceived()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
self.toUpper(oneMessageData)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
self.toUpper(payload)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/logger/layer.py", line 14, in receive
self.toUpper(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 59, in toUpper
self.__upper.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 169, in receive
s.receive(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 105, in receive
recv(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/protocol_messages/layer.py", line 20, in recvMessageStanza
entity = TextMessageProtocolEntity.fromProtocolTreeNode(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/protocol_messages/protocolentities/message_text.py", line 38, in fromProtocolTreeNode
entity.setBody(node.getChild("body").getData())
AttributeError: 'NoneType' object has no attribute 'getData'
In axolotl/layer.py -> handleEncMessage function replace try block with the following
try:
if "-" in node["from"] or node["type"] == "media":
print "Ignoring media or group message"
self.toLower(OutgoingReceiptProtocolEntity(node["id"], node["from"]).toProtocolTreeNode())
else:
if node.getChild("enc")["v"] == "2" and node["from"] not in self.v2Jids:
self.v2Jids.append(node["from"])
if node.getChild("enc")["type"] == "pkmsg":
self.handlePreKeyWhisperMessage(node)
else:
self.handleWhisperMessage(node)
this will ignore media and group messages - and send ack
Hi @pag16 thanks for the effort, but I'm still not receiving messages nor sending acks.
Most helpful comment
I've forked yowsup and merged all PR in https://github.com/jlguardi/yowsup on master branch.
Moreover, I was trying to adapt chatAPI for encrypted media but I get corrupted data (I can read just the url but xml is corrupted. Probably I've used incorrect session). It's too hard for me but I'll try again.