venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.13k forks source link

Login Failure #931

Open Adelabdelaziz opened 10 years ago

Adelabdelaziz commented 10 years ago

After get PW i am try login but Display this error ?? Fatal error: Uncaught exception 'Exception' with message 'Login Failure' in /home/whatsapp/public_html/Test/src/whatsprot.class.php:1641 Stack trace: #0 /home/whatsapp/public_html/Test/src/whatsprot.class.php(475): WhatsProt->doLogin() #1 /home/whatsapp/public_html/Test/examples/exampleFunctional.php(70): WhatsProt->loginWithPassword('UaJ**...') #2 {main} thrown in /home/whatsapp/public_html/Test/src/whatsprot.class.php on line 1641

Adelabdelaziz commented 10 years ago

When i open bug tx

rx

rx stream:features/stream:features

rx sK-ÐH2¥U¾ÏÃé0 BÈ1

tx ™•^öê¿ýÄÂ勝ð^:3

vikrantchoudhary commented 10 years ago

Even i am experiencing the same.

mgp25 commented 10 years ago

You are blocked or login in with wrong data.

teleavtomatika commented 10 years ago

I experiance same on many valid accounts: all of my accounts are used on different servers and different client are blocked about exactly 4 hours ago. I have received this error from whats app servers:

19:37:34, SENT: stream:features>/stream:features> 19:37:34, SENT: auth passive="false" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" m echanism="WAUTH-2" user="==i removed my number==">/auth> 19:37:35, RECVD: start from="s.whatsapp.net">/start> 19:37:36, RECVD: stream:features>/stream:features 19:37:36, RECVD:challenge>"6K?↓(5??F??"7a♫)? 19:37:37, SENT: response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">?\????Dj+→?\? ?/response>I??8h 19:37:38, RECVD: failure> 19:37:38, RECVD: not-authorized>/not-authorized> 19:37:38, RECVD: /failure>

Any ideas?

mgp25 commented 10 years ago

Instead of multiple comments, edit the first one and update it. Your number is blocked.

teleavtomatika commented 10 years ago

I have 3 unused numbers that can't be blocked (cos i don't use them about 3 month), i tried to connect them and they are failed too. I tried chage ip addr and nothing changes.

mgp25 commented 10 years ago

I know where the problem is. By now you cant access the service. Will update soon (its happening for all of us)

teleavtomatika commented 10 years ago

Oughhh, you really encourage me. :)

mgp25 commented 10 years ago

If you take my latest pull request, will work. You will need to generate a new password or register a new number, but it will work.

Regards.

teleavtomatika commented 10 years ago

Ok. I'll make same chages to my code and test it after few hour's. I reviewd your pull request it's version and token changes only. Thank you for your great work.

teleavtomatika commented 10 years ago

Any body know how to regenerate password for new version knowing password for old version? How original app doing this?

mgp25 commented 10 years ago

If you have identity and number, request code. You will get a new password

teleavtomatika commented 10 years ago

What you mean "identity"? Pin code that sent to me by sms?

teleavtomatika commented 10 years ago

Ok. I have tried to register new number - all is ok. Now i'm trying to generate new passwords for old accounts. Please, tell me what you mean "identity"?

mgp25 commented 10 years ago

Identity its a string like this: %19%40%17%9ed%cdv..... associated to your number when registering the number.

If you set this:

<?php

require_once('../src/whatsprot.class.php');

$debug = true;

$username = '';  // Your number with country code
$identity = '%f6%3c%da%.....'; // Your identity
$nickname = 'WhatsAPI';  // This is the username displayed by WhatsApp clients.

// Create a instance of WhastPort.
$w = new WhatsProt($username, $identity, $nickname, $debug);

$w->codeRequest('sms');

Output will be a new password for your number.

Regards.

teleavtomatika commented 10 years ago

Thank you for your answer. I'll try to do this for my old numbers.

domingopa commented 10 years ago

I'm having the same problem

tx stream:features/stream:features tx ??u?34609177947?=?F???aǴ??9?]%1410012367WhatsApp/2.11.378 Android/4.3 Device/GalaxyS3 MccMnc/214001 rx rx stream:features/stream:features rx 2?)&?:5Pck0?T?l?qa tx $֛?ׂ?8\J,`+?Bt ?C{q?On??(Ž rx rx rx

my number is blocked? not used to span has only responded when receiving a message, and only about 20 times.

Thank you for your help.

mgp25 commented 10 years ago

@domingopa read whole issue, answer is here

teleavtomatika commented 10 years ago

@domingopa obtain new password and work with a new one.

domingopa commented 10 years ago

@teleavtomatika I followed the steps above. using wart tells me blocked. Not to do. Thank you for your help

dennobaby commented 10 years ago

Why i am not affected? My Client works like a charm :) but for caution i have updated the two files with the new strings...

mgp25 commented 10 years ago

@domingopa use latest token, user agent and version from the latest pull request i made or in my website here Once you have the latest data, try generating a new password using identity (thats why you need the latest token). If that doesnt work you will need another number to register and now it will work fine for you.

@dennobaby lets say WhatsApp supports for example 10 versions, when i new one comes out, the oldest become outdated and no longer supported. So if someone is using and unsupported version it will be blocked. Thats what i think at this moment. Anyway seems that now its working fine.

Osmanbakri commented 10 years ago

Hi @mgp25 i have one question and one remark that might require attention, Remark : Latest Whatsapp version from their website while downloading shows build : WhatsApp/2.11.609 for nokia and WhatsApp/2.11.8 for iphone.

Question: I tried your new pull modifications (build .378) registering a new number (WART) But got blocked after sending the first message as the users above, and giving that my client is still working well using the old configuration and version (Also was registered through WART so i don't have ID to request a new password) , what should be the steps i should do now to avoid getting the number blocked?

Thanks & Appreciated,

mgp25 commented 10 years ago

@Osmanbakri im not using nokia or iphone releases. Im using android ones the one showing in Play Store..

Did you updated WART with the latest data? Also you need to update your whatsprot.class when you want to login, changing version and user agent. If you spam or send bulk messages you will get blocked anyway. Im not going to tell how to avoid blocking, the main reason is i dont want people to spam. If people doesnt send spam they dont get blocked. I am using a number from last year and still running, so no.

In the WhatsAPINet repo, check the buildIdentity or generateIdentity function, from there you can make a utility or something.

domingopa commented 10 years ago

@mgp25 What you consider spam? To send a message only to the numbers that we have in your contacts and only after receiving a message from them is considered spam? Thanks for your work

mgp25 commented 10 years ago

@domingopa if you use the latest pull request i made, it should work fine for you. Spam is considered when sending messages to random/semi random users, also is considered spam sending huge amount of messages in a short period of time. You can send 10000 messages to yourself and whatsapp will block you, is not spam but you are abusing the system.

Anyway, with the latest data everything is working fine.

Regards.

domingopa commented 10 years ago

@mgp25 Thank you very much for your answer. Never sending messages randomly, only numbers from which I received a message (straight from the box). The message number was 20 for 1 hour. And the number was updated and the last update. I have 4 other numbers working ok with enterior version without problems. greetings

gmbrier commented 10 years ago

I have the same problem but only when I use the linux server, on windows server it doesn't happens. Why ?

mgp25 commented 10 years ago

Thats shouldn`t be a problem, make sure you have the same source in both server, it should work the same.

jmoral commented 10 years ago

With latest pull requests from mpg25, I request a new code with $w->codeRequest('sms') and get [status] => fail [reason] => blocked

I suppose the reason why my number is blocked is the whatsapp version update. Since all my users have already register that number, is it possible to unblock the number?

mgp25 commented 10 years ago

Blocks are usually temporal, maybe hours, days, weeks, or months. So you can try requesting Code with your identity and if it retrieve a password then is unblocked. Unfortunately you will have to wait. You can try with other numbers (not blocked) will work fine.

gmbrier commented 10 years ago

It's the same source but the linux server is on EUA, and windows is on BRASIL. it can be a problem ?

mgp25 commented 10 years ago

In theory shouldnt be any problem, maybe the "no_routes" problem, fix is coming soon. Try to register other numbers as the one you try is already blocked.

Osmanbakri commented 10 years ago

Hi @mgp25 , Android version in whatsapp website is : Version 2.11.380 what will happen if we updated the code and version with the latest pull , but didn't re-register the number . will it work fine?

hgc2002 commented 10 years ago

blocked is blocked. you have to email wa and explain them you are using this API. hope you luck!

mgp25 commented 10 years ago

Its because it was already blocked, try with new numbers using latest token. Yes, blocks are temporal

mgp25 commented 10 years ago

Maybe your number was already blocked. With latest is working fine. Block is temporal

Osmanbakri commented 10 years ago

my number is not blocked , the version is updated in the store, from reading the issues i can see others getting blocked after updating the version. my concerns are below:

1) what will happen if i didn't update the version and kept sending? 2) if update is required , changing to recent pull modifications, is re-registering required?

Gitstepn commented 10 years ago

@mgp25 Today I am not getting the codes when registering, using the 2.11.378 token & useragent version in whatsapi

mgp25 commented 10 years ago

@Osmanbakri people were blocked because of the spam and outdated versions. Also ip are been blocked

@Gitstepn thats because of the token generation and the way api do it. I have a fix. Ill do some request via skype i can send code request without problems. Not sharing the method because of many spammers in this repo. If you need to register a number i can send you a code request for you (sms or voice) both works. You can contact with me via mail

Davit21 commented 9 years ago

Hi guys, I am using whatsapp app oficial
I used it one week everything was going good but today when i try to log in it is only connected but the login failur please explain the raeson and how can i solve this problem

mgp25 commented 9 years ago

@Davit21 ask it in WhatsAPI Official

Regards

mgp25 commented 9 years ago

@Davit21 and remember to post debug log

Davit21 commented 9 years ago

I WROTE TO YOU https://github.com/mgp25/WhatsAPI-Official/issues/398