**RESOLVED** Trezor Connectivity Issue (was: tx-body-file envelope type mismatch)
Closed this issue · 3 comments
$cardano-hw-cli transaction witness --tx-body-file tx.raw
giving an Error: Invalid file contents of tx-body-file
Format of tx.raw as generated by cardano-cli (1.35.4) transaction build is:
{ "type": "Unwitnessed Tx BabbageEra", "description": "Ledger Cddl Format", "cborHex": " xxxx" }
cardano-cli transaction witness works for tasks not requiring -- hw-signing-file argument.
For tasks requiring --hw-signing-file argument, tried cardano-hw-cli versions 1.9.1, 1.10.0, 1.11.0, and 1.12.0 all provided same result --> 'Error: Invalid file contents of tx-body-file' (output of cardano-cli transaction build ).
Tried building raw transaction file with cardano-cli (1.35.4) transaction and '--cddl-format' flag , but generated same output no difference between output files.
Thanks,
Smitty
Cardano App 5.0.0 ?
Do you have NativeAssets on that address? Run the autocorrection for canonical order before you pass the cddl-raw to the signing.
UPDATE/RESOLVED -- Worked after several attempts. I'll update the subject line as I no longer believe this is a file formatting issue but a connectivity issue.
Further info:
When running cardano-hw-cli transaction witness
while witnessing cardano-cli transaction output file for multi-wallet stakepool operation was receiving: Error: Invalid file contents of tx-body-file
Solution, re-ran cardano-hw-cli transaction witness
command multiple times while troubleshooting and connectivity to Trezor was established. Troubleshooting included modifying the transaction raw "type" attribute. I ran the command with the wrong "type" file (ie "type": "TxBodyBabbage") to force another error and when I changed back to the original "type" config (ie "type": "Unwitnessed Tx BabbageEra") the command completed successfully -- successfully completed multiple times with no error. No other parameters were modified (other than rebuilding the files, but the files rebuilt the same each time per diff and sha256sum)
Operating Parameters:
- Device: Trezor T
- TrezorSuiteVersion 22.12.1 (latest at time of writing)
- Trezor app version 2.5.3 (from
cardano-hw-cli device version
output) - New Pledge Wallet did have native-assets, but after removing them it had no impact on output files
cardano-hw-cli transaction transform
reportedThe transaction CBOR is valid and canonical
- This command did remove a trailing carriage return
- Building the transaction on the node with the
--cddl-format
flag had no impact on out-file
Thanks,
Smitty
Hey @dynopool, there is no need for the TrezorSuite if you run it via the cli. You only need the TrezorBridge installed. I have written it up here: https://github.com/gitmachtl/scripts/tree/master/cardano/mainnet#how-to-prepare-your-system-before-using-a-hardware-wallet
Trezor Bridge v2.0.27 is still working fine for me.
As long as the udev rules are right for your current user you should be fine. Please try it.