-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unhandled Rejections #1084
Comments
A few scripts have been using the ethers default keys recently, bumping me from 4M to 20M calls per day to Alchemy and the other backends. Does this actually cause your app to crash? Or just muddy up the logs? The application should continue working, I would think? I am working on this now in a few directions:
|
I do believe this is the same problem as #1208. Please see that issue for updates. :) |
This should be addressed in 5.0.26. Please try it out and let me know. :) |
Closing this now, as I think the problem has been resolved. If not, please re-open. Thanks! :) |
hi,
I use ethers in a webpack package, which is running server side application.
Node version 11.15.0
"@babel/core": "^7.11.6",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"babel-loader": "^8.1.0",
"ethers": "^5.0.12",
"express": "^4.17.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-node-externals": "^2.5.2"
I use strategy to include provider once per application:
var provider = new ethers.getDefaultProvider('ropsten', {infura: 'keyhere'});
I do simple step only in my application:
let filter ={
...
}
let log1 = await provider.getLogs(filter);
Code is working, provider always return data. But often application crash with an error below. What an issue could be?
Unhandled Rejection at: Promise {
{ Error: failed response (requestBody="{"method":"eth_blockNumber","params":[],"id":45,"jsonrpc":"2.0"}", requestMethod="POST", url="https://eth-ropsten.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVf*********9EkC", code=SERVER_ERROR, version=web/5.0.7)
at Logger.makeError (/home/testuser/rr1/node_modules/@ethersproject/logger/lib/index.js:179:21)
at Logger.throwError (/home/testuser/rr1/node_modules/@ethersproject/logger/lib/index.js:188:20)
at /home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:280:59
at step (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:33:23)
at Object.next (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:14:53)
at fulfilled (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:5:58)
reason: 'failed response',
code: 'SERVER_ERROR',
requestBody:
'{"method":"eth_blockNumber","params":[],"id":45,"jsonrpc":"2.0"}',
requestMethod: 'POST',
url:
'https://eth-ropsten.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVf*********9EkC' } } reason: { Error: failed response (requestBody="{"method":"eth_blockNumber","params":[],"id":45,"jsonrpc":"2.0"}", requestMethod="POST", url="https://eth-ropsten.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVf*********9EkC", code=SERVER_ERROR, version=web/5.0.7)
at Logger.makeError (/home/testuser/rr1/node_modules/@ethersproject/logger/lib/index.js:179:21)
at Logger.throwError (/home/testuser/rr1/node_modules/@ethersproject/logger/lib/index.js:188:20)
at /home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:280:59
at step (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:33:23)
at Object.next (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:14:53)
at fulfilled (/home/testuser/rr1/node_modules/@ethersproject/web/lib/index.js:5:58)
reason: 'failed response',
code: 'SERVER_ERROR',
requestBody:
'{"method":"eth_blockNumber","params":[],"id":45,"jsonrpc":"2.0"}',
requestMethod: 'POST',
url:
'https://eth-ropsten.alchemyapi.io/v2/_gg7wSSi0KMBsdKnGVf*********9EkC' }
The text was updated successfully, but these errors were encountered: