You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
I tried to use web3 v1, but out app also use truffle-contract, which use web3 0.20. So then I setProvider to web3 v1, I also set this provider to truffle-contract. And finally truflle-contract tried to invoke sendAsync throw web3 0.20 interface.
Line above fix this difference for httpProvider bettween v1 and v0.20.
web3.providers.HttpProvider.prototype.sendAsync = web3.providers.HttpProvider.prototype.send; fixes it for me, I think it's because truffle-contract uses the 0.2x version of web3 while I'm using the v1.0.0
Following my previous comment. I couldn't find any way to solve this client side, so I ended up only signing the transaction in the mobile client and broadcasting it server side. If you are interested in a microservice to do that you can find the Tx-broadcaster Repository by DEXlab.io here.
Version 0.20.x got his last maintenance release with v0.20.7. Please update your code to the latest 1.0 version of Web3.js. Further details about the current project state are explained in the release announcement of version 1.0.0-beta.38.
Activity
dkchv commentedon Oct 17, 2017
try to add before create new instance:
Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.sendfrozeman commentedon Oct 19, 2017
@dkchv thanks, could you tell me where you get this? which version of web3.js?
dkchv commentedon Oct 20, 2017
I tried to use web3 v1, but out app also use truffle-contract, which use web3 0.20. So then I
setProviderto web3 v1, I also set this provider to truffle-contract. And finally truflle-contract tried to invoke sendAsync throw web3 0.20 interface.Line above fix this difference for httpProvider bettween v1 and v0.20.
pfrank8 commentedon Feb 2, 2018
Hey folks, another potential fix for this could be to make sure you import Web3 before you import any artifacts -- even if you define networks later.
Alexintosh commentedon May 18, 2018
I have the same issue, strangely, this happen only on specific iphone models.
The workaround doesn't seem to work.
Alexintosh commentedon May 31, 2018
This issue should probably be reopened
devzl commentedon Jun 4, 2018
web3.providers.HttpProvider.prototype.sendAsync = web3.providers.HttpProvider.prototype.send;fixes it for me, I think it's because truffle-contract uses the 0.2x version of web3 while I'm using the v1.0.0Alexintosh commentedon Jun 4, 2018
@devzl it doesn't work client side with Infura nodes. Particularly with American iPhones.
Alexintosh commentedon Jun 21, 2018
Following my previous comment. I couldn't find any way to solve this client side, so I ended up only signing the transaction in the mobile client and broadcasting it server side. If you are interested in a microservice to do that you can find the Tx-broadcaster Repository by DEXlab.io here.
Alexintosh commentedon Aug 9, 2018
Not sure why this has been closed ¯_(ツ)_/¯
nivida commentedon Aug 9, 2018
Oops sorry.. 🙈
HttpProvider added, sendAsync fixed
Update index.js
jsliu27 commentedon Nov 23, 2018
您好,我想知道如何创建自己的web3,来实现链上支付,如果您知道,还请您多多帮助一下
nivida commentedon Mar 25, 2019
Version 0.20.x got his last maintenance release with v0.20.7. Please update your code to the latest 1.0 version of Web3.js. Further details about the current project state are explained in the release announcement of version 1.0.0-beta.38.