Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangups client crashes with AttributeError #10

Open
Equidamoid opened this issue Aug 19, 2014 · 3 comments
Open

Hangups client crashes with AttributeError #10

Equidamoid opened this issue Aug 19, 2014 · 3 comments

Comments

@Equidamoid
Copy link
Contributor

Here is a backtrace.
Also I have a lot of similar exceptions in log.
I'm not sure if it helps but it seems that I had some network connectivity issues then.

@tdryer
Copy link
Owner

tdryer commented Aug 19, 2014

Looks like http_utils.longpoll_fetch is yielding None instead of a future. I'm not sure why that's happening.

@xmikos
Copy link
Contributor

xmikos commented Aug 19, 2014

I have also many KeyError (and subsequently TypeError: 'NoneType' object is not iterable) errors in log (but Hangups seems to work anyway). Here is one example:

2014-08-19 10:58:49,115 - hangups.client - DEBUG - Received event: on_focus(UgxpcDaz1kIZ3y8gxHJ4AaABAQ, UserID(chat_id='112452697865679874139', gaia_id='112452697865679874139'), 2014-08-19 08:
58:48.973999+00:00, focused, mobile)
2014-08-19 10:58:49,115 - hangups.client - INFO - Triggered event Client.on_focus
2014-08-19 10:58:49,116 - tornado.application - ERROR - Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 175, in wrapper
    yielded = next(result)
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 571, in data_received
    yield gen.maybe_future(self._delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 520, in data_received
    self.request.streaming_callback(chunk)
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 91, in _streaming_callback
    streaming_callback(data)
  File "/home/storage/temp/hangups/hangups/channel.py", line 248, in _on_push_data
    self.on_message(msg_type, msg)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 512, in _on_push_data
    getattr(self, event_name)(*args)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 75, in _on_focus
    self.get(conv_id).on_focus(user_id, timestamp, status, device)
  File "/home/storage/temp/hangups/hangups/client.py", line 90, in get
    return self._conv_dict[conv_id]
KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ'
2014-08-19 10:58:49,164 - tornado.application - ERROR - Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0x7f229bd641e0>, <tornado.concurrent.Future object at 0x7f229bdf89e8>)
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 175, in wrapper
    yielded = next(result)
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 571, in data_received
    yield gen.maybe_future(self._delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 520, in data_received
    self.request.streaming_callback(chunk)
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 91, in _streaming_callback
    streaming_callback(data)
  File "/home/storage/temp/hangups/hangups/channel.py", line 248, in _on_push_data
    self.on_message(msg_type, msg)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 512, in _on_push_data
    getattr(self, event_name)(*args)
  File "/home/storage/temp/hangups/obsub.py", line 221, in __call__
    f(self.instance, *args, **kwargs)
  File "/home/storage/temp/hangups/hangups/client.py", line 75, in _on_focus
    self.get(conv_id).on_focus(user_id, timestamp, status, device)
  File "/home/storage/temp/hangups/hangups/client.py", line 90, in get
    return self._conv_dict[conv_id]
KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 59, in fetch
    connect_timeout=connect_timeout, request_timeout=request_timeout
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 111, in result
    raise self._exception
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 314, in wrapped
    ret = fn(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/tornado/simple_httpclient.py", line 384, in <lambda>
    lambda f: f.result())
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 207, in _read_message
    yield body_future
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 617, in run
    value = future.result()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 109, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 620, in run
    yielded = self.gen.throw(*sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 527, in _read_chunked_body
    yield gen.maybe_future(delegate.data_received(chunk))
  File "/usr/lib/python3.4/site-packages/tornado/http1connection.py", line 52, in __exit__
    raise _QuietException
tornado.http1connection._QuietException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/tornado/ioloop.py", line 565, in _run_callback
    ret = callback()
  File "/usr/lib/python3.4/site-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 697, in <lambda>
    self.future, lambda f: self.run())
  File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 646, in run
    self.result_future.set_exc_info(sys.exc_info())
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 167, in set_exc_info
    self.set_exception(exc_info[1])
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 150, in set_exception
    self._set_done()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 177, in _set_done
    cb(self)
  File "/home/storage/temp/hangups/hangups/http_utils.py", line 31, in done_callback
    self.set_result(future)
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 145, in set_result
    self._set_done()
  File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 175, in _set_done
    for cb in self._callbacks:
TypeError: 'NoneType' object is not iterable

@tdryer
Copy link
Owner

tdryer commented Aug 19, 2014

KeyError: 'UgxpcDaz1kIZ3y8gxHJ4AaABAQ' sounds like a new conversation was created, which hangups can't handle yet. I don't understand how that causes the other exception though. Furthermore, hangouts is supposed to crash when there's an unhandled exception instead of logging it.

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

No branches or pull requests

3 participants