How do I figure out what is causing this error?

Error in logs (lots of them):

22-03-05 09:49:52 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-10148' coro=<Scheduler._run_task.<locals>._wrap_task() done, defined at /usr/src/supervisor/supervisor/misc/scheduler.py:58> exception=AttributeError("'NoneType' object has no attribute 'get'")>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/misc/scheduler.py", line 62, in _wrap_task
    await task.coro_callback()
  File "/usr/src/supervisor/supervisor/misc/tasks.py", line 417, in _watchdog_addon_application
    if addon.in_progress or await addon.watchdog_application():
  File "/usr/src/supervisor/supervisor/addons/addon.py", line 473, in watchdog_application
    port = self.ports.get(f"{t_port}/tcp", t_port)
AttributeError: 'NoneType' object has no attribute 'get'

I see scheduler, addon, watchdog and a TCP port so it must be one of these add-ons causing the issue:

My guess is Node Red because its logs do show some messages on a CRON I setup to re-authorize Alexa every 2 hours otherwise it stops working (no announcements work), but the Node Red addon logs do not appear to be errors, just a log of what it did.

Edit: Guess #2 - some bad template without a default?? (‘NoneType’ object has no attribute ‘get’)

I too have this. Did you ever find a solution?

Looks like the issue is related to the Terminal & SSH Add-on. Disabling the add-on on my instance has stopped the errors.