Repository navigation
[Bug]: WALLET backup repeatedly rejects snapshots during Paykit activity #1487
Description
What happened?
During 2.6.0 RC1 mainnet Pubky/Paykit testing, Android repeatedly rejected WALLET backup snapshots with:
Private payment state changed during wallet snapshot
In the 18:00–18:13:34 window on 14 October 2026, there were 20 failed snapshot attempts and 8 successful WALLET backups. There was a 6m 12.928s gap between successful WALLET backups, from 18:03:43.178 to 18:09:56.106, with twelve rejected snapshots between those successes. That gap measures recorded backup progress, not how stale a particular payment’s recoverable state was.
Payments continued working and backups later succeeded. This is a report of repeated snapshot contention/retries during normal Paykit use, not proven data loss, wallet corruption or a permanently failed backup. Rejections continued after the initial setup period.
Expected behavior
Keep the snapshot consistency check: never publish a backup that mixes private payment-state versions. Under normal contact/request/subscription activity, make backup progress without repeated multi-minute runs of rejected snapshots. Distinguish expected retryable contention from persistent backup failure in diagnostics, while retaining genuine failures.
Steps to Reproduce
- Use mainnet Android 2.6.0 (192) with a funded existing wallet and an active Pubky profile. Save/link a separate iOS 2.6.0 (199) wallet/profile as a contact and enable contact payments.
- Keep the apps open and exercise small contact payments/payment requests in both directions, using Lightning and on-chain. The observed session also exercised Lightning subscriptions; the logs do not isolate one action as the trigger.
- Monitor WALLET backup attempts while payment/endpoint state updates. Look for
BackupReposnapshot consistency rejections and subsequent successful WALLET backups. - Compare intervals between successes. Do not disable the consistency check to make the test pass.
Logs / Screenshots / Recordings
All times below are 14 October 2026, Europe/Warsaw (UTC+2), on Android:
| Observation | Timing |
|---|---|
| Successful WALLET backup before the long retry interval | 18:03:43.178 |
| First rejection in that interval | 18:04:51.343 |
| Last of twelve rejections in that interval | 18:09:47.137 |
| Next successful WALLET backup | 18:09:56.106 |
| Gap between those two successes | 6m 12.928s |
| Later successful backups in the selected window | 18:10:50.819, 18:13:12.466, 18:13:32.924 |
| Later closeout successes | 18:30:07.028, 18:30:23.976 |
The complete selected window contains 20 rejections + 8 successes, including the successes before the interval above. The attachment contains all 28 outcome lines plus the two later closeout success lines, with no payment data.
Representative error:
ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
Sanitized log excerpts are included below. File upload was rejected by GitHub; no raw diagnostic files are published. The original sanitized ZIP remains available locally.
Sanitized Android log excerpts
10-14 18:00:06.806 23491 11076 I APP : 2026-10-14 16:00:06.806 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:01:16.849 23491 16390 I APP : 2026-10-14 16:01:16.849 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:02:29.081 23491 20601 I APP : 2026-10-14 16:02:29.080 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:03:35.115 23491 4684 E APP : 2026-10-14 16:03:35.114 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:03:43.178 23491 4684 I APP : 2026-10-14 16:03:43.177 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:04:51.343 23491 3941 E APP : 2026-10-14 16:04:51.342 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:05:14.320 23491 20746 E APP : 2026-10-14 16:05:14.317 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:05:35.001 23491 20695 E APP : 2026-10-14 16:05:35.000 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:06:05.788 23491 3941 E APP : 2026-10-14 16:06:05.788 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:07:10.516 23491 11045 E APP : 2026-10-14 16:07:10.516 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:07:27.610 23491 20601 E APP : 2026-10-14 16:07:27.610 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:07:45.717 23491 16391 E APP : 2026-10-14 16:07:45.717 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:08:42.809 23491 11044 E APP : 2026-10-14 16:08:42.808 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:09:05.752 23491 11075 E APP : 2026-10-14 16:09:05.751 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:09:25.641 23491 20689 E APP : 2026-10-14 16:09:25.641 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:09:36.954 23491 3941 E APP : 2026-10-14 16:09:36.953 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:09:47.137 23491 11078 E APP : 2026-10-14 16:09:47.136 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:09:56.106 23491 16393 I APP : 2026-10-14 16:09:56.104 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:10:30.967 23491 20698 E APP : 2026-10-14 16:10:30.967 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:10:50.819 23491 16391 I APP : 2026-10-14 16:10:50.819 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:11:29.360 23491 4684 E APP : 2026-10-14 16:11:29.358 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:11:54.238 23491 16389 E APP : 2026-10-14 16:11:54.238 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:12:11.709 23491 16392 E APP : 2026-10-14 16:12:11.708 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:12:30.368 23491 16392 E APP : 2026-10-14 16:12:30.367 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:12:45.265 23491 4684 E APP : 2026-10-14 16:12:45.264 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:12:57.907 23491 16395 E APP : 2026-10-14 16:12:57.906 ERROR [BackupRepo.kt:563] Backup failed for: 'WALLET' [IllegalStateException='Private payment state changed during wallet snapshot'] - BackupRepo
10-14 18:13:12.466 23491 4685 I APP : 2026-10-14 16:13:12.466 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:13:32.924 23491 11076 I APP : 2026-10-14 16:13:32.924 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:30:07.028 23491 20746 I APP : 2026-10-14 16:30:07.027 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
10-14 18:30:23.976 23491 3941 I APP : 2026-10-14 16:30:23.975 INFO [BackupRepo.kt:538] Backup succeeded for: 'WALLET' - BackupRepo
Bitkit Version
2.6.0 RC1 (192), mainnet, release-2.6.0 at 876d0982958e70eb10dd9a607a69f5b2851a3fdc. Counterpart: iOS 2.6.0 (199).
Device / OS
Samsung Galaxy S22 SM-S901B, Android 16, power saving enabled. This wallet had roughly 1,200 payment-history records. These conditions were not isolated as causal factors.
Reproducibility
Repeated within one manual device session: 20 rejected attempts in the selected 13-minute window. Reproduction across other devices, wallets or fresh sessions has not been measured.
Additional context
getWalletBackupDataBytes captures private/SDK backup-state versions, collects the snapshot and checks the versions again. The recorded exception comes from that intentional consistency guard. Why those versions change so frequently, and which work overlaps the snapshot, is not yet established. The safe follow-up is to attribute snapshot duration/state changes and retry scheduling, not remove the guard.
- Related: #1419 — staging Paykit contact-payment latency. Background SDK/lock work may be relevant context, but no common cause is established; this report is mainnet RC1 backup progress.
- #1252 and #1093 cover stale-session initialization/permanently blocked backup paths. This capture shows a different error and repeated successful recovery, so it should not be represented as that same failure.
- No restore test was performed from snapshots in this interval; recovery safety/data loss cannot be inferred from success logs alone. No matched 2.5.x baseline establishes a regression.
Unconfirmed additional observation: The tester recalls a generic Android error toast, possibly showing an internal exception message. Exact wording, time and triggering action were not captured; toast content is not logged. This is not attributed to this issue or treated as a separate reproduced failure.
Activity
ovitrif commentedon Oct 14, 2026
Moved to 2.7.0: found in 2.6.0 RC1 testing and not a release blocker, since backups recovered and payments succeeded.
ben-kaufman commentedon Oct 15, 2026
Opened Android #1507 and the matching iOS fix synonymdev/bitkit-ios#950.
The fixes pair SDK exports with their version under the existing lock, reject and recapture snapshots that change during capture, and keep contention pending for automatic retry. iOS also preserves changes made during capture/upload instead of marking them backed up too early. Identity, cancellation, restore and payment consistency checks remain enforced; no backup format or safety-wait changes.
Local validation passed 4,247 Android tests and 2,611 iOS native tests with no introduced diagnostics against the verified bases. Controlled regressions cover the failure paths, but the original mainnet six-minute interval was not reproduced. Sustained mutations can still defer safe capture, and controlled device fault-injection/restore checks remain unchecked in both PRs.