Skip to content

[Bug]: Pubky profile falls back to "Your Name" after Shop Paykit setup #1344

Closed

Description

@piotr-iohk

What happened?

On a fresh mainnet wallet, a Pubky identity named pav C tester (pubkyadjn…jdcy) was created in Bitkit and used to approve Shop / Paykit. About an hour later the home header shows the Your Name placeholder and no profile. The same pubky still signs Shop authorization requests (ADJN…JDCY).

After the next process start, Paykit grant-session restore failed, re-sign-in recovery failed, and the Pubky auth handler flipped to the no-identity state (signup enabled, auth disabled). The secret key was not wiped in that window.

The home sync spinner also keeps spinning. App Status at the same time: Internet connected, Bitcoin node Could not connect to Electrum, Lightning Stopping. That part looks like #1252 / a transient network drop; the profile-name loss is the bug here.

Expected behavior

After Shop Paykit setup, the Bitkit-created profile stays loaded across restarts. A failed Paykit session restore should not make the header look like there is no identity while the key can still authorize.

Steps to Reproduce

  1. Install current-master mainnet debug (2.4.1 (188), to.bitkit). Enable Paykit UI.
  2. Fresh wallet. Create a Pubky profile in Bitkit (Homegate). Confirm the header shows the name.
  3. On shop.pubky.app, use that identity for seller Bitcoin / Paykit setup and approve the grant in Bitkit.
  4. Leave the app / restart later (here: ~1 hour, then a process start at 12:07).
  5. Open home. Header is Your Name. Authorize a Shop request: same pubky and name still appear on the auth sheet.

Logs / Screenshots / Recordings

Log zip attached. From 2026-09-25-pubky-profile-lost-after-shop-paykit-logs.zip:

12:07:57 WARN  PubkyRepo  Failed to restore paykit session, attempting re-sign-in [identity_error, restore Pubky grant session]
12:08:24 WARN  AppViewModel  Failed to refresh public Paykit endpoints [transport_error, publish_paykit_receiver_marker]
12:08:25 ERROR PubkyRepo  Failed re-sign-in recovery [identity_error, approve Pubky auth flow]
12:08:26 INFO  PubkyAuthHandlerRegistrar  MainActivityPubkyAuth -> disabled
12:08:26 INFO  PubkyAuthHandlerRegistrar  MainActivityPubkySignup -> enabled

Identity create earlier the same day: 10:57:29 Created identity for 'pubkyad…xmnjdcy'.

Screenshots from the reporter (Slack): Authorize sheet with pav C tester / ADJN…JDCY; Paykit authorization success; home Your Name; App Status Electrum / Lightning Stopping.

Screenshots

Before — Authorize Before — Paykit granted Before — App Status
Authorize sheet still shows pav C tester / ADJN…JDCY Paykit authorization successful for the same pubky App Status: Electrum could not connect, Lightning Stopping
After — home
Home header is Your Name, profile gone

Bitkit Version

2.4.1 (188) mainnet debug from current master (ahead of the 2.5.0 cut). Package to.bitkit.

Device / OS

Android 17 (API 37), from the support snapshot in the log zip.

Reproducibility

Sometimes (<50%)

Additional context

Activity

  1. added theissue type on Sep 25, 2026
  2. piotr-iohk commented on Sep 25, 2026

    @piotr-iohk
    CollaboratorAuthor
  3. ben-kaufman commented on Sep 25, 2026

    @ben-kaufman
    Contributor

    Reproduced this with an ordinary offline cold start; no Shop interaction or clock change was needed.

    The saved credentials survived, but failed grant restoration/fallback sign-in was treated as a missing identity: cached profile/Paykit data was cleared, signup became available, and reconnecting never retried recovery.

    Updated #1339 to preserve the saved identity and contacts, keep signup disabled for existing identities, and retry on reconnect or foreground from any screen. Recovery is serialized with authorization and teardown so it cannot resurrect a cancelled or deleted session. The equivalent iOS fix is in synonymdev/bitkit-ios#796. Expired or revoked grants still require reauthorization.

    Validation: Android offline restart/reconnect preserved the name and contact and restored the same identity automatically; all 2,911 unit tests passed. iOS passed 196 affected tests plus a final 75-test rerun. Live iOS outage testing remains pending.

    Both fixes are in the open PRs, not released yet. The Electrum/node spinner is separate from this profile-recovery fix.

  4. added this to the 2.6.0 milestone on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions