Who (what) are these listeners? need help to identify

HI trying to debug errors about

File "/usr/lib/python3.6/site-packages/homeassistant/helpers/script.py", line 95, in async_script_delay
    self._async_listener.remove(unsub)
ValueError: list.remove(x): x not in list

and

WARNING (MainThread) [homeassistant.core] Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x727c46f0>

which i cant place at all, nor have any idea what they mean, I searched for listeners in the Hassio interface, and lo and behold, here they are…on the dev-tools event page

26

Is there any way to tell which entities (if they are entities) this is referring to? and to which event they are listening?

I suppose this is about automations and customizations reading states and then doing something? It would be really helpful if there would be a way to explicitly identify these listeners. Is this available in the toolbox, or would it be possible to write a (python)script or so to do so?

Any help appreciated,
Thx,
Marius

It’s a warning, the listener could have already been removed by another event or the listener ended. To identify it, you may want to turn your logging on to ‘INFO’. Then watch all the events that occur in front of this warning. Whatever occurs before most likely leads to that warning.

WARNING (MainThread) [homeassistant.core] Unable to remove unknown listener <function async_track_point_in_utc_time.<locals>.point_in_time_listener at 0x7f16f08be0d0>

I started to see these in the logs after upgrading from 104 to 105. Seems like it’s impossible to track down but just mentioning it.

1 Like

Same here!

…aaaand same thing in my situation. it would be pretty helpful to have a possibility to identyfiy those “unknown listerners” by the hex address (I guess?) that’s given in the warning log, especially that it looks like it’s changing every line… 0x7ff33dbe6b90, 0x7ff33be140e0, 0x7ff33de12cb0, 0x7ff33de1add0 (and I can go with that for a looong time)

Its changing every time because it’s a new object. I.E. a new listener. You can safely ignore these unless ram is slowly creeping up on the system. As stated before, you can identify this by tracking previous events. If you turn on DEBUG you may be able to catch a debug statement that links to this to identify the problem, or see if it actually is a problem.

tried with more verbose log. the only thing that showed couple of times was

INFO (SyncWorker_5) [root] Sending control command: KEY

which is connected with samsungtv integration AFAIK (at least that’s what I’ve found here) but I’m using samsungtv_custom so I’m not sure it’s related.

is it plausible that it’s the source of the listener? (I’m away right now, so can’t test too many things in the configuration, don’t want to risk that “home will go down” and I won’t be able to physically reboot it ;))

not sure, you’d want to look for a DEBUG line close to the warning. It would state that it’s trying to do something or cancel something.