You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SyncServiceImpl.isInSync() creates a new RemoteSecondary each time it is called. The reasons for doing this are not entirely clear, given that SyncServiceImpl.create() already creates a RemoteSecondary , but that is another story.
In SyncServiceImpl.create() the enrollmentId is passed to the RemoteSecondary constructor:
The reason for adding separate remote secondary for isInSync method. #404
In the current draft PR , I have removed the logic.
Will try replicating the old isInSync bug with latest code.
replicate the current isInSync issue with sync_service_bug branch
dart sync_test.dart -a @ purnima -n wavi -k /home/purnima/.atsign/keys/@ purnima_buzzkey.atKeys
-d vip.ve.atsign.zone
Connecting ... Connected
Exception: Exception: Unable to fetch latest server commit id: Exception: Exception: Failed connecting to @ purnima. error:{"errorCode":"AT0401","errorDescription":"Exception: pkam authentication failed"}
purnima@ purnima:~/Documents/libraries_sync_bug/at_libraries/packages/at_cli_commons/test$
Re run the test with sync_service_bug branch
dart sync_test.dart -a @ purnima -n wavi -k /home/purnima/.atsign/keys/@purnima_buzzkey.atKeys -d vip.ve.atsign.zone
Connecting ... Connected
is inSync : false
sanity testing with buzz app and onboarding_cli with my branch
Describe the bug
SyncServiceImpl.isInSync()
creates a new RemoteSecondary each time it is called. The reasons for doing this are not entirely clear, given thatSyncServiceImpl.create()
already creates a RemoteSecondary , but that is another story.In SyncServiceImpl.create() the enrollmentId is passed to the RemoteSecondary constructor:
However in
SyncServiceImpl.isInSync()
it is not:Authentication will then fail, since the enrollmentId must be supplied in order to authenticate with APKAM keys.
Steps to reproduce
Create a program like this:
its dependencies are
Running it with a PKAM keys file:
Running it with an APKAM keys file:
Expected behavior
isInSync should also pass enrollmentId to the RemoteSecondary constructor
Additional context
As part of fixing this I'd also like to see whether we can eliminate isInSync's creation of its own RemoteSecondary
The text was updated successfully, but these errors were encountered: