tgalal / yowsup

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

"Not-authorized" error on login #652

Closed jlguardi closed 9 years ago

jlguardi commented 9 years ago

Since this morning, all my numbers report an error during Login. No change in credentials or code was performed.

I attach the log detail. This log was gotten with yowsup-cli of master branch download some minutes ago:

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

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

DEBUG:yowsup.layers.logger.layer:rx:
<challenge>
BINARY
HEX:HEX
</challenge>

DEBUG:yowsup.layers.logger.layer:tx:
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
BINARY
HEX:HEX
</response>

DEBUG:yowsup.layers.logger.layer:rx:
<failure>
<not-authorized>
</not-authorized>
</failure>

general: Login Failed, reason: not-authorized
DEBUG:yowsup.layers.network.layer:Disconnected, reason: Authentication Failure
Auth Error, reason not-authorized

Has someone any solution or suggestion?

ghost commented 9 years ago

It looks like your numbers are blocked. Use existsrequest.py to see the reason why you cannot login.

jlguardi commented 9 years ago

No, the number is not blocked. I've tried in an official whatsapp and works.

While the register with yowsup I get:

 status:' ok '
kind:' free '
pw:' xxxxxxxxxxxxxxxxxxxx= '
price:' 0,89 $'\342\202\254' '
price_expiration:' 142746xxxx '
currency:' EUR '
cost:' 0.89 '
expiration:' 144148xxxx '
login:' 34xxxxxxx '
type:' existing '
blackjack4494 commented 9 years ago

EDIT: So now I am getting the same problems. But only when I am using SendClient while the yowsup-cli demo is not affected. I guess WA rolled out an intern update. Maybe they block auth tries when they are not in line with 'special conditions'.

jroman commented 9 years ago

SOLVED: by re-registering and changing the password in the config file with the one received as a response to the second step of registration.

Still with the same problem here using the yowsup-cli demo.

Anything related to the options in the config file?

Cheers.

blackjack4494 commented 9 years ago

Here is a little Update from what I noticed. SendClient is working again (without doing anything - that confirmed my theory) But right now I am having two sample_apps. One of them is working correctly the second one is still getting auth errors. I guess I messed something up in the code though it worked before.

ghost commented 9 years ago

@jlguardi Did you manage to register your number again? And is it visible to other users in the official WhatsApp client?

jlguardi commented 9 years ago

I've got 2 numbers with this issue. Both were working until I've restarted my applications. So WA didn't close the connection. After this restart, both return 'not-authorized'. One of them keeps in this status. However, the other is working after a reregistration with yowsup and no more errors have been detected. Both are visible from official WA. @blackjack4494 I get this error with my app and also with yowsup-cli, echo-client or send-client

ghost commented 9 years ago

@jlguardi How long ago did you register these two numbers?

jlguardi commented 9 years ago

No working one on april'14. The other one on sept'14.

blackjack4494 commented 9 years ago

It actually does not matter when you registered your numbers as long as you pay after the first free year.

@jlguardi hmm. Did you restart your server/sytem where it is running on? I can try to give you a little sample app where you have to edit just the number and password. I can post it later (in like 6hours?) What happens when you use :yowsup-cli demos -c config -y :/L ??

jlguardi commented 9 years ago

No, my server is workin for 5 months without restart. All reports are get with "yowsup-cli demos -y".

I'll try your app. Thx

rodrigofaillace commented 9 years ago

I had some SIM Cards blocked today... All of them were using the same App. Some (3 of 10) got banned....

I was not sending SPAM. I´ve used in a Passive way (providing automated answers, when asked), like a FAQ.

Tried re-register, but failed.

Tried with Whatsapp Official Client, but it is said that the number is unauthorized to use Whatsapp.

Any of you with the same problem?

ssafronov commented 9 years ago

I've got the same problem in centos. When I try to login i get next:

Yowsup Cli client

Type /help for available commands

Traceback (most recent call last): File "/usr/bin/yowsup-cli", line 5, in pkg_resources.run_script('yowsup2==2.2.78', 'yowsup-cli') File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 461, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1194, in run_script execfile(script_filename, namespace, namespace) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/EGG-INFO/scripts/yowsup-cli", line 304, in if not parser.process(): File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/EGG-INFO/scripts/yowsup-cli", line 223, in process self.startCmdline() File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/EGG-INFO/scripts/yowsup-cli", line 249, in startCmdline stack.start() File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/demos/cli/stack.py", line 28, in start self.stack.loop(timeout = 0.5, discrete = 0.5) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/stacks/yowstack.py", line 162, in loop asyncore.loop(_args, *_kwargs) File "/usr/lib64/python2.6/asyncore.py", line 210, in loop poll_fun(timeout, map) File "/usr/lib64/python2.6/asyncore.py", line 151, in poll read(obj) File "/usr/lib64/python2.6/asyncore.py", line 82, in read obj.handle_error() File "/usr/lib64/python2.6/asyncore.py", line 78, in read obj.handle_read_event() File "/usr/lib64/python2.6/asyncore.py", line 425, in handle_read_event self.handle_connect_event() File "/usr/lib64/python2.6/asyncore.py", line 431, in handle_connect_event self.handle_connect() File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/network/layer.py", line 34, in handle_connect self.emitEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECTED)) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/init.py", line 68, in emitEvent self.upper.emitEvent(yowLayerEvent) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/__init.py", line 68, in emitEvent self.upper.emitEvent(yowLayerEvent) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/__init.py", line 62, in emitEvent if self.upper and not self.upper.onEvent(yowLayerEvent): File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/coder/layer.py", line 26, in onEvent self.write(streamStartBytes.pop(0)) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/coder/layer.py", line 41, in write self.toLower(bytearray([i])) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/init.py", line 59, in toLower self.lower.send(data) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/auth/layer_crypt.py", line 46, in send self.toLower(bytearray(data)) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/__init.py", line 59, in toLower self.lower.send(data) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/stanzaregulator/layer.py", line 23, in send self.toLower(data) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/__init.py", line 59, in toLower self.__lower.send(data) File "/usr/lib/python2.6/site-packages/yowsup2-2.2.78-py2.6.egg/yowsup/layers/network/layer.py", line 52, in send self.initiate_send() File "/usr/lib64/python2.6/asyncore.py", line 516, in initiate_send num_sent = dispatcher.send(self, self.out_buffer[:512]) File "/usr/lib64/python2.6/asyncore.py", line 360, in send result = self.socket.send(data) socket.error: [Errno 32] Broken pipe

pcandrews commented 9 years ago

@jlguardi did you solved the problem? I'm having the same issue.

jlguardi commented 9 years ago

@pcandrews In fact I needed to reregister 3 lines of 10. These lines are the older ones registered between april'14 and Aug'14. No more incidentes by the moment.

jlguardi commented 9 years ago

@ssafronov it seems not to ne the same. Your issue seems a communication problem not an authorization one.

khru commented 9 years ago

I have the same issue

luckydonald commented 9 years ago

Re-registration did not solve the issue for me, While the cli-demo does work (yowsup-cli demos -y -l NUMBER:PASSWORDHASH=), my run.py program does not (following the sample app tutorial).
Did I missed some other solution than registrating them again? Is there a Layer which I missed?

.

For refence, my stacktrace, which is long and ugly, sorry:

DEBUG:yowsup.layers.network.layer:Disconnected, reason: Authentication Failure
Traceback (most recent call last):
  File "run.py", line 54, in <module>
    stack.loop() #this is the program mainloop
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/stacks/yowstack.py", line 174, in loop
  File "/opt/python3.4/lib/python3.4/asyncore.py", line 208, in loop
    poll_fun(timeout, map)
  File "/opt/python3.4/lib/python3.4/asyncore.py", line 153, in poll
    read(obj)
  File "/opt/python3.4/lib/python3.4/asyncore.py", line 87, in read
    obj.handle_error()
  File "/opt/python3.4/lib/python3.4/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/opt/python3.4/lib/python3.4/asyncore.py", line 442, in handle_read_event
    self.handle_read()
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/network/layer.py", line 48, in handle_read
    ###################
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/network/layer.py", line 55, in receive
    def __init__(self):
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    if tg_peer in tg_wa:
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    ###################
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/coder/layer.py", line 35, in receive
    if wa_peer in wa_tg:
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 55, in toUpper
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 160, in receive
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/__init__.py", line 101, in receive
  File "/home/luckydonald/wa-tg-bridge/virtualenv_3.4.3/lib/python3.4/site-packages/yowsup2-2.2.78-py3.4.egg/yowsup/layers/auth/layer_authentication.py", line 65, in handleFailure
yowsup.layers.auth.autherror.AuthError: not-authorized
luckydonald commented 9 years ago

Well, as always, updating to the newest source code version can fix stuff. See #754 and fix 6345f77. The old password might still work.

rodneyra commented 9 years ago

I´m having the same problem as rodrigofaillace. I have a number that was blocked by WhatsApp.

Error message: "Authentication Error: not-authorized"

yowsup2 upgrade does not solve the problem.

Any solution?

luckydonald commented 9 years ago

did you also ran the setup again?

rodneyra commented 9 years ago

Yes. It was working and has stopped with this error message. I´ve already tried the yowsup2 upgrade without success.

Thanks.

On Tue, Jul 28, 2015 at 11:32 PM, Luckydonald notifications@github.com wrote:

did you also ran the setup?

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

Atenciosamente, Rodney A. Ramos

marcustulyo commented 9 years ago

I had the same problem and received this message: general: Login Failed, reason: not-authorized Auth Error, reason not-authorized

nheijmans commented 8 years ago

Getting the same issue. When running the demos cli I can send/receive messages but with a run.py or layer.py the error is yowsup.layers.auth.autherror.AuthError: not-authorized. Running latest version of yowsup

niastakevin commented 7 years ago

anybody can help me with this?

Parsing config: config.yaml

Traceback (most recent call last): File "C:\Users\Yuana\Desktop\whatsapp-email-bridge-master\WhatsAppEmailForwarder.py", line 617, in config = loadConfig(args.config) File "C:\Users\Yuana\Desktop\whatsapp-email-bridge-master\WhatsAppEmailForwarder.py", line 578, in loadConfig config = yaml.load(cfg) File "C:\Python27\lib\site-packages\yaml__init__.py", line 71, in load return loader.get_single_data() File "C:\Python27\lib\site-packages\yaml\constructor.py", line 37, in get_single_data node = self.get_single_node() File "C:\Python27\lib\site-packages\yaml\composer.py", line 36, in get_single_node document = self.compose_document() File "C:\Python27\lib\site-packages\yaml\composer.py", line 55, in compose_document node = self.compose_node(None, None) File "C:\Python27\lib\site-packages\yaml\composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "C:\Python27\lib\site-packages\yaml\composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "C:\Python27\lib\site-packages\yaml\composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "C:\Python27\lib\site-packages\yaml\composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "C:\Python27\lib\site-packages\yaml\parser.py", line 98, in check_event self.current_event = self.state() File "C:\Python27\lib\site-packages\yaml\parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "C:\Python27\lib\site-packages\yaml\scanner.py", line 116, in check_token self.fetch_more_tokens() File "C:\Python27\lib\site-packages\yaml\scanner.py", line 220, in fetch_more_tokens return self.fetch_value() File "C:\Python27\lib\site-packages\yaml\scanner.py", line 576, in fetch_value self.get_mark()) ScannerError: mapping values are not allowed here in "config.yaml", line 11, column 40