While trying to connect to a provider(infura) I get the above error below is the full stack trace:

bundle.js:54318 Uncaught TypeError: this.provider.sendAsync is not a function
at Web3Subprovider.handleRequest (bundle.js:54318)
at next (bundle.js:53398)
at Web3ProviderEngine._handleAsync (bundle.js:53385)
at Web3ProviderEngine._fetchBlock (bundle.js:53494)
at Web3ProviderEngine._fetchLatestBlock (bundle.js:53470)
at Web3ProviderEngine._startPolling (bundle.js:53447)
at Web3ProviderEngine.start (bundle.js:53341)
at window.onload (bundle.js:61042)
Web3Subprovider.handleRequest @ bundle.js:54318
next @ bundle.js:53398
Web3ProviderEngine._handleAsync @ bundle.js:53385
Web3ProviderEngine._fetchBlock @ bundle.js:53494
Web3ProviderEngine._fetchLatestBlock @ bundle.js:53470
Web3ProviderEngine._startPolling @ bundle.js:53447
Web3ProviderEngine.start @ bundle.js:53341
window.onload @ bundle.js:61042

1 Answer 1


Here is an hack to provide compatibility with Truffle which uses web3 0.20.x

 Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.send;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.