Web3.js: "filterCreationErrorCallback is not a function" Error

Created on 30 Jan 2017  路  10Comments  路  Source: ChainSafe/web3.js

I got the following exception:

/home/user/Desktop/Projects/ethapi/node_modules/web3/lib/web3/filter.js:153
            filterCreationErrorCallback(error);
            ^

TypeError: filterCreationErrorCallback is not a function

The error is in the Filter constructor and caused by a call without the filterCreationErrorCallback parameter in the AllSolidityEvents.execute and SolidityEvent.execute methods.

Most helpful comment

The following pull request fixes the exception, without breaking backwards compatibility: https://github.com/ethereum/web3.js/pull/861

All 10 comments

I've got the same problem. Most weird, this yields an unhandled exception and I don't know, how to catch it. This is my code (using truffle). To reproduce, make the provider unavailable (stop or pause ethereum node)

function getEvents(contract) {
    return new Promise(function(resolve, reject){
        try {
            var allEvents = contract.allEvents({fromBlock: 0});
            allEvents.get(function(error, events){
                if(error) 
                    reject(error);
                else
                    resolve(events);
            });
        } catch (error){
            reject(error);
        };   
    });

Or is this a bug in truffle?

I got the same error. TypeError: filterCreationErrorCallback is not a function.
The package.json file set the following dependencies:

  "dependencies": {
    "babel-runtime": "^6.18.0",
    "bcrypt": "^1.0.1",
    "clipboard": "^1.5.12",
    "meteor-node-stubs": "~0.2.0",
    "web3": "^0.18.2",
    "xhr2": "^0.1.4",
    "xmlhttprequest": "^1.8.0"
  }

What's wrong?

I can confirm the same error is happening to me, the only dependency I have is eslint

I believe this issue may be caused by truffle / web3 version issues. downgrading truffle versions has resolved this issue for me.

Thats interesting, having the same issue but not using truffle at all. Let me try an earlier version of Web3, though. Thanks for the suggestion!

Same issue here, not using Truffle. Just latest version of web3 from npm. 0.18.2 I believe.

me too

The following pull request fixes the exception, without breaking backwards compatibility: https://github.com/ethereum/web3.js/pull/861

thanks!

Still getting this error on truffle migrate. Truffle v3.4.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TinyWJL picture TinyWJL  路  3Comments

xpepermint picture xpepermint  路  3Comments

connectdotz picture connectdotz  路  3Comments

gabmontes picture gabmontes  路  3Comments

oktapodia picture oktapodia  路  3Comments