Skip to content
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

[web3 1.0.0-beta.41] 'getPastEvents' - {"code":-32603,"message":"request failed or timed out"} #2296

Closed
ironbyte opened this issue Feb 2, 2019 · 1 comment

Comments

@ironbyte
Copy link

ironbyte commented Feb 2, 2019

Expected behavior

Fetch all past events starting with a given block number

Actual behavior

It always return the following error:

Error: Node error: {"code":-32603,"message":"request failed or timed out"}

NOTE: Downgrading back to web3@1.0.0-beta.37 fixes the issue.

Steps to reproduce the behavior

const httpProvider = new Web3.providers.HttpProvider(infuraHTTPProviderURL);
const web3Instance = new Web3(httpProvider);
const coreContractInstance = new web3Instance.eth.Contract(coreABI, coreContractAddress);

coreContractInstance.getPastEvents('Birth', { fromBlock: 3768892 })
  .then((pastBirthEvents) => { debug('pastBirthEvents: %O', pastBirthEvents) })
  .catch((error) => { debug('error: ', error); process.exit(1) });

Error Logs

(node:379) UnhandledPromiseRejectionWarning: Error: Node error: {"code":-32603,"message":"request failed or timed out"}
    at Function.validate (/home/****/projects/*********/gvcwssda-crypto-kitty-midwife/node_modules/web3-providers/dist/web3-providers.cjs.js:66:18)
    at /home/****/projects/*********/gvcwssda-crypto-kitty-midwife/node_modules/web3-providers/dist/web3-providers.cjs.js:128:57
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:379) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:379) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Versions

[NPM, Node, Web3.js, OS, device...]

web3@1.0.0-beta.41
node@v8.14.0
npm@6.5.0
OS: Linux/Ubuntu 18.04

@ironbyte ironbyte changed the title web3 1.0.0-beta.41 - 'getPastEvents' - Error: Node error: {"code":-32603,"message":"request failed or timed out"} [web3 1.0.0-beta.41] 'getPastEvents' - {"code":-32603,"message":"request failed or timed out"} Feb 2, 2019
@ironbyte ironbyte closed this as completed Feb 2, 2019
@hdahme
Copy link

hdahme commented Feb 13, 2019

What was the resolution @ironbyte ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants