[SOLVED] Polygon testnet - Tx in pending

Hello,
I have problem with communication with Polygon testnet. I have tried to send transaction for deployment of smartcontracts and interacting with my smartcontracts and for all transactions I get transaction hash but the transaction stay in pending state with message “This txn hash was found in our secondary node and should be picked up by our indexer in a short while.” Here is one of my Txs “0x425c464734ddfe65fb969a5baac5334101b954d708f9e8dfff4a7e129d18c0c5”.
I use the nethereum framework with automatic gas price and I have tried to add gas price manually and anythink does not have any impact. If I use your same RPC url in Metamask, the transaction was processed success. I use SpeedyNode endpoind for communication.
And the code and transactions worked a week ago. I have tried it yesterday and today with these problems.

Can you help me? Is it problem on polygon site or on Moralis servers or on my?

Thanks.

What do you see in a block explorer for that transaction that is pending?


Do you mean this?

yes, that one I mean

I don’t know what happens, I didn’t see this case before

maybe it is related to that nethereum framework

I rewrite the code to web3 in JS and the result is same. Here is Tx which I deployed from web3 in JS
0xefd2024f0c2916d5e66f2aba366eb0aa350df698d352a86d9ade3444cccbdb22

@ladinek82

Check your nonce for the tranx, i think you are overriding nonce

check this link for troubleshooting: https://www.reddit.com/r/0xPolygon/comments/r80pe4/help_polygon_network_transaction_is_stuck_pending/

I dont have problem with the stuck tx. They could be stuck forever. If I create new Tx (deployment) , the Tx will be stuck. This is my problem.
I dont have access by wallet to the my BcAccount because the private key is in HSM and I can communicate with it only by .NET or JS.

I have more new info. I have tried the same code with new BC account and all works.

You have right. The old BC account is damaged and the problem relates with Nonce. But I dont know how to fix the nonce, because I dont know all Txs which are pending, because they are not visible in polyscan.

maybe you can look at the last transaction that is in polygon scan, see what nonce it has and start again from that nonce?

yes, I have to set nonce manually and with the new Tx with manual nonce is accepted the other old tx.
But I dont know how did the situation start? How did I damage the automatic nonce setting?

I found a solution of the issue. My platform generates multiple Txs in very short time and the sequence of nonce was damaged. I have to manage the nonce myself.

I would like to say thanks eveybody.

2 Likes

Can you pleaaase share your code? Im using Eth Sepolia Testnet and have the same pending problem here but don’t know how to resolve nonce.

Also is it possible to send eth to smart contract via metamask? Maybe it’s failing to pend because I have 0 eth on it

It should be the reason since you need eth for gas.