hedera-sdk-js: Fail with gRPC Proxy executing Trx FrontEnd and don't redirect to another one

Description

After 2555 NFTs minted in Mainnet (255 Batches and each batch is based on: Transaction sending Hbar + Transactions of Minting NFTs, in total 510 Transactions has been executed), directly from the browser (It means the Transaction don’t get executed in BackEnd), It gets executed directly in the FrontEnd via gRPC + Proxies, we got a 503 in the Node04 of Swirlds (We have a work around to retry 3 times to get the receipt, although I thought you guys fixed this last time we opened the issue. As far as I thought the SDK would directly rebalance to an operative Proxie & Node, but as I can see It’s not working as expected. After my 3 retries the execution is cut by throwing an Error.

Also after this, we got the same Error than we reported 2-3 months ago, that you guys weren’t able to reproduce it. Transaction must have been frozen before calculating the hash will be stable, try callen freeze

This is something critical for Kabila App, since we’re providing this services and our customers are having troubles with it.

image image

Steps to reproduce

let mintTx = new TokenMintTransaction()
    .setMaxTransactionFee(new Hbar(maxFee))
    .setTokenId(tokenId);
    .setMetadata(metadata);
   mintTx.freezeWith(client);
   const mintTxSign = await mintTx.sign(supplyKey);
   const mintTxResponse =  await mintTxSign.execute(client);
   const receipt = await mintTxResponse.getReceipt(client);
    
   let txTransfer = new TransferTransaction()
     .setMaxTransactionFee(new Hbar(maxFee))
     .setTransactionMemo(memo)
     .addHbarTransfer(account1, hbarAmount.negated()) 
     .addHbarTransfer(account2, hbarAmount);
   const mintTxResponse = await txTransfer.execute(client);
   const receipt = await txSubmit.getReceipt(client);

Additional context

No response

Hedera network

mainnet

Version

2.20.0

Operating system

Windows

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

@AdriMsM91 Hello, I will close the issue.

I don’t think so @ochikov sometimes we have minted 8,000 NFTs without any problem in Mainnet, sometimes we have problems with 2.5k and the process is exactly the same, also differents customers have the same problem.

Hello @AdriMsM91, I’ve spent the weekend investigating the two bugs reported above:

  • About the bug reported for retries when we hit the Node with partial outage (Node 4 with NodeAccoundID 7), I am applying a couple of screenshots with the retrying visualised (transfer and receipt retries):
Screenshot 2023-03-26 at 22 42 05 Screenshot 2023-03-26 at 22 54 17 Screenshot 2023-03-26 at 22 54 57 Screenshot 2023-03-26 at 22 42 09 Screenshot 2023-03-26 at 22 52 51 Screenshot 2023-03-26 at 22 53 47 Screenshot 2023-03-26 at 23 02 23 Screenshot 2023-03-26 at 23 03 13

You can see from the images provided that no matter the error, by default we’ve got 10 max retries and we are retrying and getting the receipt. On some of the screenshots we are retrying 2-3 times, and on some 5-6 times. The screenshots are taken from React App and Node.js App.

  • About the second problem Transaction must have been frozen before calculating the hash will be stable, try callen freeze I was able only to reproduce it randomly during the weekend. It starts to happen only when my laptop is going to sleep or I left it unattended and the display is off. I tried a large number of times and this is the way to reproduce it.
Screenshot 2023-03-27 at 0 01 56

I will continue to dig it today.