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

IMAP - Task was destroyed but it is pending! #122809

Open
Anto79-ops opened this issue Jul 29, 2024 · 6 comments
Open

IMAP - Task was destroyed but it is pending! #122809

Anto79-ops opened this issue Jul 29, 2024 · 6 comments

Comments

@Anto79-ops
Copy link

The problem

hello!

Wanted to follow up on this error from here, but unfortuntaly, I'm still getting this in my log files with my gmail account:

Logger: homeassistant
Source: runner.py:148
First occurred: 1:39:11 PM (1 occurrences)
Last logged: 1:39:11 PM

Error doing job: Task was destroyed but it is pending! (<Task pending name='Task-116106' coro=<IMAP4.idle() running at /usr/local/lib/python3.12/site-packages/aioimaplib/aioimaplib.py:762> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.discard()]>)

also, for your reference, here's the template sensor I create for IMAP if its needed:

 ##IMAP email content
- trigger:
    - platform: event
      event_type: "imap_content"
      id: "custom_event"
  sensor:
    - name: imap_content
      unique_id: [REDACTED]
      state: "{{ trigger.event.data['subject'] }}"
      attributes:
        Message: "{{ trigger.event.data['text'] }}"
        Server: "{{ trigger.event.data['server'] }}"
        Username: "{{ trigger.event.data['username'] }}"
        Search: "{{ trigger.event.data['search'] }}"
        Folder: "{{ trigger.event.data['folder'] }}"
        Sender: "{{ trigger.event.data['sender'] }}"
        Date: "{{ trigger.event.data['date'] }}"
        Subject: "{{ trigger.event.data['subject'] }}"
        To: "{{ trigger.event.data['headers'].get('Delivered-To',['n/a'])[0] }}"
        Return-Path: "{{ trigger.event.data['headers'].get('Return-Path',['n/a'])[0] }}"
        Received-first: "{{ trigger.event.data['headers'].get('Received',['n/a'])[0] }}"
        Received-last: "{{ trigger.event.data['headers'].get('Received',['n/a'])[-1] }}"

What version of Home Assistant Core has the issue?

2024.7.3

What was the last working version of Home Assistant Core?

not sure

What type of installation are you running?

Home Assistant OS

Integration causing the issue

IMAP

Link to integration documentation on our website

https://www.home-assistant.io/integrations/imap/

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

@home-assistant
Copy link

Hey there @jbouwh, mind taking a look at this issue as it has been labeled with an integration (imap) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of imap can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign imap Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


imap documentation
imap source
(message by IssueLinks)

@jbouwh
Copy link
Contributor

jbouwh commented Aug 10, 2024

May be a task reference should have been stored for the task, here:

https://github.com/bamthomas/aioimaplib/blob/b32acb1502f2a61f7cea020b94f8a0bf4f494d44/aioimaplib/aioimaplib.py#L720

If the task fails due to a broken connection,

@bdraco Would adding a reference here in the client lib solve this issue?

@bdraco
Copy link
Member

bdraco commented Aug 10, 2024

May be a task reference should have been stored for the task, here:

bamthomas/aioimaplib@b32acb1/aioimaplib/aioimaplib.py#L720

If the task fails due to a broken connection,

@bdraco Would adding a reference here in the client lib solve this issue?

Yes I think so

@jbouwh
Copy link
Contributor

jbouwh commented Aug 10, 2024

Opened bamthomas/aioimaplib#109 for aioimaplib.

@issue-triage-workflows
Copy link

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.

@Anto79-ops
Copy link
Author

Think we're waiting for the library to update. Thanks.

@github-actions github-actions bot removed the stale label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants