Closed DeeeeLAN closed 4 years ago
Pushed a new commit, could you please check, whether it fixes the problem for you?
That looks like it worked. It asked for a code and displayed on the Apple TV. I hit a few errors after that step though. The first time I ran:
# python tvscrobbler.py
tvscrobbler.py:21: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(open('config.yml', 'r'))
Enter code displayed by Apple TV: 6631
Exception in callback ScrobblingRemoteProtocol.connection_made(<_SelectorSoc...e, bufsize=0>>)
handle: <Handle ScrobblingRemoteProtocol.connection_made(<_SelectorSoc...e, bufsize=0>>)>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/root/trakt-for-appletv/scrobbling.py", line 51, in connection_made
super().connection_made(transport)
File "/root/trakt-for-appletv/media_remote.py", line 48, in connection_made
pairing(socket, self.config['device_info'])
File "/root/trakt-for-appletv/pairing.py", line 137, in pairing
proof = parsed[kTLVType_Proof]
KeyError: b'\x04'
Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 721, in _read_ready
self._protocol.data_received(data)
File "/root/trakt-for-appletv/media_remote.py", line 75, in data_received
decrypted = self.decrypt(data)
File "/root/trakt-for-appletv/media_remote.py", line 35, in decrypt
res, self.input_nonce = self.do_encryption_operation(self.input_key.decrypt, data, self.input_nonce)
AttributeError: 'NoneType' object has no attribute 'decrypt'
Then I killed it and tried again. They are different the second time for some reason:
# python tvscrobbler.py
tvscrobbler.py:21: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(open('config.yml', 'r'))
Enter code displayed by Apple TV: 2753
Exception in callback ScrobblingRemoteProtocol.connection_made(<_SelectorSoc...e, bufsize=0>>)
handle: <Handle ScrobblingRemoteProtocol.connection_made(<_SelectorSoc...e, bufsize=0>>)>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/root/trakt-for-appletv/scrobbling.py", line 51, in connection_made
super().connection_made(transport)
File "/root/trakt-for-appletv/media_remote.py", line 48, in connection_made
pairing(socket, self.config['device_info'])
File "/root/trakt-for-appletv/pairing.py", line 157, in pairing
cha_cha_poly = ChaCha20Poly1305(x)
File "/root/trakt-for-appletv/lib/python3.6/site-packages/cryptography/hazmat/primitives/ciphers/aead.py", line 21, in __init__
exceptions._Reasons.UNSUPPORTED_CIPHER
cryptography.exceptions.UnsupportedAlgorithm: ChaCha20Poly1305 is not supported by this version of OpenSSL
Exception in callback _SelectorSocketTransport._read_ready()
handle: <Handle _SelectorSocketTransport._read_ready()>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/asyncio/events.py", line 145, in _run
self._callback(*self._args)
File "/usr/local/lib/python3.6/asyncio/selector_events.py", line 721, in _read_ready
self._protocol.data_received(data)
File "/root/trakt-for-appletv/media_remote.py", line 75, in data_received
decrypted = self.decrypt(data)
File "/root/trakt-for-appletv/media_remote.py", line 35, in decrypt
res, self.input_nonce = self.do_encryption_operation(self.input_key.decrypt, data, self.input_nonce)
AttributeError: 'NoneType' object has no attribute 'decrypt'
Hi,
I can successfully authenticate with trakt, but immediately after, I get this error. I also get it on subsequent launches when it is loading the saved authentication. I made sure my
/etc/hosts
file had$HOSTNAME
assigned to127.0.0.1
. Any other suggestions?Here is the output of the dns-sd command:
Additionally, nmap shows the Apple TV host/port as open.