malmeloo / FindMy.py

🍏 + 🎯 + 🐍 = Everything you need to work with Apple's FindMy network!
http://docs.mikealmel.ooo/FindMy.py/
MIT License
82 stars 12 forks source link

UnhandledProtocolError: This implementation only supports s2k. Server returned s2k_fo #62

Closed siebert closed 1 week ago

siebert commented 2 weeks ago

When I provide my email and password as requested by real_airtag.py I get the following trace and I have no idea what went wrong and how to fix it:

Traceback (most recent call last):
  File "C:\python-files\airtag\_login.py", line 77, in get_account_sync
    with acc_store.open() as f:
  File "C:\programs\Python310\lib\pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: 'account.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\programs\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\programs\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\python-files\airtag\real_airtag.py", line 53, in <module>
    sys.exit(main(sys.argv[1]))
  File "C:\python-files\airtag\real_airtag.py", line 31, in main
    acc = get_account_sync(anisette)
  File "C:\python-files\airtag\_login.py", line 80, in get_account_sync
    _login_sync(acc)
  File "C:\python-files\airtag\_login.py", line 20, in _login_sync
    state = account.login(email, password)
  File "C:\programs\Python310\lib\site-packages\findmy\reports\account.py", line 987, in login
    return self._evt_loop.run_until_complete(coro)
  File "C:\programs\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return future.result()
  File "C:\programs\Python310\lib\site-packages\findmy\reports\account.py", line 474, in login
    new_state = await self._gsa_authenticate(username, password)
  File "C:\programs\Python310\lib\site-packages\findmy\reports\account.py", line 741, in _gsa_authenticate
    raise UnhandledProtocolError(msg)
findmy.errors.UnhandledProtocolError: This implementation only supports s2k. Server returned s2k_fo
siebert commented 2 weeks ago

I figured out how to support s2k_fo and will provide a pull request probably this weekend.

malmeloo commented 2 weeks ago

That would be fantastic, I'm gonna be quite busy for the next week or so, but if you provide a pr I'll try to look at it asap.

I'm guessing Apple updated the authentication method for some reason, I wonder if it differs per account?