Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

this.provider.sendAsync is not a function #121

Closed
daraosn opened this issue Aug 17, 2017 · 1 comment
Closed

this.provider.sendAsync is not a function #121

daraosn opened this issue Aug 17, 2017 · 1 comment

Comments

@daraosn
Copy link

daraosn commented Aug 17, 2017

I've been playing with 0x.js library, and found this error... currently using "web3": "^1.0.0-beta.18"

I guess this is related to #74?

This is the error:

Caught error:  TypeError: this.provider.sendAsync is not a function
    at RequestManager.sendAsync (./node_modules/0x.js/node_modules/web3/lib/web3/requestmanager.js:80:19)
    at get (./node_modules/0x.js/node_modules/web3/lib/web3/property.js:116:33)
    at ./node_modules/es6-promisify/dist/promisify.js:75:41
    at Promise (<anonymous>)
    at ./node_modules/es6-promisify/dist/promisify.js:54:20
    at Web3Wrapper.<anonymous> (./node_modules/0x.js/lib/src/web3_wrapper.js:171:86)
    at step (./node_modules/0x.js/lib/src/web3_wrapper.js:32:23)
    at Object.next (./node_modules/0x.js/lib/src/web3_wrapper.js:13:53)
    at ./node_modules/0x.js/lib/src/web3_wrapper.js:7:71
    at Promise (<anonymous>)
    at __awaiter (./node_modules/0x.js/lib/src/web3_wrapper.js:3:12)
    at Web3Wrapper.getAvailableAddressesAsync (./node_modules/0x.js/lib/src/web3_wrapper.js:167:16)
    at ZeroEx.<anonymous> (./node_modules/0x.js/lib/src/0x.js:204:68)
    at step (./node_modules/0x.js/lib/src/0x.js:32:23)
    at Object.next (./node_modules/0x.js/lib/src/0x.js:13:53)
    at ./node_modules/0x.js/lib/src/0x.js:7:71
    at Promise (<anonymous>)
    at __awaiter (./node_modules/0x.js/lib/src/0x.js:3:12)
    at ZeroEx.getAvailableAddressesAsync (./node_modules/0x.js/lib/src/0x.js:200:16)
    at Object.<anonymous> (./test.js:12:8)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3

This is the workaround I'm using:

provider.sendAsync = provider.send;
@LogvinovLeon
Copy link
Contributor

Hi @daraosn.

We don't support beta versions of web3. As soon as the stable version will be released - we'll direct our effort to supporting it.

For now you can either use the stable version, or use the workaround you've found.
I'm not sure, that events are gonna work with this workaround though. I'll need to check that.

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

No branches or pull requests

2 participants