Describe the bug
After a successful passkey create or authentication ceremony, AppPasskeyProviderActivity starts GitOp.SYNC in its lifecycleScope and then immediately calls finish(). Destroying the activity cancels the scope before the Git operation completes.
This makes passkey auto-sync unreliable. In particular, a newly created passkey may remain local instead of being pushed for another compatible authenticator to discover.
Observed logcat output after successful create and authentication ceremonies:
Passkey auto-sync crashed: kotlinx.coroutines.JobCancellationException: Job was cancelled
To Reproduce
- Configure APS with a Git remote.
- Leave passkey automatic Git sync enabled.
- Register a passkey with APS, or authenticate using an existing passkey.
- Complete the WebAuthn ceremony successfully.
- Observe that the provider activity finishes while the sync starts.
- Observe the
JobCancellationException in logcat before the Git sync completes.
Expected behavior
Automatic Git synchronization started by a successful passkey ceremony should survive the transient provider activity finishing and complete reliably. A successful sync should also run the existing repository/index invalidation callback.
The sync should preferably run as durable application-level work rather than delaying the WebAuthn response while network I/O completes.
Command output
Passkey auto-sync crashed: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}
Additional context
- APS version:
1.19.1 (11901)
- Reproduced from commit
d9a81442
- Relevant code:
app/src/main/java/app/passwordstore/passkeys/AppPasskeyProviderActivity.kt
maybeSyncToGit() launches with lifecycleScope.launch(...).
- Both successful create and get paths call
maybeSyncToGit() immediately before finish().
- This was found while verifying bidirectional credential compatibility between APS and Passless.
- APS not pulling Git before Credential Manager candidate discovery is a separate concern and is intentionally not included in this issue.
Describe the bug
After a successful passkey create or authentication ceremony,
AppPasskeyProviderActivitystartsGitOp.SYNCin itslifecycleScopeand then immediately callsfinish(). Destroying the activity cancels the scope before the Git operation completes.This makes passkey auto-sync unreliable. In particular, a newly created passkey may remain local instead of being pushed for another compatible authenticator to discover.
Observed logcat output after successful create and authentication ceremonies:
To Reproduce
JobCancellationExceptionin logcat before the Git sync completes.Expected behavior
Automatic Git synchronization started by a successful passkey ceremony should survive the transient provider activity finishing and complete reliably. A successful sync should also run the existing repository/index invalidation callback.
The sync should preferably run as durable application-level work rather than delaying the WebAuthn response while network I/O completes.
Command output
Additional context
1.19.1(11901)d9a81442app/src/main/java/app/passwordstore/passkeys/AppPasskeyProviderActivity.ktmaybeSyncToGit()launches withlifecycleScope.launch(...).maybeSyncToGit()immediately beforefinish().