Apple TV (Error doing job: Task exception was never retrieved)

Hi Homies,

I have added the Apple TV component and every time my server restarts I get the following in the log file. Does anyone know how I can fix this?

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/apple_tv/", line 201, in _setup_atv
    await atv.airplay.load_credentials(credentials)
  File "/usr/lib/python3.5/asyncio/", line 210, in coro
    res = func(*args, **kw)
  File "/srv/homeassistant/lib/python3.5/site-packages/pyatv/internal/", line 433, in load_credentials
  File "/srv/homeassistant/lib/python3.5/site-packages/pyatv/airplay/", line 100, in initialize
    signing_key = SigningKey(self.seed)
  File "/srv/homeassistant/lib/python3.5/site-packages/ed25519/", line 88, in __init__
    raise ValueError("SigningKey takes 32-byte seed or 64-byte string")
ValueError: SigningKey takes 32-byte seed or 64-byte string

You have entered invalid credentials in your config.

1 Like

Ahhh, thank you sir!

Not sure how they got invalid - it was a new installl. I however went ahead and replaced them and it seems to be up and running again.

Thanks again! :slight_smile:

Great! Usually it is because you miss to copy one or more characters :slight_smile:

I am having this error for my Samsung TV - do you know what is happening with this on? @postlund

Mon Feb 25 2019 13:45:33 GMT+0000 (GMT)

Update for media_player.bedroom_tv fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 81, in recv
    bytes_ = sock.recv(bufsize)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/", line 221, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/", line 349, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/lib/python3.5/asyncio/", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/", line 304, in _wakeup
  File "/usr/lib/python3.5/asyncio/", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/", line 132, in update
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/", line 153, in send_key
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/media_player/", line 138, in get_remote
    self._remote = self._remote_class(self._config)
  File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/", line 11, in __init__
    self.remote = RemoteWebsocket(config)
  File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/", line 30, in __init__
  File "/srv/homeassistant/lib/python3.5/site-packages/samsungctl/", line 67, in _read_response
    response = self.connection.recv()
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 310, in recv
    opcode, data = self.recv_data()
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 327, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 340, in recv_data_frame
    frame = self.recv_frame()
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 374, in recv_frame
    return self.frame_buffer.recv_frame()
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 361, in recv_frame
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 309, in recv_header
    header = self.recv_strict(2)
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 396, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 449, in _recv
    return recv(self.sock, bufsize)
  File "/srv/homeassistant/lib/python3.5/site-packages/websocket/", line 84, in recv
    raise WebSocketTimeoutException(message)
websocket._exceptions.WebSocketTimeoutException: timed out

You would have to ask someone that knows how the Samsung integration works, I have no clue.