TX Help - Unable to send transaction errors

Hello! I am experiencing the same issue.

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Mainnet (KeyHashObj (KeyHash "ce504498a6fg56745fa7004c2183a276d56379bafas72c74255b4b97d0474886")) StakeRefNull,Value 19 (fromList []),SNothing)])))])

I’m trying to send 1 ADA (minus the fee of 175,181 Lovelace) so a total of 824,819 Lovelace to be sent.

Is there a minimum value? I want to zero out some accounts and consolidate. Don’t want to leave a single Lovelace behind!

1 Like

1 ADA + fee is the minimum amount, if I remember well

Whoa that’s crazy! So that means there’ll be lots of instances where there will be UTXOs <1 ADA over the years. Lots of TxHashes that can never be cleared out like my example above.

I understood in the past that this “issue” will be fixed, but no dates for the moment

1 Like

Having same issue following cashew instructions.

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO

So the solution is to calculate a gas fee? is the gas fee that -fee 174697 value?..and where did that number come from? Guess I’m not understanding the details of the said solution?

I scripted the tx.raw generation based on the Cashew instructions.
Do any of you see any issues with the command execution that could be resulting in a tx.raw file that would cause that error when signed and sent?

currentSlot=$(cardano-cli query tip --mainnet | jq -r ‘.slot’)
echo Current Slot: $currentSlot

cardano-cli query utxo --address $(cat payment.addr) --mainnet > fullUtxo.out

tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out

cat balance.out

tx_in=""
total_balance=0
while read -r utxo; do
in_addr=$(awk ‘{ print $1 }’ <<< “${utxo}”)
idx=$(awk ‘{ print $2 }’ <<< “${utxo}”)
utxo_balance=$(awk ‘{ print $3 }’ <<< “${utxo}”)
total_balance=$((${total_balance}+${utxo_balance}))
echo TxHash: ${in_addr}#${idx}
echo ADA: ${utxo_balance}
tx_in="${tx_in} --tx-in ${in_addr}#${idx}"
done < balance.out

txcnt=$(cat balance.out | wc -l)
echo Total ADA balance: ${total_balance}
echo Number of UTXOs: ${txcnt}

stakePoolDeposit=$(cat $NODE_HOME/params.json | jq -r ‘.stakePoolDeposit’)
echo stakePoolDeposit: $stakePoolDeposit

cardano-cli transaction build-raw ${tx_in} --tx-out $(cat payment.addr)+0 --invalid-hereafter $(( ${currentSlot} + 10000)) --fee 0 --out-file tx.tmp --certificate stake.cert

fee=$(cardano-cli transaction calculate-min-fee --tx-body-file ./tx.tmp --tx-in-count ${txcnt} --tx-out-count 1 --mainnet --witness-count 2 --byron-witness-count 0 --protocol-params-file ./params.json | awk ‘{ print $1 }’)
echo fee: $fee

txOut=$((${total_balance}-${stakeAddressDeposit}-${fee}))
echo Change Output: ${txOut}

cardano-cli transaction build-raw ${tx_in} --tx-out $(cat payment.addr)+${txOut} --invalid-hereafter $(( ${currentSlot} + 10000)) --fee ${fee} --certificate-file stake.cert --out-file tx.raw

I have the same problem with the same instructions, after updating everything to 1.33.0, and going back through my scripts for the 100th time. I am stuck…
this is the error:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutsideValidityIntervalUTxO (ValidityInterval {invalidBefore = SNothing, invalidHereafter = SJust (SlotNo 10000)}) (SlotNo 50581813))))])

and this is the tx.signed

{
    "type": "Tx AlonzoEra",
    "description": "",
    "cborHex": "84a70082825820c2a011032ff72b91a2b45f1cbce94941be06b5bcbaca12546a9ab8c8264c59c107825820e9192ef37a99f6fa392e39525c7e9cdc0d7a4be6>
}

1.22.0 ? last version is 1.33.0

This looks like you should look at your --invalid-hereafter parameter. It’s saying that the transaction is only valid until slot 10000 (which is way in the past).

If you used something like --invalid-hereafter $(( ${currentSlot} + 10000)) in the post above yours, make sure that $currentSlot is really set to the current slot at the tip.

yes sorry, was a Typo. thanks for the catch,

Thanks, ill check that and report back.

yes that was a great clue to the problem I had, in the Coincashew guide, they have the same line as you. but I found I needed to remove the space on both sides of the + to make the calculation correct, weird, but did solve it after a little bit of testing, Thanks

2 Likes

Good that you solved it!

Strange. In bash and sh it seems to work with spaces:

$ currentSlot=50000000
$ echo $(( ${currentSlot} + 10000 ))
50010000

Which shell do you use?

xterm with zsh. so not sure if anything odd.

Works with zsh, here, also:

leeloo% currentSlot=50000000
leeloo% echo $(( ${currentSlot} + 10000 ))
50010000

Since it’s solved for you for now, probably nothing to worry about, but perhaps keep in mind, in case something like that comes along again.

I also used the CoinCashew guide.
Deleting the spaces around the plus sign also solve this error for me.
--invalid-hereafter $(( ${currentSlot}+10000)) \
Thank you

1 Like

Hello, I’m getting this error trying to update the pledge. I have used this script multiple times to update the pool info. I have enough ADA in my payment address.

ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 60013563730 (fromList [(PolicyID {policyID = ScriptHash “f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a”},fromList [(62726577,1)])])) (Value 60013563730 (fromList )))))])

Total ADA balance: 60013563730
fee: 204661
txOut: 60013359069

You have an NFT on one of the UTxOs of that address. The usual copy and paste scripts cannot deal with NFTs and other native tokens.

You will have to craft a transaction sending it away by hand.

That’s exactly what it is. I recently sent the SPO ada handle to the wallet. Is there a document to do so manually?

This could maybe help: https://developers.cardano.org/docs/native-tokens/minting#sending-token-to-a-wallet
(Although it uses build-raw, while build is much easier.)

I have described it for another user, here: https://forum.cardano.org/t/transaction-submit-error-fails-to-send/106340/13?u=heptasean

Thank you, your answer to the other user helped.
In case anyone else runs into this issue, here’s what I did. (I know there is a better method)

The issue is there’s an NFT in the pledge wallet, in my case its the Ada Handle for SPOs.

From the Coincashew Guide:
Updating Stake Pool Information - CoinCashew

After querying the utxo balance, cat balance.out
You will notice one of the utxos has a policy ID. Calculate the total balance - the utxo with the policy ID.

Invalid hereafter

cardano-cli transaction build-raw \
    ${tx_in} \   -------- here you will manually enter (or create a variable) for the utxos from the balance.out file - the nft utxo (In my case I had two --tx-ins)
    --tx-in (utxo hash#) \
    --tx-in (utxo hash#) \
    --tx-out $(cat payment.addr)+${total_balance} \
    --invalid-hereafter $((${currentSlot}+10000)) \
    --fee 0 \
    --certificate-file pool.cert \
    --certificate-file deleg.cert \
    --out-file tx.tmp

Calculate Minimum Fee

fee=$(cardano-cli transaction calculate-min-fee \
    --tx-body-file tx.tmp \
    --tx-in-count ${txcnt} \  For ${txcnt}, enter the number of utxos - nft utxo
    --tx-out-count 1 \
    --mainnet \
    --witness-count 3 \
    --byron-witness-count 0 \
    --protocol-params-file params.json | awk '{ print $1 }')
echo fee: $fee

Change Output

txOut=$((total utxo calculation from above-${fee}))  
echo txOut: ${txOut}

Build the Transaction

cardano-cli transaction build-raw \
    --tx-in (from above)
    --tx-in (from above)
    --tx-out $(cat payment.addr)+${txOut} \
    --invalid-hereafter $((${currentSlot}+10000)) \
    --fee ${fee} \
    --certificate-file pool.cert \
    --certificate-file deleg.cert \
    --out-file tx.raw

Complete the steps for signing & submitting.
I know there’s an easier way to do this, but for now, this is what I did to submit the transaction.