whatsapp-bot-seed icon indicating copy to clipboard operation
whatsapp-bot-seed copied to clipboard

AuthError: not-authorized

Open x23piracy opened this issue 8 years ago • 16 comments

Hi,

yesterday i had to restart my server and now every bot instance is throwing:

AuthError: not-authorized

Then i tried to reregister one of the number with an android device and extracted the new psw, added it to one of the bots and tried to start again but i always receive:

AuthError: not-authorized

server.py [ERROR][2016-03-23 09:19:49,538] Authentication Error: not-authorized Traceback (most recent call last): File "./server.py", line 38, in start self.stack.loop(timeout=0.5, discrete=0.5) File "/usr/local/lib/python2.7/dist-packages/yowsup/stacks/yowstack.py", line 187, in loop asyncore.loop(_args, *_kwargs) File "/usr/lib/python2.7/asyncore.py", line 216, in loop poll_fun(timeout, map) File "/usr/lib/python2.7/asyncore.py", line 156, in poll read(obj) File "/usr/lib/python2.7/asyncore.py", line 87, in read obj.handle_error() File "/usr/lib/python2.7/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event self.handle_read() File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 86, in handle_read self.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 94, in receive self.toUpper(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 28, in receive self.processReceived() File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived self.toUpper(oneMessageData) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_crypt.py", line 63, in receive self.toUpper(payload) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/coder/layer.py", line 35, in receive self.toUpper(node) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/logger/layer.py", line 14, in receive self.toUpper(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 127, in receive self.toUpper(protocolTreeNode) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 59, in toUpper self.upper.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init.py", line 169, in receive s.receive(data) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 105, in receive recv(node) File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_authentication.py", line 77, in handleFailure raise AuthError(nodeEntity.getReason()) AuthError: not-authorized server.py [INFO][2016-03-23 09:19:49,539] Restarting..

Has something changed need to update something?

Help please

x23piracy avatar Mar 23 '16 08:03 x23piracy

Hi,

i update also to the lastest yowsup2 version, same issue.

Regards X23

x23piracy avatar Mar 23 '16 08:03 x23piracy

https://github.com/tgalal/yowsup/issues/1387

Maybe we need to change permanently to Android env? May this help i actually have Symbian. When i rereg i use android phone and pw.apk so it was not needed for me to change from s40 to android env, maybe since yesterday we need to change to android perm?

Regards X23

x23piracy avatar Mar 23 '16 08:03 x23piracy

I'm also getting the same error.

abinash111 avatar Mar 23 '16 14:03 abinash111

I will try

K4CZP3R avatar Mar 23 '16 16:03 K4CZP3R

Same error

K4CZP3R avatar Mar 23 '16 16:03 K4CZP3R

And it is problem with yowsup and not this bot (https://github.com/tgalal/yowsup/issues/1395)

K4CZP3R avatar Mar 23 '16 16:03 K4CZP3R

For me, these changes have got it working :+1:

https://github.com/tgalal/yowsup/pull/1385/commits/0348511d02ff1addc208a5468a9a32fe48b89430

Edit:

No, was working for a while but I'm getting error messages such as

File "/home/abinash/local/lib/python2.7/site-packages/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 53, in fromProtocolTreeNode
    encNode.data.encode('latin-1') if sys.version_info >= (3,0) else encNode.data)
  File "/home/abinash/local/lib/python2.7/site-packages/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 24, in setEncProps
    assert encType in "pkmsg", "msg"
AssertionError: msg

abinash111 avatar Mar 23 '16 19:03 abinash111

Thats because android env cant recieve group msg

K4CZP3R avatar Mar 23 '16 21:03 K4CZP3R

I have the same error, any solution ?

ctoveloz avatar Mar 29 '16 14:03 ctoveloz

I am also facing the same issues. Is it working for anyone?

Sunil02324 avatar Apr 02 '16 10:04 Sunil02324

File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.4.102-py2.7.egg/yowsup/layers/axolotl/protocolentities/message_encrypted.py", line 24, in setEncProps assert encType in "pkmsg", "msg" AssertionError: msg

Anyone can help??

nauramutiara avatar Apr 04 '16 06:04 nauramutiara

Hi,

is the bot now running again with latest yowsup? i tried it but i still recieve the auth error. Any news?

I also download this bot from scratch and entered some valid credentials, still auth error.

Regards X23

x23piracy avatar Apr 06 '16 13:04 x23piracy

The last time I tried, I was able to log-in and receive messages but the bot wasn't able to send anything.

There is another problem I am facing. Some characters are getting added to the message I send from mobile. E.g. If I send 'hello', i'd receive 'hellloiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii', completely breaks the regex checks.

Ran into some other power issues with my raspberry and therefore have put the project on hold.

abinash111 avatar Apr 10 '16 16:04 abinash111

I have the same issue as abinash, after trying 3 times (/help or /echo ) I finally get a reply. When I do /echo test i get "⁠⁠⁠Echo: test%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" as a return.

Anyone know the issue to this problem?

FalcoXYZ avatar Apr 15 '16 18:04 FalcoXYZ

Use this https://github.com/jlguardi/yowsup to fix the issues.

abinash111 avatar Apr 25 '16 17:04 abinash111

My number got blocked last night. Not sure whether its because of this library or something else.

abinash111 avatar Apr 26 '16 02:04 abinash111