hedera-sdk-js: Error: 13 INTERNAL: Received RST_STREAM with code 0

Description

This error occurred randomly when making a transfer transaction or token association. I tried to wrap the transaction in a retry loop with a delay of 6000 ms but still having the same result. Should I override the behavior with .setNodeAccountIds() on retry when this error occurred ?

Steps to reproduce

/* Retry the Associate Function 4 times with 6000 ms of delay between each */
   this.retryOperation(this.associate(accountId, tokenId, client, privateKey), 6000, 4)
/* Function to Associate a Token */
    async associate(accountId, tokenId, client, privateKey) {
        // Associate a token to an account
        const tx = new TokenAssociateTransaction()
            .setAccountId(accountId)
            .setTokenIds([tokenId])
            .freezeWith(client);

        // Sign with the private key of the account that is being associated to a token
        const signTx = await tx.sign(await PrivateKey.fromString(privateKey));

        // Submit the transaction to a Hedera network
        const txResponse = await signTx.execute(client);

        // Request the receipt of the transaction
        const receipt = await txResponse.getReceipt(client);

        // Get the transaction consensus status
        const transactionStatus = receipt.status;
    }

Additional context

No response

Hedera network

mainnet

Version

v2.0.30

Operating system

Linux

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (17 by maintainers)

Most upvoted comments

@derdis14 @scalemaildev @tim-dewit I believe the reason you hit those errors was because the network was down during the weekend.

@topshef Have you tried using version 2.3.0 or 2.4.1? I believe this is when this issue was resolved. For any version before those you’d need to remove the nodes from the network manually.

btw is there a way to read the list of operational nodes from status.hedera.com eg is this part of the webhook or feeds, any docs or tips welcome thanks!

Unfortunately, I this is not possible right now. However, we are currently working on implementing support for multiple IPs per node account ID which would then allow us to use the full network from Hedera instead of just one IP per node account ID. This would then allow us to at the very least hard code the entire network from status.hedera.com