Deregistering stake address ERROR "StakeKeyNonZeroAccountBalanceDELEG"

Hi all,
Attempting to retire a stake address, im getting an error that im having trouble understanding when i go to submit the transaction:

Submitting the transaction via the node... Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeKeyNonZeroAccountBalanceDELEG (Just (Coin 679)))))])

i have looked up what StakeKeyNonZeroAccountBalanceDELEG means in Shelley-Spec-Ledger-STS-Deleg.html

data DelegPredicateFailure eraSource#

Constructors

StakeKeyAlreadyRegisteredDELEG !(Credential 'Staking era)	 
StakeKeyInRewardsDELEG !(Credential 'Staking era)	
StakeKeyNotRegisteredDELEG !(Credential 'Staking era)	 
StakeKeyNonZeroAccountBalanceDELEG !(Maybe Coin)	 
StakeDelegationImpossibleDELEG !(Credential 'Staking era)	 
WrongCertificateTypeDELEG	 
GenesisKeyNotInMappingDELEG !(KeyHash 'Genesis (Crypto era))	 
DuplicateGenesisDelegateDELEG !(KeyHash 'GenesisDelegate (Crypto era))	 
InsufficientForInstantaneousRewardsDELEG !MIRPot !Coin !Coin	 
MIRCertificateTooLateinEpochDELEG !SlotNo !SlotNo	 
DuplicateGenesisVRFDELEG !(Hash (Crypto era) (VerKeyVRF (Crypto era)))	

Indicates that the stake key is somehow already in the rewards map. This error is now redundant with StakeKeyAlreadyRegisteredDELEG. We should remove it and replace its one use with StakeKeyAlreadyRegisteredDELEG.

https://input-output-hk.github.io/ouroboros-network/shelley-spec-ledger/Shelley-Spec-Ledger-STS-Deleg.html#t:DelegPredicateFailure

am i assuming there are some rewards still attached to this staking address that have not been claimed? if so, i cant actually see any rewards on this address, so im a little confused.

can anyone shed some light?

edit: I think “(Coin 679)” is the rewards attached to this address – I just did a “stake-address-info” and gives me rewardsBlanace of 679

1 Like

Check on cardanoscan.io if the stake address has any balance available to withdraw… if yes please withdraw the rewards first and after that deregister it

Use this guide to withdraw the rewards

Cheers,

Ah yes, turns out I’m blind " Rewards Available 0.000679"

Thanks Alex! :smiley:

1 Like

you’re welcome.