Skip to content

bug: wallet backup retries every 10s while the homeserver is down #1746

Closed as not planned

Description

@jvsena42

What happened?

While the Pubky homeserver is unreachable, the WALLET backup fails and retries every 10 s:

WARN [BackupRepo.kt:691] Retrying backup for: 'WALLET' in '10s' [AppError='code=transport_error, context=get_paykit_app_registry: fetch Paykit App Registry']

METADATA, ACTIVITY and WIDGETS back up normally during the same outage. The WALLET backup depends on fetching the Paykit App Registry from the homeserver, so a homeserver outage blocks it and the 10 s retry never backs off.

Expected behavior

Either the WALLET backup does not depend on the homeserver, or its retries back off while the homeserver stays unreachable.

Steps to Reproduce

  1. Use a wallet with a Pubky identity.
  2. Make the homeserver unreachable: block or hold traffic to it, for example through an HTTP proxy that blackholes the homeserver host.
  3. Trigger a wallet change that schedules a WALLET backup.
  4. The log repeats the line above every 10 s for as long as the outage lasts.

Logs / Screenshots / Recordings

Seen on master 1337f12 and on #1684 head fd617bf, during that PR's device gate.

Bitkit Version

master 1337f12

Device / OS

Pixel_9 emulator (Android 16), dev regtest/staging.

Reproducibility

Every time.

Activity

  1. added this to the 3.2.0 milestone on Nov 1, 2026
  2. self-assigned this
    on Nov 5, 2026
  3. jvsena42 commented on Nov 5, 2026

    @jvsena42
    MemberAuthor

    The WALLET backup includes the Paykit state, and the Paykit SDK keeps that state on the homeserver (PubkySharedStateStorage). Exporting it takes a homeserver write lock and reads the encrypted state blob, so the backup cannot complete while the homeserver is unreachable. Removing the App Registry fetch (#1784, synonymdev/bitkit-ios#1219, both closed) only moved the failure to acquire Pubky write lock.

    The retries already back off. A device run with the homeserver blocked showed WALLET retrying at 10 s, 20 s and 40 s (doubling to a 5 min cap since #1552), while ACTIVITY, METADATA and WIDGETS kept backing up. The next attempt after the homeserver comes back succeeds. So this is working by design; the 10 s in the title is only the first retry. Making WALLET back up during an outage would need a paykit-rs export from local state, or a separate backup category for Paykit state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions