Repository navigation
[Bug]: Pubky profile falls back to "Your Name" after Shop Paykit setup #1344
Description
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
- Install current-master mainnet debug (
2.4.1 (188),to.bitkit). Enable Paykit UI. - Fresh wallet. Create a Pubky profile in Bitkit (Homegate). Confirm the header shows the name.
- On shop.pubky.app, use that identity for seller Bitcoin / Paykit setup and approve the grant in Bitkit.
- Leave the app / restart later (here: ~1 hour, then a process start at 12:07).
- 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 |
|---|---|---|
![]() |
![]() |
![]() |
| After — home |
|---|
![]() |
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
- New wallet, mainnet, no funds / no channels.
- Related: Paykit: recover stale sessions and harden coroutine error handling #1093 (stale Paykit
identity_error, no recovery). This report is the Shop grant-session restore path plus UI dropping the profile. - Related: 2.5.0 mainnet QA: node start doesn't recover from transient network failures; WALLET backup blocked by legacy Pubky session #1252 for the Electrum / node-start spinner. Not filed as a second issue.
- Reported while testing Bitcoin seller setup on shop.pubky.app.




Activity
piotr-iohk commentedon Sep 25, 2026
FYI: @ben-kaufman
cc: @thisispav
ben-kaufman commentedon Sep 25, 2026
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.