tgalal / yowsup

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

Auth fails mysteriously #164

Closed ghost closed 9 years ago

ghost commented 11 years ago

here is my debug content:

me@me-MacBook:~/Downloads/yowsup-master/src$ python yowsup-cli -c '/home/me/Downloads/yowsup-master/src/config.example' -d -l Detected cc: 49 YowsupConnectionManager: >>>>>>>> AUTH CALLED BinTreeNodeReader: Reader init YowsupAuth: Connecting to c2.whatsapp.net WAuth: Yowsup WAUTH-1 INIT WAuth: Starting stream WAuth: Sending Features BinTreeNodeWriter: Outgoing BinTreeNodeWriter:
stream:features

/w:profile:picture /w:profile:picture /stream:features WAuth: Sending Auth BinTreeNodeWriter: Outgoing BinTreeNodeWriter: WAuth: Read stream start WAuth: Read features and challenge BinTreeNodeReader: Incoming BinTreeNodeReader: stream:features /w:profile:picture /stream:features WAuth: GOT FEATURES !!!! BinTreeNodeReader: Incoming BinTreeNodeReader: 7�~�a�p�o���}�, WAuth: GOT CHALLENGE !!!! WAuth: Sending Response BinTreeNodeWriter: Outgoing BinTreeNodeWriter: 4��fT9e�h��3Jr�����7����T�_X�a�A�7��a0; 8 WAuth: Read success BinTreeNodeReader: Incoming BinTreeNodeReader: WAuth: Login Status: failure YowsupAuth: Authentication failed!! Auth Failed! I have absolutely no clue what happened. My config looks like this: cc=49 #if not specified it will be autodetected phone=49**************** id= password=OUZnHgwJTip+RVxam2DPMHt5plE= the "=" at the end could be a problem, though
jonnywilliamson commented 11 years ago

Most (if not all?) passwords end with a =

CODeRUS commented 11 years ago

are you sure you have right password?

ghost commented 11 years ago

Yes, But I registred via WART. The password was directly copy/pasted

tgalal commented 11 years ago

@Atsch auth could fail if WART's user agent doesn't match resource used at login with yowsup. I've seen this happen before. Anyway, yowsup registration works again, can you give it a try and see if login works ?

ghost commented 11 years ago

oh, Ill try it thanks

mrtass commented 10 years ago

Hello, why when authentication failed! python doesn't return to the command prompt ? I am trying to use yowsup in my monitoring system where in case of any alerts to send the a broadcast to several IT support guys, however yesterday i got the sending number blocked and the monitoring system kept launching the yowsup-cli script and ended up with lots of open processes and that caused memory low on the system.

is there anyway to let yowsup return to the command and end the process if auth failed! was received ?

Nothing4You commented 10 years ago

Hi, I'm having the same issue. I requested the code via CODeRUS as it didn't want to send me a message with a normal call. When trying to register I realized that I missed a digit in my phone number. I fixed that and finished the registration via yowsup.

I also checked that the account was successfully created with the -e option and it is. The IMEI is taken from a phone I own.

$ cat .config/yowsup/config

cc=49
phone=00157885XXXXX
id=3568170258XXXXX
password=A40b8QG3Z4x5Ev5/DyKwVSXXXXX=

$ yowsup-cli -c .config/yowsup/config -d -k -l

YowsupConnectionManager:    >>>>>>>>                         AUTH CALLED
BinTreeNodeReader:  Reader init
YowsupAuth: Connecting to c2.whatsapp.net
WAuth:  Yowsup WAUTH-1 INIT
WAuth:  Starting stream
WAuth:  Sending Features
BinTreeNodeWriter:  Outgoing
BinTreeNodeWriter:  
 <stream:features>
<receipt_acks>
</receipt_acks>
<w:profile:picture type="all">
</w:profile:picture>
<w:profile:picture type="group">
</w:profile:picture>
<notification type="participant">
</notification>
<status>
</status>
</stream:features>

WAuth:  Sending Auth
BinTreeNodeWriter:  Outgoing
BinTreeNodeWriter:  
 <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-1" user="00157885XXXXX">
</auth>

WAuth:  Read stream start
WAuth:  Read features and challenge
BinTreeNodeReader:  Incoming
BinTreeNodeReader:  
<stream:features>
<receipt_acks>
</receipt_acks>
<w:profile:picture type="all">
</w:profile:picture>
</stream:features>

WAuth:  GOT FEATURES !!!!
BinTreeNodeReader:  Incoming
BinTreeNodeReader:  
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
TCw¾$ÝåB€‡ãbôÙO„ª!R</challenge>

WAuth:  GOT CHALLENGE !!!!
WAuth:  Sending Response
BinTreeNodeWriter:  Outgoing
BinTreeNodeWriter:  
 <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
t2„Õ$½ê•  ärŸ¬%§m(˜Â?ZòŸµôͽ$ñ†Q8ñ=6‰)ºAtr</response>

WAuth:  Read success
BinTreeNodeReader:  Incoming
BinTreeNodeReader:  
<failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<not-authorized>
</not-authorized>
</failure>

WAuth:  Login Status: failure
YowsupAuth: Authentication failed!!
Auth Failed!

I tried this several times including a couple different options like trying to message someone and also reset the password a few times (-e) but it always shows the same error.

CODeRUS commented 10 years ago

your zeroes at the phone beginnings seems wrong

Nothing4You commented 10 years ago

According to https://github.com/tgalal/yowsup/wiki/yowsup-cli#wiki-config the number should be this way:

phone=00123456789  #replace with your phone number with two extra leading 00 (zeros). Your number is supposed to be 123456789 really

Also, I got this working with whatsapp-purple with login and communicating. As the registration succeeded I believe that the format is correct in the config.

CODeRUS commented 10 years ago

you developer or not? you cant understand simple error and read debug logs? why you need to use yowsup?

Nothing4You commented 10 years ago

I'm sorry to have tried to report an issue, I won't do it again.