-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Batch requests over ws fails with RPC response {} #4581
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
mistake |
Fucken goofs |
Same issue here. I guess this may be by design but I couldn't find any docs about it |
From debugging I found that https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-providers-ws/src/index.js#L310 sends a single message with the id of the first request but the node responds every message individually in https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-providers-ws/src/index.js#L125 and then RequestManager fails the validation for a result array: https://github.com/ChainSafe/web3.js/blob/1.x/packages/web3-core-requestmanager/src/index.js#L207 |
I'm using a QuickNode node over WS, maybe they implement it like this because they charge over responses? |
I have the same issue, I also noticed that this only happens if I have alot of calls in my batch request (I was trying to do 500), if I limit it to 5 only, the request works. 🤷 Anyone found a solution/workaround? I guess chunk the batch requests over a time duration? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
Is there an existing issue for this?
Current Behavior
When I do a batch request with websocket-initialized web3, I get an error:
The problem only with websocket connection. Over http batch requests are works.
Single requests over websocket are working properly.
Expected Behavior
To get a complete response
Steps to Reproduce
Web3.js Version
1.6.1
Environment
Anything Else?
No response
The text was updated successfully, but these errors were encountered: