Unable to Add Todoist Integration
The problem
I have been using the Todoist integration without any issues for months. However, a few days ago, the connection between the integration and the Todoist API was broken. I removed the integration, but now when I try to add it again, I enter my token and receive the error message: "Unknown error occurred." Thanks.
What version of Home Assistant Core has the issue?
core-2024.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Todoist
Link to integration documentation on our website
https://www.home-assistant.io/integrations/todoist
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
I can't find anything in HA logs about the connection
Additional information
No response
Hey there @boralyl, mind taking a look at this issue as it has been labeled with an integration (todoist) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of todoist can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign todoistRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
todoist documentation todoist source (message by IssueLinks)
I would check your logs when you try to re-add the integration and receive the "Unknown error occurred.". That will help narrow down the cause.
For what it's worth I just tried and didn't have any issues adding the integration in my instance. Hopefully any error logs will point to the problem.
I would check your logs when you try to re-add the integration and receive the "Unknown error occurred.". That will help narrow down the cause.
For what it's worth I just tried and didn't have any issues adding the integration in my instance. Hopefully any error logs will point to the problem.
Should I enable some kind of extended logging? In my Home Assistant Core I don't see anything related to Todoist. After inserting the token the wheel spins for a while (a long while actually), I get the error in the UI but nothing in the logs!
If I try to add the integration in the configuration yaml with:
calendar:
- platform: todoist
token: mytoken
custom_projects:
- name: "Alla porta"
due_date_days: 0
labels:
- allaporta
In the log I see an error:
Logger: homeassistant.components.calendar
Source: helpers/entity_platform.py:405
integration: Calendar (documentation, issues)
First occurred: 10:30:03 (1 occurrences)
Last logged: 10:30:03
Setup of platform todoist is taking longer than 60 seconds. Startup will proceed without waiting any longer.
And I also tried by issuing a new API token. Same error, but I can use the same API with other applications with no issue (e.g., Obsidian Todoist plugin).
EDIT: it's working again, maybe some kind of connectivity issue
This is definitely some kind of connection issue because it's not working anymore after a few minutes
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Same issue here. I get this error after enabeling debug logging for the todoist integration.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/todoist/__init__.py", line 29, in async_setup_entry
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 306, in async_config_entry_first_refresh
await self._async_refresh(
log_failures=False, raise_on_auth_failed=True, raise_on_entry_error=True
)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 379, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/todoist/coordinator.py", line 42, in _async_update_data
return await self.api.get_tasks()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/todoist_api_python/api_async.py", line 26, in get_tasks
return await run_async(lambda: self._api.get_tasks(**kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/todoist_api_python/utils.py", line 18, in run_async
return await loop.run_in_executor(None, func)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError
After deleting and readding todoist I get a timeout at this screen:
I am unfortunately still unable to reproduce this. It looks like the api request is timing out.
While I don't think this will resolve the issue, I did open a PR to update to the latest version of the todoist-api-python library: https://github.com/home-assistant/core/pull/136549