Closed yniv closed 8 years ago
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" notifications@github.com 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" notifications@github.com 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" notifications@github.com 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" notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 Dabain
On Wed, Mar 23, 2016 at 10:17 AM, yniv notifications@github.com 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 teamerx@gmail.com 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 Dabain
On Wed, Mar 23, 2016 at 10:17 AM, yniv notifications@github.com 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 notifications@github.com 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 notifications@github.com 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 notifications@github.com:
restart it
Kind regards , Rami Dabain
On Wed, Mar 23, 2016 at 12:12 PM, yniv notifications@github.com 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 notifications@github.com:
@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 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?