Why TRON gettransactioninfobyid returns {}
Last updated:
At a glance
| Property | Value |
|---|---|
| What you get back | {} with HTTP 200 — not a receipt and not an error |
| Block time | 3 seconds |
| Solidified (irreversible) | At least 19 of 27 active super representatives built on the block |
| /wallet vs /walletsolidity | Latest head (may not be solidified) vs latest solidified block |
| ID format | Transaction hash in hex, no 0x prefix |
What you see
You broadcast a TRON transaction, take its txID and call wallet/gettransactioninfobyid (or walletsolidity/gettransactioninfobyid). The response is HTTP 200 with {} — no error field, no receipt, no block number.
Why this happens
gettransactioninfobyid returns the execution information — fee and block height — of a transaction that is already in a block. Until then there is nothing to return, and the answer is an empty object rather than an error. TRON produces a block every three seconds, so a freshly broadcast transaction usually needs a short wait. There are two views of the chain: /wallet endpoints read the latest head visible to the node, which may not be solidified yet, while /walletsolidity endpoints read state at the latest solidified block, so they lag behind the head. A block is solidified — irreversible — once at least 19 of the 27 active super representatives have produced blocks at or above its height, so the solidity variant can still answer {} for a transaction the /wallet variant already reports. The ID itself is the transaction hash in hex without a 0x prefix; other shapes do not match. And Mainnet, Shasta and Nile are separate networks, so a testnet transaction ID has no information on Mainnet.
What to do
- Check the ID: exactly 64 hex characters, no 0x prefix.
- Poll wallet/gettransactioninfobyid for a few blocks after broadcasting before concluding anything; switch to the walletsolidity variant only when you need irreversibility, and expect it to lag behind.
- When the outcome matters, follow TRON's own confirmation order: walletsolidity/gettransactionbyid to confirm the transaction is in the solidified chain, then walletsolidity/gettransactioninfobyid for its solidified receipt. If nothing appears after the solidity views have caught up, the broadcast did not make it into a block.
- Confirm the network: a transaction broadcast on Nile or Shasta is not visible on mainnet.
When this is not our problem
The empty object is how TRON's native wallet API reports "no execution result yet" on every full node, whichever provider runs it — Triport included. Waiting for inclusion or solidification is the only way to change the answer.
FAQ
- Does an empty gettransactioninfobyid response mean my TRON transaction failed?
- No. It means the node has no execution result for that ID yet. A failed transaction that was included in a block has execution information with a failure result.
- Why does walletsolidity return {} when wallet already returns data?
- /walletsolidity endpoints read state at the latest solidified block, which lags behind the head; /wallet endpoints read the latest head, which may not be solidified yet.