-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 HttpProvider not works on Safari (Iphone, IOS 11.4.1) #2071
Comments
I had a look at your code and I think the issue is in the HttpProvider declaration, it should be composed on INFURA_HOST (e.g.: "https://mainnet.infura.io") + INFURA_PATH (e.g.: "/3567d988f7534c92bd2c0d42601a097a"). Removing the "v3" from the URI and running your code works.
|
@jpantunes thanks for your answer! But it doesn't help :/ The result is the same: if you're running this fiddle (even with changed Infura path) at desktop Chrome - it works. If you're running it on the Iphone's Safari - the |
@pavlovdog do you have Metamask installed in your desktop Chrome? This injects the web3 library into the jsfiddle and makes the code work. I tried with Safari and could reproduce your problem and then tried in a new Chrome install (without Metamask) and had the same behaviour. Finally in Chrome with Metamask and Brave your code works fine. |
@jpantunes yeah, I've it installed, but I don't think that it matters. First of all, I've tried to run the Fiddle inside the private mode (MetaMask disabled) - it works. After that, I've tried to run the Fiddle inside Opera (MetaMask not installed at all) - also works fine. |
@pavlovdog, so how are you loading the web3 library into the jsfiddle page without metamask? It's my understanding that Opera has a builtin wallet with a web3 provider (https://blogs.opera.com/mobile/2018/07/opera-launches-first-browser-with-built-in-crypto-wallet/) so that might be why it works but I haven't tried it myself. I'm at a loss why would Chrome work with the extension disabled so my apologies if I couldn't help. |
This got fixed with PR #2564 and will be released this week. |
I've written a simple project which uses the Web3JS on the client-side with Infura endpoint. Everything works great on my Chrome / Firefox:
But when I'm trying to run the page on my Iphone's Safari - nothing happens:
Here's a simple JSfiddle for illustrating the problem. For some reason, the
web3.eth.blockNumber
can't be loaded from the web3 instance.The text was updated successfully, but these errors were encountered: