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

integration calling async_dispatcher_connect with None #111797

Closed
Anto79-ops opened this issue Feb 29, 2024 · 15 comments
Closed

integration calling async_dispatcher_connect with None #111797

Anto79-ops opened this issue Feb 29, 2024 · 15 comments

Comments

@Anto79-ops
Copy link

The problem

hello,

updating to 2024.3.0b0 and these logs appear several times:

2024-02-28 20:26:15.411 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
    target.__name__,
    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'. Did you mean: '__ne__'?
2024-02-28 20:26:15.417 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
    target.__name__,
    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'. Did you mean: '__ne__'?
2024-02-28 20:26:15.424 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
    target.__name__,
    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'. Did you mean: '__ne__'?
2024-02-28 20:26:15.430 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
    target.__name__,
    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'. Did you mean: '__ne__'?
2024-02-28 20:26:15.437 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 183, in coro_wrapper
    return await target
           ^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 185, in coro_wrapper
    log_exception(format_err, *args)
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 101, in log_exception
    friendly_msg = format_err(*args)
                   ^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/logging.py", line 205, in <lambda>
    target.__name__,
    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '__name__'. Did you mean: '__ne__'?

CC @bd

What version of Home Assistant Core has the issue?

2024.3.0b0

What was the last working version of Home Assistant Core?

2024.2.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@bdraco bdraco added this to the 2024.3.0 milestone Feb 29, 2024
@bdraco
Copy link
Member

bdraco commented Feb 29, 2024

I guess we could add a guard for that so it blows up so we can find it

@bdraco
Copy link
Member

bdraco commented Feb 29, 2024

I wonder if its actually be unloaded out from under it instead... hard to tell on this one

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

It seems to me that cloud is causing this error. cloud and cast are the only two integrations that use async_create_catching_coro, which then calls catch_log_coro_exception, which uses coro_wrapper (as seen in the log above). I haven't been able to figure out what exactly is causing it there though.

@bdraco
Copy link
Member

bdraco commented Mar 1, 2024

Maybe a CC is using it?

@Anto79-ops are you still seeing this on the latest beta?

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

For my part, I can say that I still see it on b3. Will try booting in safe mode later.

@Anto79-ops
Copy link
Author

Yes, I'm still seeing on b3.

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

When I start in safe mode, I no longer see this message. So this is more likely to be caused by a CC.

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

@Anto79-ops Do you use Spook?

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

Yea, it is Spook. Found it, will create a PR for it.

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

frenck/spook#647 should fix this, applied this to my prod and the log disappeared

@Anto79-ops
Copy link
Author

Anto79-ops commented Mar 1, 2024

~~Do you mind listing your CCs?

I have dyson, spook, spook inverse, node red, hass agent, hacs, extended openai, nest protect, and gas buddy.~~

Oh never mind, you found it and yes, i have spook....for some reason github didn't show the previous messages until I posted .

Thank you!

@jpbede
Copy link
Member

jpbede commented Mar 1, 2024

You could try disable Spook, restart and see if the log messages disappear to confirm

@Anto79-ops
Copy link
Author

thanks @jpbede
I can confirm your findings. Disabling spook and restarting, the log do not appear even 15 minutes in from restart.

@bdraco
Copy link
Member

bdraco commented Mar 1, 2024

I'm going to close this one. Please continue at frenck/spook#647

@bdraco bdraco closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
@Anto79-ops
Copy link
Author

Thanks all.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2024
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

3 participants