-
Notifications
You must be signed in to change notification settings - Fork 43
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
RangeError: Maximum call stack size exceeded (during getTransactionCount) #104
Comments
May I ask why you use while loop in your code. |
Any chance to get at least a reply on the above? I've noticed the SDK hasn't had attention in recent months. Is Harmony moving away from maintaining it? |
Why do you ask? The while loop has no bearing on the exception generated by |
Because if you are using ws api may cause the loop out of stack. So I want to figure out your purpose and come up with a workaround |
Hi neebo. I'm still not sure what you mean. The while loop is being used to iterate through my own data structure. The call to |
ok. Please change harmony endpoint to https instead of websocket to see if the error disappear |
We're already using the https endpoint. |
Any ideas? |
@hmexx can you share more details, like how have you initialized your |
How long did you run it for? We have to restart our process every few days and we average a withdrawal every couple of minutes. So a good test would be 2000 transactions during a mixture of normal and congested times (so that the occasional SDK error is mixed with successful transactions). Here is our hmy initialization code:
|
Is there no way for someone to audit the code in the place the exception is thrown to see what could be causing the
|
Some more information which should be very helpful in getting to the bottom of this. We get the same We have a process that checks blockchain HRC20 balances, and these start failing 100% of the time after 5000 or so. This happens every single time. So it should be very easy to replicate. Just run the following:
In a loop 20,000 times (to be on the safe side) and you should hit the bug. |
Would you try adding a setTimeout to your loop and give the loop a proper exit? |
We don't use a loop. The contract is called each time there is a withdrawal requested. And there's a delay between each call. Can you try running the test I've described? |
I'm seeing this too. Any progress? |
Yes. The answer is do not use the harmony SDK for anything. No one does. We migrated to using ethers and since then no issues. It also means you can run your dapp on any EVM chain. On that note you may want to consider if harmony is the best choice. |
Hi
We're encountering another uncaught exception coming from the SDK. This time when we use the
blochamin.getTransactionCount()
APIHere is try-catch block in which the exception occurs:
Once this happens once, it keeps occuring until we restart the process.
Any thoughts/fixes/workarounds appreciated.
The text was updated successfully, but these errors were encountered: