tgalal / yowsup

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

Unable to do registration #1335

Closed gauravdave01 closed 8 years ago

gauravdave01 commented 8 years ago

My yowsup version:

yowsup-cli v2.0.13 Using yowsup v2.4.48

While trying registration, gives status: fail & reason: old_version

Here, is my command and stack trace (while doing --debug):

python yowsup-cli registration --config mydetails --requestcode sms --debug DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.13.21 S40Version/14.26 Device/Nokia302'} DEBUG:yowsup.common.http.warequest:cc=91&in=XXXXXXXXXX&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&method=sms&token=a93834b0cf1b70077b89118833dc6e0a&id=%0C%3A%14%D3%DB%B4v%18r%E9%FEaW%5Bb%0D%C7%2B%AD%2F DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=91&in=XXXXXXXXXX&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&method=sms&token=a93834b0cf1b70077b89118833dc6e0a&id=%0C%3A%14%D3%DB%B4v%18r%E9%FEaW%5Bb%0D%C7%2B%AD%2F INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail reason: old_version

I have read older post, but they somehow didn't solved my problem, as I'm already using latest code.

PS: WhatsApp has released a newer version, few days back, is it because of that registration is not working?

cyberp1983 commented 8 years ago

the same problem

jlguardi commented 8 years ago

Probably related with symbian is not supported anymore.

Try to use android env or wart (chat-api)

lkeijser commented 8 years ago

Using Fedora here with latest yowsup (a59ac410c057e8042c528e9f73e9f3eaada6e79e) Got the same issue.

Update: tried the android environment (is there an easy way to switch? I now end up modifying source code to import AndroidYowsupEnv instead of S40YowsupEnv) but with the same result.

Then I tried changing the VERSION number from 2.12.357 to 2.12.503 (as advertised by whatsapp.com/android, but now I get reason: bad_token

Anyone with more ideas?

alfafc commented 8 years ago

Same here

@jlguardi Please, could you tell me how to change to android env?

gauravdave01 commented 8 years ago

@Alfafc even if the environment is changed to Android, the problem still persist. I think WhatsApp has changed there API routes and params as per the new version, but couldn't find any information regarding that.

jlguardi commented 8 years ago

As I said, android env doesn't work. We need to port chatApi registration procedure here.

koem commented 8 years ago

same here: old_version

jlguardi commented 8 years ago

I've adapted env file but I've never made before. Sms code is sent but I haven't tested the rest of the registering process. Please, feedback if someone can test it.

kiv1n commented 8 years ago

@jlguardi thanks, it really helps for registration new phone.

drmaposa commented 8 years ago

Hi guys, I have the same problem

im getting this error

$ python yowsup-cli registration --requestcode sms --phone 263732128622 --cc 263 --mcc 648 --mnc 03 INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"} I tried to update the env with the master but the problem still persists Any help will be greatly appreciated.

jlguardi commented 8 years ago

@drmaposa #1336 fixed this issue. Try it.

drmaposa commented 8 years ago

Thanks @jlguardi for sharing, but I can't get the latest env to replace the current one

I used the method below to install

git clone git://github.com/tgalal/yowsup.git

cd yowsup

sudo python setup.py install

so I then tried to replace the env directory manually using the files from the master, sorry im a newbie

maybe If I can get a betterway to do that. Thank you again for the effort.

drmaposa commented 8 years ago

WOW Thank you @jlguardi It works perfectly :)

lkeijser commented 8 years ago

@ jlguardi works perfectly, thanks!

drmaposa commented 8 years ago

now getting Authentication Error: not-authorized But was working fine. this happen when i tried to re-log in after 3 hrs of inactivity

mhagnumdw commented 8 years ago

@drmaposa

Same problem: Authentication Error: not-authorized

jlguardi commented 8 years ago

@drmaposa @mhagnumdw have you been blocked? Did you have any kind of activity (spam, messages, contacts sync)? Have you stored debug log of the execution previous to the error?

mhagnumdw commented 8 years ago

@jlguardi

I just test and it worked! In my case, recently, phone numbers here added another digit, staying with 9 digits. I was trying to login with the number, XX YY K (K is the 9th digit) TTTTUUUU, and failed. Removed the 9th digit, XX YY TTTTUUUU, I could login successfully, send and receive messages. Note: I made the registration step with the 9th digit to receive the code via sms.

Thanks and great job!

najkirdneh commented 8 years ago

@jlguardi

Thx for the solution!

proza19 commented 8 years ago

Newbie request for assistence on Yowsup Registration failed,

pi@raspberrypi ~/yowsup $ python yowsup-cli registration --requestcode sms --phone 316xxxxxxxx --cc 31 --mcc 204 --mnc 08
INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail
reason: old_version
najkirdneh commented 8 years ago

@proza19

Check the changes that jlguardi made:

https://github.com/tgalal/yowsup/pull/1336/files

proza19 commented 8 years ago

Thanks for the first step @najkirdneh, made al given changes with the next result

pi@raspberrypi ~/yowsup $ yowsup-cli demos --yowsup --config config

Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 4, in <module>
    import pkg_resources
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pillow
drmaposa commented 8 years ago

@jlguardi

I was sending messages to my number only. So I decided to register another number This is what im now getting with a new number after a successful registration

Yowsup Cli client
==================
Type /help for available commands

[offline]:/L
general: Login Failed, reason: not-authorized
Auth Error, reason not-authorized

Is anyone still sending the messages with Yowsup? Wanted to figure out if *my client * has been banned

Where am I going wrong, tried with a new number but keep on saying

Authentication Error: not-authorized

najkirdneh commented 8 years ago

@proza19

Check the comments of the following tutorial:

http://www.instructables.com/id/WhatsApp-on-Raspberry-Pi/step3/Utilization/

Some solved the problem by:

sudo apt-get install python-pip + sudo pip install Pillow

proza19 commented 8 years ago

@najkirdne Already followed all those steps on instructables. And your suggestion of above didn't fix the probleem.

proza19 commented 8 years ago

@najkirdneh : Yes it's working now after,

sudo pip install python-axolotl sudo apt-get install python-pipsh

najkirdneh commented 8 years ago

Nice!

chenwayne commented 8 years ago

same here, failed due to old version

eladgav commented 8 years ago

@jlguardi

i've taken the changes from #1336 but i get failures during the request for SMS

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"incorrect","sms_length":6,"voice_length":6,"sms_wait":0,"voice_wait":0}

any idea?

ToninoTarsi commented 8 years ago

Same problem but reading the thread I can not understand the jlguardi solution. Could someone post the steps to solve it ? Thanks

jlguardi commented 8 years ago

@ToninoTarsi The esasiest way is download my fork:

  1. Go to https://github.com/jlguardi/yowsup/tree/Android_2.12.440
  2. Download this code (press Download Zip)

If you are using git:Android_2.12.440

  1. setup my fork in remotes sources
git remote add jlguardi https://github.com/jlguardi/yowsup.git
  1. update it
git pull jlguardi Android_2.12.440
  1. Then merge jlguardi/Android_2.12.440
git merge jlguardi/Android_2.12.440
jlguardi commented 8 years ago

@eladgav I've tried it and worked:

./yowsup-cli registration -r voice -p 346xxxxxxx -C 34
INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"voice","retry_after":64,"sms_wait":64,"voice_wait":64}

status: sent
retry_after: 64
length: 6
method: voice

Try again using debug (-d) and post the full log.

chenwayne commented 8 years ago

THANKS! it works like a charm!

ToninoTarsi commented 8 years ago

Thanks @ jlguardi

Worked perfectly on raspberry PI with

wget https://github.com/jlguardi/yowsup/archive/Android_2.12.440.zip unzip Android_2.12.440.zip cd yowsup-Android_2.12.440 sudo python setup.py install

Regards

eladgav commented 8 years ago

thanks @jlguardi

it's was an issue cause i didn't deleted the device ID which was created for the NOKIA device and just updates to your version, so i got an error for the device ID trying to register with android device. after deletion, a new device ID was created and the registration went fine.

thanks again!!

eugenebann commented 8 years ago

THIS! Thanks a lot @jlguardi!

stevie86 commented 8 years ago

just download zip + extract!

Tonino Tarsi notifications@github.com schrieb am Di., 8. März 2016 21:18:

Same problem but reading the thread I can not understand the jlguardi solution. Could someone post the steps to solve it ? Thanks

— Reply to this email directly or view it on GitHub https://github.com/tgalal/yowsup/issues/1335#issuecomment-193951008.

gauravdave01 commented 8 years ago

I have downloaded the source from Yowsup Android Fork, and did setup by doing: sudo python setup.py install

After then, did registration. For registration you have to send 4 parameters (mandatory), and they are:

phone cc mcc mnc

For registration write:

python yowsup-cli registration --config mydetails --requestcode sms

I got the SMS (containing code XXX-XXX) on number which I've provided as phone param, after doing that added that code in:

python yowsup-cli registration --register xxx-xxx --phone 91xxxxxxxxxx --cc 91

Once, that was done I got response like:

status: ok kind: free pw: xxxxxxxxxxxxxxxxxx= ...

Use pw [password], to login as offline mode, after that use \L to login and for command(s) list use \help.

I used \message and \image to send simple text message and an image.

Worked perfectly!

P.S. This test were done on the same day, so I'll again check if the password which was generated during register is still working as per the expiration time allotted to that or not.

M4STERANGEL commented 8 years ago

M4STER_ANGEL@vps251263:~/yowsup$ ./yowsup-cli registration -r voice -p 16304894220 -C 1 -d DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.13.21 S40Version/14.26 Device/Nokia302'} DEBUG:yowsup.common.http.warequest:cc=1&in=6304894220&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&method=voice&token=c6ad6c7049bab01e8750bc8e3576ddb1&id=r%99%F54%AB%90%D6%CB%25%97%F8%B9%03%ECG%AF%9Bp%F9y DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=1&in=6304894220&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&method=voice&token=c6ad6c7049bab01e8750bc8e3576ddb1&id=r%99%F54%AB%90%D6%CB%25%97%F8%B9%03%ECG%AF%9Bp%F9y INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail reason: old_version M4STER_ANGEL@vps251263:~/yowsup$

I cant solve the problem

jlguardi commented 8 years ago

@M4STERANGEL you are still using master instead of #1336. Read all comments on this PR.

mgp25 commented 8 years ago

Dont event help @M4STERANGEL he is a spammer

M4STERANGEL commented 8 years ago

@mgp25 i'm not a spammer i'm admin of the biggest antispam channel in telegram: @AntiSpammers_Es or @AntiSpammers_En i'm the founder of AST Team (AntiSpammers Telegram)

M4STERANGEL commented 8 years ago

How to solve this problem?


INFO:yowsup.common.http.warequest:{"status":"fail","reason":"no_routes","retry_after":3600,"sms_wait":3600,"voice_wait":3600}

status: fail
retry_after: 3600
reason: no_routes
johntheknife commented 8 years ago

Ok, so I installed @jlguardi 's version and the registration flow went well. I got

status: ok
kind: free
pw: <pw>
price: 0,89 €
price_expiration: ..
currency: EUR
cost: ...
expiration: 4444444444.0
login: <phonenumber>
type: existing

However, when I do python yowsup-cli demos -l<phonenumber>:<pw> -e I get the message

Auth Error, reason not-authorized

jlguardi commented 8 years ago

@johntheknife Read #1384

relima commented 8 years ago

@M4STERANGEL if you are running it on a server farm somewhere (such as digitalocean or aws), their ip range is likely blocked. you will have to do it locally.

relima commented 8 years ago

@johntheknife I am having the exact same problem.

M4STERANGEL commented 8 years ago

@relima I'm using OVH, so, if i try with CLoud9, will it work?

carlosfelipe29 commented 8 years ago

Hi, Guys, Who knows about it?, maybe Whatsapp is blocking a third person applications ? @tgalal @gauravdave01 .

I got the same problem, with two systems(two SIM CARDS) that I have running on a two BeagleBone Black. Today Suddenly stop send mgs:

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

status: fail reason: old_version

It happens again and again.

note: One system was turn on, and the other one was turn off (I turn it on to try, and I got the same thing).

Someone have any idea??

thanks fro the support.

c-r-a-z-y commented 8 years ago

Similar Problem here:

cubietruck:/opt/yowsup-master# yowsup-cli registration -r voice -p 4963016171815 -C 49 -d DEBUG:yowsup.common.http.warequest:{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.12.440 Android/4.3 Device/GalaxyS3'} DEBUG:yowsup.common.http.warequest:cc=49&in=63016171815&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&mcc=000&mnc=000&method=voice&mistyped=6&network_radiotype=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=9172&rchash=3b628d32c474912e06d3fcfe8a7f59ea9fcd21750210d23a8d8f45888aca3ce0&anhash=%04%08%23%A1kSlI%10Wp%8Ap%C0%17%9D%A2%B0%16N&extexist=1&extstate=1&token=xGXoCeLn%2FH3ABzpQQMFr4owTn6Q%3D&id=%FC%12u%A4%2A%BB0%DEo%F9%12%EE%FD%83%E6%E4%A9%FC%A2 DEBUG:yowsup.common.http.warequest:Opening connection to v.whatsapp.net DEBUG:yowsup.common.http.warequest:Sending GET request to /v2/code?cc=49&in=63016171815&lc=GB&lg=en&sim_mcc=000&sim_mnc=000&mcc=000&mnc=000&method=voice&mistyped=6&network_radiotype=1&simnum=1&s=&copiedrc=1&hasinrc=1&rcmatch=1&pid=9172&rchash=3b628d32c474912e06d3fcfe8a7f59ea9fcd21750210d23a8d8f45888aca3ce0&anhash=%04%08%23%A1kSlI%10Wp%8Ap%C0%17%9D%A2%B0%16N&extexist=1&extstate=1&token=xGXoCeLn%2FH3ABzpQQMFr4owTn6Q%3D&id=%FC%12u%A4%2A%BB0%DEo%F9%12%EE%FD%83%E6%E4%A9%FC%A2 INFO:yowsup.common.http.warequest:{"status":"fail","reason":"no_routes","retry_after":3600,"sms_wait":3600,"voice_wait":3600}

status: fail retry_after: 3600 reason: no_routes root@cubietruck:/opt/yowsup-master#