pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Authentication problem on integration of apple_tv

Open pomkos opened this issue 6 years ago • 4 comments

Describe the bug Adding the apple_tv integration works until it asks for IP address. After hitting submit a blank screen comes up.

image

To Reproduce

Freshly install apple_tv from HACS using the github repo, restart HASS, settings -> integrate -> apple_tv -> AppleTV IP autodetected -> Submit -> blank screen -> Submit -> "Aborted" Screen

Expected behavior

Unknown, first time trying this integration.

System Setup (please complete the following information):

  • OS: FreeNAS jail
  • Python: 3.7.7
  • pyatv: Not sure, whatever was installed with HACS
  • Apple TV: 13.3

Additional context

Log File:

Logger: custom_components.apple_tv.config_flow
Source: custom_components/apple_tv/config_flow.py:268
First occurred: 9:55:29 AM (2 occurrences)
Last logged: 9:57:36 AM

Authentication Problem

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/pyatv/support/__init__.py", line 29, in error_handler
    return await func(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/pyatv/mrp/auth.py", line 34, in start_pairing
    self.srp.initialize()
  File "/srv/homeassistant/lib/python3.7/site-packages/pyatv/mrp/srp.py", line 98, in initialize
    self._signing_key = Ed25519PrivateKey.from_private_bytes(os.urandom(32))
  File "/srv/homeassistant/lib/python3.7/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py", line 63, in from_private_bytes
    _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM
cryptography.exceptions.UnsupportedAlgorithm: ed25519 is not supported by this version of OpenSSL.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/hass/homeassistant/custom_components/apple_tv/config_flow.py", line 268, in async_begin_pairing
    await self.pairing.begin()
  File "/srv/homeassistant/lib/python3.7/site-packages/pyatv/support/__init__.py", line 37, in error_handler
    raise fallback(str(ex)) from ex
pyatv.exceptions.PairingError: ed25519 is not supported by this version of OpenSSL.

pomkos avatar May 05 '20 14:05 pomkos

Yeah, that's a bad error message. I will have to fix that. You will however have to update OpenSSL as it is old and does not support the mentioned encryption algorithm.

postlund avatar May 05 '20 14:05 postlund

Update: due to unrelated issues I moved from a FreeNAS plugin of HASS to raspi hassio. Apple TV integration works without errors on there.

pomkos avatar May 06 '20 15:05 pomkos

Great! It probably has a newer version of OpenSSL.

postlund avatar May 08 '20 04:05 postlund

I believe this is not a problem anymore (it should give a better error message).

postlund avatar May 29 '20 20:05 postlund