Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Should we really crash on: AuthError: not-authorized #44

Open
stv0g opened this issue Jan 10, 2016 · 1 comment
Open

Should we really crash on: AuthError: not-authorized #44

stv0g opened this issue Jan 10, 2016 · 1 comment

Comments

@stv0g
Copy link
Owner

stv0g commented Jan 10, 2016

Some error reporting for the user / Spectrum 2 would be nice.

backend.log

2016-01-10 12:39:53,991 INFO Session: Created: 4915757180xxx
2016-01-10 12:39:53,991 INFO Session: stv0g@0l.de attempting login
2016-01-10 12:39:55,439 ERROR transwhat: Traceback (most recent call last):
  File "/home/stv0g/workspace/transwhat/transwhat.py", line 95, in <module>
    asyncore.loop(timeout=1.0, count=10, use_poll = True)
  File "/usr/lib/python2.7/asyncore.py", line 220, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 201, in poll2
    readwrite(obj, flags)
  File "/usr/lib/python2.7/asyncore.py", line 123, in readwrite
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 108, in readwrite
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 86, in handle_read
    self.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/network/layer.py", line 94, in receive
    self.toUpper(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    self.processReceived()
  File "build/bdist.linux-x86_64/egg/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    self.toUpper(oneMessageData)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/auth/layer_crypt.py", line 63, in receive
    self.toUpper(payload)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 126, in receive
    self.toUpper(protocolTreeNode)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 169, in receive
    s.receive(data)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/__init__.py", line 105, in receive
    recv(node)
  File "build/bdist.linux-x86_64/egg/yowsup/layers/auth/layer_authentication.py", line 77, in handleFailure
    raise AuthError(nodeEntity.getReason())
AuthError: not-authorized
@moyamo
Copy link
Collaborator

moyamo commented Jan 10, 2016

The problem is that it is difficult to figure out which user is not authorized. I think yowsup was designed with the assumption that only one user will use it at a time. Unless you figure out another way, we may need to modify the AuthError object to include the legacyName and make a pull request upstream.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants