How about the dumpprivkey?
.... unless your wallet is encrypted with passphrase you will need to use the command below to unlock it first before you dump the private key
walletpassphrase "my passphrase" 60
If this does not work maybe you did disable the private key during wallet creation? or this is a descriptor wallet?
This is so weird!
Here is how I proceeded.
1- I launched Bitcoin Core V22
2- Closed all wallets (there was only one)
3- Created a new blank wallet call OutletWallet
4- Launched from Console: importprivkey "Thelongkeywithnumbersandletters" "" false - Worked fine
5- Launched from Console: rescanblockchain - Was long but worked fine
--- At this point I am on V22 and I have a legacy wallet ---
6- Updated to V26 by simply copying all apps from the V26/bin folder
7- Launched Bitcoin Core V26 - the OutletWallet loaded properly and showed proper amount of Sats.
8- Launched the Menu/File/Migrate Wallet - Worked fine
9- Launched the Menu/Settings/Encrypt Wallet. With a passphrase that I wrote down - Worked fine
--- At this point I am on V26 and I have an encrypted descriptor wallet because I Migrated it ---
10- Launched from Console: dumpprivkey. Got: "Only legacy wallets are supported by this command (code -4)"
11- Launched from Console: dumpwallet "OutletWallet". Got: "Only legacy wallets are supported by this command (code -4)"
--- Following your instructions ---
12 - Launched from Console: walletpassphrase "myPassPhrase" 60.
Got "Error: running with an unencrypted wallet, but walletpassphrase was called. (code -15)"
Even though I did encrypt the wallet while on V26 !
So, the OutletWallet is not encrypted and dumpwallet still does not work.
An I can confirm that OutletWallet is a descriptor wallet for the "Menu/File/Migrate Wallet" is grayed/not available.
What I've I done wrong ?
Is it possible that while you are on Version 26, perhaps your wallet is a legacy wallet ?
In this case it could explain why you can dumpprivkey while I cannot.