Closed frenck closed 2 years ago
@frenck thank you! After fixing it as you pointed out, it works fine. 😄
@frenck thank you! After fixing it as you pointed out, it works fine. 😄
Where can I find the file in home assistant? I searched everywhere but cant find aioimaplib.py. I would like to fix it and then hopefully on the next update it will be overwritten with a good version by itself. I am on Home assistant OS.
It needs to be fixed in the homeassistant instance of docker.
@J-o-h-n-M You need to shell log in to the host as an administrator using SSH & Web Terminal add-on etc.
ssh hassio@192.168.x.x
docker exec -it homeassistant /bin/bash
vi /usr/local/lib/python3.10/site-packages/aioimaplib/aioimaplib.py
@nao-pon Thanks! I also made the modification that @frenck suggested and indeed it works like a charm again.
Any idea when this will be in a HA release? I have to update manually every time now.
Any idea when this will be in a HA release?
Depends when this issue is addressed in this library :)
Any idea when this will be in a HA release? I have to update manually every time now.
I made a custom_component that fixes this until they merge the fix here. Referenced in the HA thread here https://github.com/home-assistant/core/issues/74487#issuecomment-1192136483
Reported at the Home Assistant project:
This seems to be related to more strict handling in Python 3.10 (which the Home Assistant project has been switched to).
It happens when setting the default SSL context:
https://github.com/bamthomas/aioimaplib/blob/544e735852599cfe8ba8251561460494b9404418/aioimaplib/aioimaplib.py#L834
According to documentation, however, this is used to create a server side sockets:
ref: https://docs.python.org/3/library/ssl.html#ssl.Purpose.CLIENT_AUTH
I guess it needs to be using:
ref: https://docs.python.org/3/library/ssl.html#ssl.Purpose.SERVER_AUTH
Downstream issue: https://github.com/home-assistant/core/issues/74487