Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContractClient: default timeoutInSeconds not working #950

Closed
chadoh opened this issue Apr 30, 2024 · 3 comments
Closed

ContractClient: default timeoutInSeconds not working #950

chadoh opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels

Comments

@chadoh
Copy link
Contributor

chadoh commented Apr 30, 2024

Describe the bug
The default timeoutInSeconds is (supposed to be) 10. This is either not getting set correctly, or it needs to be longer. Copying from the comment that @shan-57blocks left at stellar/stellar-cli#1258 (comment):

After upgraded to the latest version of ts-bindings generated by soroban-cli 20.3.4, the signAndSend function always returns txTooLate error. The previous ts-bindings version works fine. (I'm interacting with the example increment contract deployed to testnet). @chadoh Could you please take a look? Thanks.

Here is the demo repo: https://github.com/shan-57blocks/soroban-ts-bindings-playground

Here is the error message:

Error SendFailedError: Sending the transaction to the network failed!
{
  "status": "ERROR",
  "hash": "f2f240838c0718e2e5fe9e156cee9588e7084262e1783f3d1866c2148a82db5a",
  "latestLedger": 1307318,
  "latestLedgerCloseTime": "1714111201",
  "errorResult": {
    "_attributes": {
      "feeCharged": {
        "_value": "1113253"
      },
      "result": {
        "_switch": {
          "name": "txTooLate",
          "value": -3
        }
      },
      "ext": {
        "_switch": 0
      }
    }
  }
}
    at _callee$ (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:56:19)
    at tryCatch (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:21:913)
    at Generator.<anonymous> (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:21:2859)
    at Generator.next (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:21:1550)
    at asyncGeneratorStep (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:22:103)
    at _next (/Users/57block/Documents/projects/huma-soroban-playground/node_modules/@huma/increment/node_modules/@stellar/stellar-sdk/lib/contract_client/sent_transaction.js:23:194)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

What version are you on?
11.3.0

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo created by @shan-57blocks: https://github.com/shan-57blocks/soroban-ts-bindings-playground/tree/main
  2. Exercise the call to incrementClient.increment
  3. See that it times out

I have seen reports that this is happening with other contracts and methods, too. Running against a local network and contract might help with debugging, if it can be reproduced in that context.

Expected behavior
The default timeoutInSeconds should work most of the time.

@Shaptic
Copy link
Contributor

Shaptic commented May 1, 2024

Looks like there's another report of this on Discord. This issue seems mildly urgent: is someone investigating?

@chadoh
Copy link
Contributor Author

chadoh commented May 2, 2024

@Shaptic yes, PR here

@Shaptic
Copy link
Contributor

Shaptic commented May 23, 2024

Fixed in #951

@Shaptic Shaptic closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants