near-cli icon indicating copy to clipboard operation
near-cli copied to clipboard

Transaction expired on sending new transaction

Open ilblackdragon opened this issue 3 years ago • 2 comments

Describe the bug Running transaction resulted in the error that transaction expired. Resending this transaction worked fine.

 $
 near call genesis.$CONTRACT_ID add_proposal "{\"proposal\": {\"description\": \"new token\", \"kind\": {\"FunctionCall\": {\"receiver_id\": \"dev-1620916433192-4733251\", \"method_name\": \"create_token\", \"args\": \"$ARGS\", \"deposit\": \"0\", \"gas\": 10000000000000 }}}}" --accountId testmewell.testnet --amount 1

Scheduling a call: genesis.dev-1620913391476-9574024.add_proposal({"proposal": {"description": "new token", "kind": {"FunctionCall": {"receiver_id": "dev-1620916433192-4733251", "method_name": "create_token", "args": "eyJhcmdzIjogeyJvd25lcl9pZCI6ICJ0ZXN0bWV3ZWxsLnRlc3RuZXQiLCAidG90YWxfc3VwcGx5IjogIjQwMDAwMDAwMDAwMDAwMDAwMDAwMDAiLCAibWV0YWRhdGEiOiB7InNwZWMiOiAiZnQtMS4wLjAiLCAibmFtZSI6ICJUZXN0IiwgInN5bWJvbCI6ICJURVNUIiwgImljb24iOiAiIiwgImRlY2ltYWxzIjogMTh9fX0K", "deposit": "0", "gas": 10000000000000 }}}}) with attached 1 NEAR
 An error occured
 Expired <span class="error">[Error]</span>: Transaction has expired
 at Object.parseRpcError (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:28:19)
 at JsonRpcProvider.sendJsonRpc (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/providers/json-rpc-provider.js:146:40)
 at processTicksAndRejections (internal/process/task_queues.js:94:5)
 at async /usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:100:32
 at async Object.exponentialBackoff <span class="error">[as default]</span> (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
 at async /usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:98:32
 at async Object.exponentialBackoff <span class="error">[as default]</span> (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
 at async Account.signAndSendTransaction (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:94:24)
 at async scheduleFunctionCall (/usr/local/lib/node_modules/near-cli/commands/call.js:38:34)
 at async Object.handler (/usr/local/lib/node_modules/near-cli/utils/exit-on-error.js:39:9) {
 <span class="error">[stack]</span>: 'Error: Transaction has expired\n' +
 ' at Object.parseRpcError (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/rpc_errors.js:28:19)\n' +
 ' at JsonRpcProvider.sendJsonRpc (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/providers/json-rpc-provider.js:146:40)\n' +
 ' at processTicksAndRejections (internal/process/task_queues.js:94:5)\n' +
 ' at async /usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:100:32\n' +
 ' at async Object.exponentialBackoff <span class="error">[as default]</span> (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)\n' +
 ' at async /usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:98:32\n' +
 ' at async Object.exponentialBackoff <span class="error">[as default]</span> (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)\n' +
 ' at async Account.signAndSendTransaction (/usr/local/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:94:24)\n' +
 ' at async scheduleFunctionCall (/usr/local/lib/node_modules/near-cli/commands/call.js:38:34)\n' +
 ' at async Object.handler (/usr/local/lib/node_modules/near-cli/utils/exit-on-error.js:39:9)',
 <span class="error">[message]</span>: 'Transaction has expired',
 type: 'Expired',
 context: ErrorContext 

 { transactionHash: '3Ea6yRYJJKCzDHkKi87du2SRdkWqcaVgNto4FUytb2bb' } 

}
 We attempted to send transaction 3Ea6yRYJJKCzDHkKi87du2SRdkWqcaVgNto4FUytb2bb to NEAR, but something went wrong.
 To see the transaction in the transaction explorer, please open this url in your browser
 [https://explorer.testnet.near.org/transactions/3Ea6yRYJJKCzDHkKi87du2SRdkWqcaVgNto4FUytb2bb](https://explorer.testnet.near.org/transactions/3Ea6yRYJJKCzDHkKi87du2SRdkWqcaVgNto4FUytb2bb)
 Note: if the transaction was invalid (e.g. not enough balance), it will show as "Not started" or "Finalizing"

ilblackdragon avatar May 13 '21 14:05 ilblackdragon

met the same issue.

The error Transaction has expired happens quite often on testnet recently

think-in-universe avatar May 19 '21 17:05 think-in-universe

Met the same problem. Is this issue solved now?

LBruyne avatar Mar 13 '22 07:03 LBruyne