atsign-foundation / at_libraries

Support libraries & dependencies for Atsign's technology
https://pub.dev/publishers/atsign.org/packages
BSD 3-Clause "New" or "Revised" License
38 stars 11 forks source link

fix: Add retry logic in "_waitForPkamAuthSuccess" to retry when secondary is temporarily not reachable #684

Closed sitaram-kalluri closed 1 month ago

sitaram-kalluri commented 1 month ago

- What I did

- How I did it

- How to verify it

/usr/lib/dart/bin/dart --enable-asserts --no-serve-devtools /home/sitaram/IdeaProjects/atsign/core/at_libraries/packages/at_onboarding_cli/bin/activate_cli.dart enroll -s ABC123 -n wavi:rw -p wavi -a @aliceđź›  -r vip.ve.atsign.zone -k ~/.atsign/keys/@alice-pkam-local.atKeys -d local-17
Submitting enrollment request
Waiting for approval; will check every 10 seconds
Checking ... Enrollment ID: 0d387d23-e38d-4404-b297-f11adfdd1685
 not approved. Will retry in 10 seconds
Checking ...  not approved. Will retry in 10 seconds
Checking ...  not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:36:23.447566|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake. Attempting to retry for 1 attempt 
 not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:36:33.462455|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake. Attempting to retry for 2 attempt 
 not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:46:06.025958|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake. Attempting to retry for 3 attempt 
 not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:46:16.032858|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake. Attempting to retry for 4 attempt 
 not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:46:26.040091|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake. Attempting to retry for 5 attempt 
 not approved. Will retry in 10 seconds
Checking ... SEVERE|2024-10-07 15:46:36.047084|OnboardingCli|Exception occurred when authenticating the atSign: @aliceđź›  caused by HandshakeException: Connection terminated during handshake Activation failed after 5 attempts 
[Error] HandshakeException: Connection terminated during handshake
[Error] Enrollment failed.
  Cause: HandshakeException: Connection terminated during handshake
  Please try again or contact support@atsign.com

Process finished with exit code 0

- Description for the changelog