tgalal / yowsup

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

reason:incorrect while registration and then auth error after successful registration #1418

Closed harpreetrekhi closed 8 years ago

harpreetrekhi commented 8 years ago

I had a working yowsup running on raspberry pi until day before yesterday it started giving authentication error. I tried multiple times to register, though I get SMS code but everytime I try to login it says authentication failed.

I tried with a different number which was not registered earlier, again after registration sms, it is unable to authenticate it.

Below are the debug messages I am getting.

pi@jigsaw:~/yowsup $ yowsup-cli demos --yowsup -d --config config 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 Axolotl Layer 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 e15.whatsapp.net:443 DEBUG:yowsup.layers.logger.layer:tx: stream:features

/stream:features

DEBUG:yowsup.layers.logger.layer:tx:

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

DEBUG:yowsup.layers.logger.layer:rx:

▒▒2,̕▒8▒▒▒tkMɊ▒ HEX:139de0322ccc95b43887effa746b4dc98aeb9e0d

DEBUG:yowsup.layers.logger.layer:tx:

v▒▒W▒ \▒8▒▒j▒%▒uA޺_▒▒▒Z'g]▒,O▒▒n,b▒U_▒h HEX:0176e1e9bc570857f2095cc13886e5b66ae125a27541deba2afadad45a27675df92c024ffcc96e2c628a552ad668

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

During registration: First number: pi@jigsaw:~/yowsup-Android_2.12.440 $ python yowsup-cli registration --requestcode sms --phone 91705XXXXXX --cc 91 --mcc 405 --mnc 800 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}

status: sent retry_after: 25205 length: 6 method: sms pi@jigsaw:~/yowsup-Android_2.12.440 $ pi@jigsaw:~/yowsup-Android_2.12.440 $ pi@jigsaw:~/yowsup-Android_2.12.440 $ python yowsup-cli registration --register 271-492 --phone 9170XXXXXX8 --cc 91 INFO:yowsup.common.http.warequest:{"status":"ok","login":"9170XXXXX","type":"existing","pw":"dXXXXXXbw=","expiration":4444444444.0,"kind":"free","price":"\u20b9 55","cost":"55.00","currency":"INR","price_expiration":1461998542}

status: ok kind: free pw: XXXXXXXXXXXXX= price: ₹ 55 price_expiration: 1461998542 currency: INR cost: 55.00 expiration: 4444444444.0 login: 9170XXXXXX type: existing

pi@jigsaw:~/yowsup-Android_2.12.440 $ yowsup-cli demos --yowsup -l 9170XXXXXX8:INiCofXXXXXXXXXdJBw=

Yowsup Cli client

Type /help for available commands

general: Login Failed, reason: not-authorized Auth Error, reason not-authorized

Second number which was not register with whatsapp earlier: pi@jigsaw:~/yowsup-Android_2.12.440 $ python yowsup-cli registration --requestcode sms --phone 919XXXXXXX0 --cc 91 --mcc 404 --mnc 11 INFO:yowsup.common.http.warequest:{"status":"sent","length":6,"method":"sms","retry_after":65,"sms_wait":65,"voice_wait":65}

status: sent retry_after: 65 length: 6 method: sms pi@jigsaw:~/yowsup-Android_2.12.440 $ pi@jigsaw:~/yowsup-Android_2.12.440 $ pi@jigsaw:~/yowsup-Android_2.12.440 $ pi@jigsaw:~/yowsup-Android_2.12.440 $ python yowsup-cli registration --register 643-540 --phone 919XXXXXX90 --cc 91 INFO:yowsup.common.http.warequest:{"status":"ok","login":"91964XXXXX690","type":"new","pw":"AQJ5piR+XXXXXXXU1rQ=","expiration":4444444444.0,"kind":"free","price":"\u20b9 55","cost":"55.00","currency":"INR","price_expiration":1461980016}

status: ok kind: free pw: AQJ5piR+kXXXXXXXOAuU1rQ= price: ₹ 55 price_expiration: 1461980016 currency: INR cost: 55.00 expiration: 4444444444.0 login: 9196XXXXX90 type: new pi@jigsaw:~/yowsup-Android_2.12.440 $

When I am using the First number on smartphone whatsapp app then it is working fine but whenever I try using it on raspberry pi it gives authentication error.

What could be the problem? I reinstalled yowsup from scratch but no help, pls guide to resolve this issue as I have searched a lot on web and could not find a solution

pi@jigsaw:~/yowsup $ yowsup-cli version yowsup-cli v2.0.13 Using yowsup v2.4.48 Tried in android environment as well.

chenwayne commented 8 years ago

same here. I used https://github.com/jlguardi/yowsup.git master branch, which believed to be the most updated one for this lib. registeration is successful, but not able to send message or any thing.

harpreetrekhi commented 8 years ago

Not able to resolve the issue after following multiple solutions given.

Can anyone explain in layman terms what is the solution.

I have installed latest yowsup from master branch still unable to login even though registration is successful.

tgalal commented 8 years ago

Updating to latest version should fix the problem