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! #118927

Closed
Anto79-ops opened this issue Jun 6, 2024 · 7 comments · Fixed by #120045
Closed

IMAP Task was destroyed but it is pending! #118927

Anto79-ops opened this issue Jun 6, 2024 · 7 comments · Fixed by #120045

Comments

@Anto79-ops
Copy link

Anto79-ops commented Jun 6, 2024

The problem

Hello!

This log message has been going on for a while in my system (usally 1 or 2 times per-day), but the log detail is now better in 2024.6.0 that I can now determine where its coming from, and its imap (short of enabling debug python logging, which really stalls my system)

I'm using Gmail for imap

Logger: homeassistant
Source: runner.py:148
First occurred: 3:30:20 PM (2 occurrences)
Last logged: 3:56:05 PM

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

What version of Home Assistant Core has the issue?

2024.6.0

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

home-assistant bot commented Jun 6, 2024

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 Jun 6, 2024

What email provider are you connecting to?

@Anto79-ops
Copy link
Author

Hi Jan,

It's gmail.

@jbouwh
Copy link
Contributor

jbouwh commented Jun 6, 2024

Right, well Gmail recycles its services time by time. This causes that the connection is lost, when it recovers you are connecting on a new image. In the past this happened about every 30min.

@Anto79-ops
Copy link
Author

Oh, thank you for explaining. If it's expected and it does not seem to affect the integration or haos, maybe it is just log noise then.

@jbouwh
Copy link
Contributor

jbouwh commented Jun 7, 2024

The backend library needs an update. Fixes were added and merged:
bamthomas/aioimaplib#96
But there was no new release yet.
Then a new release is available we can fix this issue in Home Assistant.

@Anto79-ops
Copy link
Author

Anto79-ops commented Jun 7, 2024

thanks, it looks like you fixed this 8 months ago!

@jbouwh jbouwh mentioned this issue Jun 20, 2024
20 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants