AuthenticationError with ActorManager authkey
When ActorManager authkey is set via Actor._options_
(instead at process global), only the proxies returned using _method_to_typeid_
inherit that authkey, while both nested and manual uactor.proxy
-returned proxies won't even initialize (because of the reference counting requiring an initial message).
This is an uactor API bug: even if it's already happening with multiprocessing.manager
when using nested proxies, they are not expected to work at all.
Workaround: using process authkey, see https://gitlab.com/ergoithz/uactor/-/blob/master/examples/networking.md
Traceback (most recent call last):
File "/builds/ergoithz/uactor/tests.py", line 292, in test_networking
remote = pickle.loads(pickle.dumps(actor))
File "/opt/pypy/lib-python/3/pickle.py", line 1578, in _loads
encoding=encoding, errors=errors).load()
File "/opt/pypy/lib-python/3/pickle.py", line 1070, in load
dispatch[key[0]](self)
File "/opt/pypy/lib-python/3/pickle.py", line 1418, in load_reduce
stack[-1] = func(*args)
File "/opt/pypy/lib-python/3/multiprocessing/managers.py", line 881, in RebuildProxy
return func(token, serializer, incref=incref, **kwds)
File "/builds/ergoithz/uactor/uactor.py", line 154, in __init__
super().__init__(*args, **kwargs)
File "/opt/pypy/lib-python/3/multiprocessing/managers.py", line 731, in __init__
self._incref()
File "/opt/pypy/lib-python/3/multiprocessing/managers.py", line 785, in _incref
conn = self._Client(self._token.address, authkey=self._authkey)
File "/opt/pypy/lib-python/3/multiprocessing/connection.py", line 493, in Client
answer_challenge(c, authkey)
File "/opt/pypy/lib-python/3/multiprocessing/connection.py", line 739, in answer_challenge
raise AuthenticationError('digest sent was rejected')
multiprocessing.context.AuthenticationError: digest sent was rejected
Edited by Felipe A. Hernandez