-
Notifications
You must be signed in to change notification settings - Fork 928
web3.js: _updateSubscriptions running in infinite recursion, crashing developed app #1177
Comments
The presence of the |
Hi, thanks for the response @steveluscher . Here you can check preview of environment where this situation happens: invariant-labs/webapp#311. Open dev tools console in browser, set network in app to devnet and for example try to swap two tokens (use faucet to get our mock tokens) - then app will freeze and console will be full of these errors. I hope this will be helpful. |
Nevermind. I tried Chrome and it worked. You might like to test the app on Firefox – you might have a bug there that causes the whole page to refresh! |
Weird, I've looked now on app on Firefox, network change works fine (but refresh is an intended behavior in this case) |
Screen.Recording.2022-05-12.at.5.09.08.PM.movInterestingly, after these many |
OK. I think I have a fix to make, but the larger curiosity is why the devnet socket server keeps closing the connection on you (with a 1013) error. |
Try the latest version of web3.js @awojciak. I think your infinite recursion problem will be fixed, but the fact that devnet drops the socket on you with a 1013 is a separate problem, perhaps related to the sheer number of subscriptions that the app makes. |
@steveluscher App still freezes and there is a lot of these errors: |
Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up. |
Problem
When using latest release of @solana/web.js (1.41.4) and getting errors like this one:
developed app is crashing.
I suspect this happens because of recursion there, which seems to run indefinitely:
When using version not containing this change in code (1.41.1), crashing doesn't happen.
Proposed Solution
Use one of solutions mentioned in TODO comment ("Maybe add an 'errored' state or a retry limit?")
The text was updated successfully, but these errors were encountered: