Import wallet error on already imported wallet #947

Open
opened 2026-10-01 20:27:25 +00:00 by PraneethGunas · 2 comments
PraneethGunas commented 2026-10-01 20:27:25 +00:00 (Migrated from github.com)
Image

The main message can improve while the footnote makes sense. I guess the message could be a bit more user friendly.

<img width="912" height="809" alt="Image" src="https://git.fish.foo/attachments/856335b2-99a4-4af0-b8b7-9f13b99a8c45" /> The main message can improve while the footnote makes sense. I guess the message could be a bit more user friendly.
hebasto commented 2026-10-01 21:54:55 +00:00 (Migrated from github.com)

cc @GBKS

cc @GBKS
jarolrod commented 2026-11-05 17:50:43 +00:00 (Migrated from github.com)

Two additional cases for the import-error handling here, reproduced on qt6 at d567e3eb2497, macOS / Qt 6.9.0, using disposable regtest wallets.

A valid backup needs missing block history, but the main message questions the backup

  1. Create and fund a wallet, then save a backup.
  2. Confirm that the backup restores successfully.
  3. Advance the chain and prune the blocks needed to rescan that backup.
  4. Import the same backup through Add wallet → Import wallet.

Core correctly rejects the restore because the required historical blocks are unavailable. The GUI’s main description instead tells the user to check that the file is a valid backup and try another file. The only action is Choose another file.

Core’s actual explanation—including the need to reindex—is present in the smaller help text, but the primary message and action suggest the wrong recovery.

In the reproduction, the backup was saved at height 106. After mining to 706 and pruning, the node’s prune height was 249. The original backup then failed to restore, while a fresh backup of the same wallet imported successfully. The original backup remained unchanged.

Please make the missing-history requirement the primary diagnosis and explain the appropriate recovery. Changing the message will not itself make the restore succeed.

A filename containing “migration” changes the diagnosis of an existing destination

  1. Save a current SQLite descriptor-wallet backup as audit_migration_73.bak.
  2. Restore it as audit_migration_73, then unload it while leaving its directory on disk.
  3. Import the same backup through the GUI.

The page says This wallet needs to be migrated, although the actual failure is that the destination database already exists. It also replaces the useful database-exists detail with migration guidance.

Using identical backup bytes under a neutral name, with the corresponding destination already present, produces the generic import error and retains the database-exists detail.

The classifier matches migrat anywhere in Core’s error string, including the wallet path. Wallet names should not determine the reported format or recovery action. Both cases need the underlying failure preserved and presented accurately.

Two additional cases for the import-error handling here, reproduced on `qt6` at `d567e3eb2497`, macOS / Qt 6.9.0, using disposable regtest wallets. **A valid backup needs missing block history, but the main message questions the backup** 1. Create and fund a wallet, then save a backup. 2. Confirm that the backup restores successfully. 3. Advance the chain and prune the blocks needed to rescan that backup. 4. Import the same backup through **Add wallet → Import wallet**. Core correctly rejects the restore because the required historical blocks are unavailable. The GUI’s main description instead tells the user to check that the file is a valid backup and try another file. The only action is **Choose another file**. Core’s actual explanation—including the need to reindex—is present in the smaller help text, but the primary message and action suggest the wrong recovery. In the reproduction, the backup was saved at height 106. After mining to 706 and pruning, the node’s prune height was 249. The original backup then failed to restore, while a fresh backup of the same wallet imported successfully. The original backup remained unchanged. Please make the missing-history requirement the primary diagnosis and explain the appropriate recovery. Changing the message will not itself make the restore succeed. **A filename containing “migration” changes the diagnosis of an existing destination** 1. Save a current SQLite descriptor-wallet backup as `audit_migration_73.bak`. 2. Restore it as `audit_migration_73`, then unload it while leaving its directory on disk. 3. Import the same backup through the GUI. The page says **This wallet needs to be migrated**, although the actual failure is that the destination database already exists. It also replaces the useful database-exists detail with migration guidance. Using identical backup bytes under a neutral name, with the corresponding destination already present, produces the generic import error and retains the database-exists detail. The classifier matches `migrat` anywhere in Core’s error string, including the wallet path. Wallet names should not determine the reported format or recovery action. Both cases need the underlying failure preserved and presented accurately.
Sign in to join this conversation.
No description provided.