Error when querying the balance of an address on testnet

Hello, I am following the stake pool course and have found a road block. Under the transactions section → generating permanent keys and address, I am unable to query the balance. I am receiving the following error:
Shelley command failed: query utxo Error: A query from a certain era was applied to a ledger from a different era: EraMismatch {ledgerEraName = "Byron", otherEraName = "Allegra"}

The command I ran was:

cardano-cli query utxo \
–address $(cat payment.addr) \
–testnet-magic 1097911063 \
–allegra-era

I verified that all the steps on the documentation were followed properly. Does anyone here have a clue of what may be causing this issue?

Hello,

Being in Mary era, u will need to add the subcommand --mary-era to ur command

Cheers,

Hi @Alexd1985,

I tried your suggestion and got:

Shelley command failed: query utxo Error: A query from a certain era was applied to a ledger from a different era: EraMismatch {ledgerEraName = “Byron”, otherEraName = “Mary”}

What command did u ran? Can u share it?

Sure,

cardano-cli query utxo \
–address $(cat payment.addr) \
–testnet-magic 1097911063 \
–mary-era

Can u try with Mary-era? Perhaps it’s case sensitive…

Thanks,

After reading similar posts, discovered that the pool needed to sync completely before being able to access that transaction. I left the server running over night and boom! it’s working now. Thanks.

2 Likes

Hi@MIkko ,
Which command worked after the pool synced?

[quote=“MIkko, post:5, topic:50532”]
cardano-cli query utxo
–address $(cat payment.addr)
–testnet-magic 1097911063
–mary-era
[/quote] this worked for me as well! Thanks!

yea needs to be mary now that we have “forked” over

1 Like

That command you posted. It’s to query the blockchain.

cardano-cli query utxo \
--address $(cat payment.addr) \
--testnet-magico OR --mainnett \
--mary-era

The payment.addr is the address you make with the keys when creating your stake pool.

1 Like