Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

presence.py: 'NoneType' object has no attribute 'addCallbacks' #1

Closed

Description

@hughns

I'm periodically seeing exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks' errors in the logs of the reference homeserver.

There does not appear to be a common type or timing of log entry immediately preceding the error.

Log extracts as follows.

Server started

2014-08-18 01:22:19,478 - twisted - 455 - INFO - Site starting on 8448

start_polling_presence

6 instances of the error relating to "/home/matrix/synapse/synapse/handlers/presence.py", line 426, in start_polling_presence:

  • 2014-08-18 01:22:23,201 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 01:55:56,586 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 02:55:57,690 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 04:55:00,809 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 06:55:25,996 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 08:55:00,928 - twisted - 455 - ERROR - Unhandled error in Deferred:

2014-08-18 01:22:23,201 - twisted - 455 - ERROR - Unhandled error in Deferred:
2014-08-18 01:22:23,202 - twisted - 455 - ERROR - Unhandled Error
Traceback (most recent call last):
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 426, in start_polling_presence
yield defer.DeferredList(deferreds)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 820, in init
deferred.addCallbacks(self._cbDeferred, self._cbDeferred,
exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks'

stop_polling_presence

6 instances of the error relating to "/home/matrix/synapse/synapse/handlers/presence.py", line 481, in stop_polling_presence:

  • 2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 01:56:47,801 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 02:56:48,862 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 04:55:52,694 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 06:56:07,297 - twisted - 455 - ERROR - Unhandled error in Deferred:
  • 2014-08-18 08:55:53,604 - twisted - 455 - ERROR - Unhandled error in Deferred:

2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled error in Deferred:
2014-08-18 01:24:15,247 - twisted - 455 - ERROR - Unhandled Error
Traceback (most recent call last):
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 382, in callback
self._startRunCallbacks(result)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, _args, *_kw)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- ---
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 230, in set_state
self.stop_polling_presence(target_user)
File "/home/matrix/synapse/synapse/handlers/presence.py", line 481, in stop_polling_presence
return defer.DeferredList(deferreds)
File "/home/matrix/.local/lib/python2.7/site-packages/Twisted-14.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 820, in init
deferred.addCallbacks(self._cbDeferred, self._cbDeferred,
exceptions.AttributeError: 'NoneType' object has no attribute 'addCallbacks'

Activity

  1. leonerd commented on Aug 19, 2014

    @leonerd
    Contributor

    I believe 992782b should fix it. Now covered by unit tests also.

  2. added a commit that references this issue on May 15, 2017
  3. added a commit that references this issue on Jan 24, 2020
  4. added a commit that references this issue on Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions