tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.07k stars 2.23k forks source link

can't register: old_version #1824

Closed arjenduinhouwer closed 7 years ago

arjenduinhouwer commented 7 years ago

yowsup-cli v2.0.15 yowsup v2.5.0

I'm using a fresh install and have these settings in env_s40.py:

    _VERSION = "2.16.9"
    _OS_NAME= "S40"
    _OS_VERSION = "14.26"
    _DEVICE_NAME = "302"
    _MANUFACTURER = "Nokia"
    _TOKEN_STRING  = "PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk1471306425030{phone}"
    _AXOLOTL = True

The registration command:

sudo yowsup-cli registration --requestcode sms --phone 31XXXXXXXX --cc 31 --mcc 204 --mnc 12

The reponse:

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail
reason: old_version

What else can I do to debug this problem?

mgp25 commented 7 years ago

There is nothing to debug. The problem is clear: old_version. This means you need to update the version. And why are you still using S40 data? Use android.

Bodasia commented 7 years ago

When use android The reponse:

/L [offline]: general: Disconnected: Connection Closed

mgp25 commented 7 years ago

Using S40 is risky, it's a platform that WhatsApp stopped giving support and at the end of this year, they are probably dropping the service for S40 users, thats why its better to use Android.

cmeerw commented 7 years ago

But Using Android with WA16 protocol is probably even more risky... (for Android you should really use WA20 protocol as well)

mgp25 commented 7 years ago

Maybe in the near future, when 1.6 is dead, i'll release WA20, depending on what WhatsApp does

arjenduinhouwer commented 7 years ago

Thanks mgp25, I'll switch to android, this is a matter of changing the default in env.py file?

import abc
import logging
from six import with_metaclass

logger = logging.getLogger(__name__)

DEFAULT = "Android"

...
mgp25 commented 7 years ago

Yes. In case Android doesn't work for you. Use this data for S40 (I don't recommend it's use):

arjenduinhouwer commented 7 years ago

I really appreciate your help mgp25, I know how time consuming this can be. So kudos!

Ok I changed to Android. But I still receive this error:

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail
reason: old_version

So I changed yowsup/env/env.py

DEFAULT = "Android"

and changed yowsup/env/env_android

 _MD5_CLASSES = "1I2weuZmVg+uL50+HXeSJw=="
 _VERSION = "2.16.328"

I must be missing something? I'm not a python dev, so maybe I need to clear cache or something like that?

jlguardi commented 7 years ago

You can also try S40: Version = 2.16.10 ‎Token string = PdA2DJyKoUrwLw1Bg6EIhzh502dF9noR9uFCllGk

Bodasia commented 7 years ago

maybe, debug info can help you, to help me with android version

yowsup-cli demos -l 380939838072:5ZH/f8EQAX8YRoNG461WWvjJ0I8= -y -d
yowsup-cli  v2.0.15
yowsup      v2.5.0

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate

DEBUG:yowsup.env.env:Env not set, setting it to android
DEBUG:yowsup.env.env:Current env changed to android
DEBUG:yowsup.stacks.yowstack:Initializing stack
DEBUG:yowsup.stacks.yowstack:Constructed Network Layer
DEBUG:yowsup.stacks.yowstack:Constructed Stanza Regulator Layer
DEBUG:yowsup.stacks.yowstack:Constructed Crypt Layer
DEBUG:yowsup.stacks.yowstack:Constructed Coder Layer
DEBUG:yowsup.stacks.yowstack:Constructed Logger Layer
DEBUG:yowsup.stacks.yowstack:Constructed <yowsup.layers.axolotl.layer_control.AxolotlControlLayer object at 0x7eff52bae590>
DEBUG:yowsup.stacks.yowstack:Constructed Axolotl Layer - <yowsup.layers.axolotl.layer_receive.AxolotlReceivelayer object at 0x7eff52b9ee10>
DEBUG:yowsup.stacks.yowstack:Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Presence Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Groups Iq Layer - Media Layer - Privacy Layer - Profiles Layer
DEBUG:yowsup.stacks.yowstack:Constructed CLI Interface Layer
Yowsup Cli client
==================
Type /help for available commands

[offline]:/L
DEBUG:yowsup.layers.network.layer:Connecting to e6.whatsapp.net:443
DEBUG:yowsup.layers.logger.layer:tx:
<stream:features>
</stream:features>

DEBUG:yowsup.layers.logger.layer:tx:
<auth passive="true" user="380939838072" mechanism="WAUTH-2">
</auth>

DEBUG:yowsup.layers.logger.layer:rx:
<stream:features>
</stream:features>

DEBUG:yowsup.layers.logger.layer:rx:
<challenge>
��R���Gl��
�����j
HEX:9ade521985969d476ce7ea0d94f491b58d1a836a
</challenge>

DEBUG:yowsup.layers.logger.layer:tx:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
�\�y¨��+7W�$^h�E�I�(�/Ҫ#��Z�����ӛL����8�sª$���������$�ü�V��sV;l
HEX:9d5cbf79c2a8a4b82b37571efc245e689245e349a5288e2fd2aa23cec35a0401acfac2feafd39b0f4cac1017b3c1fa38eab21273c2aa24abb19716f2d80f80b6cdc724dbc3bc9d56938773563b6c
</response>

DEBUG:yowsup.layers.network.layer:Disconnected, reason: Connection Closed
general: Disconnected: Connection Closed
arjenduinhouwer commented 7 years ago

Ok, the situation is progressed a bit. I'm successfully registered and sent a test message, which came trough (pie for everyone!)

But Yowsup keeps using the s40 device. below my debug output:

DEBUG:yowsup.env.env:Env not set, setting it to s40
DEBUG:yowsup.env.env:Current env changed to s40
DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.16.9 S40Version/14.26 Device/Nokia-302'}
DEBUG:yowsup.common.http.warequest:cc=31&in=6xxxxxxxx&id=%E5%25%2Ch%3F%C5%C1.%96%D1R%00%CC%14%5D%D8%F1%D4%01I&lg=en&lc=GB&token=b652ec63b88c1e7d432bf2661b049a65&mistyped=6&network_radio_type=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=53508&extexist=1&extstate=1
DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net
DEBUG:yowsup.common.http.warequest:Sending GET request

If i had to guess it seems that the changes I made to the env.py file are ignored.

mgp25 commented 7 years ago

And adding to what i previously said. The registration params has been updated (since March/April)

ningrus commented 7 years ago

yowsup-cli v2.0.15 yowsup v2.5.0

Copyright (c) 2012-2016 Tarek Galal http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is encouraged.

If you appreciate this software and you would like to support future development please consider donating: http://openwhatsapp.org/yowsup/donate

/usr/lib/python2.6/site-packages/yowsup2-2.5.0-py2.6.egg/yowsup/demos/sendclient/stack.py:33: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 print("Authentication Error: %s" % e.message) Authentication Error: not-authorized

hhsm95 commented 7 years ago

I have the same problem, I was using the s40 ENV, and I want to switch to Android, but I get the same error: Disconnected, reason: Connection Closed. I checked and the latest WA version is the 2.16.330 until today 01-Nov-16, its in the official web https://www.whatsapp.com/android/, so the MD5 Classes might be different, I would like to know how get that MD5 Classes for my own.

assegaf commented 7 years ago

keep use S40, even Android WA20 being banned for not doing anything, Tested. Android version got to do something with Android library, probably GCM, so using Android Whatsapp is going into a trap. Happy monday

ningrus commented 7 years ago

Let me ask: Why use the configuration of the S40? If you set up another key and another model that's possible?

mgp25 commented 7 years ago

WhatsApp is dropping S40 at the end of the year. Using S40 is not a solution

arjenduinhouwer commented 7 years ago

@mgp25, as described in https://github.com/tgalal/yowsup/issues/1826 switching to Android proves to be a whole new trial. I've still not been able to send messages from the android env.

I'm wondering, does someone at this point have a working system with Android?

mgp25 commented 7 years ago

@arjenduinhouwer the point is that in order to use Android platform you need the new protocol (WA20) to login. I have a working API (since April), not releasing it because of spammers

arjenduinhouwer commented 7 years ago

@mgp25 Ok, so i'm on a dead end? Can't switch to S40 because of the reasons you explained last week. Can't use Android because the correct protocol is not available.

Conclusion: at this point there is no way to get this working?

mgp25 commented 7 years ago

@arjenduinhouwer you can use S40, although it is unstable and soon it will stop working in meantime you can use it

arjenduinhouwer commented 7 years ago

@mgp25, Well I don't think that's something my client would approve. The project will run for a few months, we have a SMS service running. WA was our nice-to-have feature. But if it's too complicated or unstable we will leave it out for now.

Thanks for all the help and I wish you and the others success with further development!

koisose commented 7 years ago

@mgp25 is so coollllll Ma cool website

DevOpJadeja commented 6 years ago

Still facing same problem.

DEBUG:yowsup.env.env:Current env changed to android

DEBUG:yowsup.stacks.yowstack:Initializing stack DEBUG:yowsup.stacks.yowstack:Constructed Network Layer DEBUG:yowsup.stacks.yowstack:Constructed Stanza Regulator Layer DEBUG:yowsup.stacks.yowstack:Constructed Crypt Layer DEBUG:yowsup.stacks.yowstack:Constructed Coder Layer DEBUG:yowsup.stacks.yowstack:Constructed Logger Layer DEBUG:yowsup.stacks.yowstack:Constructed <yowsup.layers.axolotl.layer_control.AxolotlControlLayer object at 0x7f636564a050> DEBUG:yowsup.stacks.yowstack:Constructed Axolotl Layer - <yowsup.layers.axolotl.layer_receive.AxolotlReceivelayer object at 0x7f636562c790> DEBUG:yowsup.stacks.yowstack:Constructed Authentication Layer - Messages Layer - Receipt Layer - Ack Layer - Presence Layer - Ib Layer - Iq Layer - notification Ib Layer - Iq Layer - Chatstate Layer - call Layer - Groups Iq Layer - Media Layer - Privacy Layer - Profiles Layer DEBUG:yowsup.stacks.yowstack:Constructed CLI Interface Layer Yowsup Cli client

Type /help for available commands

DEBUG:yowsup.layers.network.layer:Connecting to e14.whatsapp.net:443 DEBUG:yowsup.layers.logger.layer:tx:

DEBUG:yowsup.layers.logger.layer:tx: DEBUG:yowsup.layers.logger.layer:rx: DEBUG:yowsup.layers.logger.layer:rx: (� jܥ˰nQ��j���([ HEX:0728f0096adca5cbb06e51ffd96a14f8fd9f285b DEBUG:yowsup.layers.logger.layer:tx: ������Y'�n�A`�Z����ӾDԥ���O����D�0j�K��q���ɤz��?}z�7q+�-n&�tⷺ $=2 HEX:bf9287e4efa35927b30e6e06a54160bd5a9a8e81169ad3be44d4a5aeb9fe4f8717f4ff8044dd306aef4beaa171f1e18712c9a47af0e53f7d7a14bc37712b048e2d6e269974e2b7ba0a243d32 DEBUG:yowsup.layers.logger.layer:rx: general: Login Failed, reason: not-authorized DEBUG:yowsup.layers.network.layer:Disconnected, reason: Authentication Failure Auth Error, reason not-authorized