How to resolve ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure (InvalidWitnessesUTXOW error

hello, when I sign transaction, I have got this error
""transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (WrappedShelleyEraFailure (InvalidWitnessesUTXOW [VKey (VerKeyEd25519DSIGN \"cf949f966b426f25db11b6062edc31312001e3cd0ced4c6c7db3da7b5ac9766b\")])))])""

what is this error?

--alonzo-era \
--testnet-magic 1 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#0 \
--tx-in dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1  \
--tx-in 61b88efd41ccbb0e71c48aca2cbe63728078ec7fb20ec9c27acfe33d0647248d#0 \
--tx-in-script-file /cardano/plutus/direct-sale.plutus \
--tx-in-datum-file /cardano/temp/testnet/datums/list.json \
--tx-in-redeemer-file /cardano/temp/testnet/redeemers/buy.json \
--required-signer-hash 2be4a303e36f628e2a06d977e16f77ce2b9046b8c56576bb5286d1be \
--tx-in-collateral dbf7f56f844cc4b85daccb62bedf4eeff0a84cb060f0f79b206c7f087b3f0ba1#1 \

... some txout ...

--change-address addr_test1qq47fgcrudhk9r32qmvh0ct0wl8zhyzxhrzk2a4m22rdr0sqcga2xfzv6crryyt0sfphksfr947jjddy3t4u0qwfmmfq2h0pj8 \
--protocol-params-file /cardano/testnet/protocol-parameters.json \
--mint "2 20edea925974af2102c63adddbb6a6e789f8d3a16500b15bd1e1c32b.4143544956495459" \
--mint-script-file /cardano/plutus/activity-minter.plutus \
--mint-redeemer-file /cardano/redeemers/mint.json \
--invalid-before 19059345 \
--invalid-hereafter 19059495 \
--out-file ./tx.raw

I have built transaction at nodejs. and wanted to sign at browser by using nami wallet.
When I sign at nodejs by using .skey, it was worked

Hi,

It is an issue with witnesse file which sign the transaction… (payment.skey/payment.vkey)
check if these keys belong to the payment address

The command should be

cardano-cli address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment1.addr \
    --mainnet
cat payment1.addr

But u don’t run a cli node so I can’t tell u how to check

Cheers

when run on terminal with skey, vkey, transaction sign and submit worked.
but after transaction build, I wanted to sign at browser with nami wallet but when sign at browser, the error was happened.

Ok, but on cardano node (cli) u have an address inside payment.addr and the payment.skey/vkey for that address… Nami is using single address mode by default?
If u go on nami to receive section do u see same address as payment.addr?

Cheers,

no, nami wallet display extend address. it is so long than address of payment.vkey.
How to make nami wallet to address of payment.vkey?

ok, check the address from base.addr file then

This is nami wallet address

addr_test1qrccj0j5zl375ztpfc6pc5vxyr6jju7v2l8j63x678hjmqqp85deq2rdevt3ghn7ze9jnjczy8at8ay5tv56q2n6zdrqg0k6te

And this is verification key file address.

addr_test1vrccj0j5zl375ztpfc6pc5vxyr6jju7v2l8j63x678hjmqqudt29l

How to sign with Nami wallet as payment.vkey file?

But on cli node did u imported the nami wallet?

yes. used this.

https://gist.github.com/cardano-apexpool/99784308812bdf7aa01446fa95f47fd2

10000 ADA was received from cardano faucet by using nami wallet address.
After export name wallet to payment.vkey, I request faucet with payment.vkey address.
so, at the nami wallet, the balance is 20000.

If I sign with payment.vkey address by using name wallet, I think, the issue will be resolved.
What is solution?

From your messages in IOG’s Discord I gather that you are using Mesh SDK for the browser part?

Do you build the transaction on the command line and then just import it into Mesh? How? And why?

Or do you build a similar transaction with the means available in Mesh? How?

It would really help to see the Javascript code that you are trying to execute (as completely as poosible if it is not too much).

To your transaction:

You cannot use the same input as input and at the same time as collateral.

What do you do this for? As far as I can see, that is the pubkey hash of the address of the inputs. That is a required signer, anyway. At best, it’s superfluous to require it again.

That input is not available anymore. It has already been spent by this transaction: https://preprod.cardanoscan.io/transaction/61d80adf8b6d49b347da64382d8f355cf9c513593eb256d6ad136aec6f4c63d7?tab=utxo

thank you for your reply.
But it was worked at terminal. it does not work at browser only.

Do you build the transaction on the command line and then just import it into Mesh? How? And why?

Yes, I am building transaction on the command line and then getting cborHash at frontend.
And I am going to sign with widnow.cardano.signTx at javascript.
But getting error as I mentioned at title.

And why? Shouldn’t the frontend be able to do it itself in the end?

If you already use Mesh, why don’t you use Mesh’s functions for managing the signature? https://meshjs.dev/apis/transaction
(In one of your messages in Discord it actually looked like that is what you are doing. Don’t understand why you are back at window.cardano.signTx now.)

Also: The functions directly in window.cardano are Nami’s old API that has been deprecated for a year. The CIP-30 API, also available with all the other wallet apps should really be used instead: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0030

Mesh also wraps this in an API that is maybe easier to use: https://meshjs.dev/apis/browserwallet

If you use the low-level window.cardano.signTx or CIP-30’s api.signTx, what you get back is only a (partial) witness set and it has to be assembled with the original transaction to form a signed transaction. Mesh seems to do that internally in its signTx.

It would really help if you could tell which examples, guides, how-tos you follow, and what your code that you made of it currently looks like.

When you just throw error messages at us, it is all just guess work.