detect-provider
detect-provider copied to clipboard
Does not detect ethereum provider if redirection happens into the metamask mobile browser
If a dApp redirects the user to the metamask mobile app using deep-link, then this library does not detect provider on page load,
const provider = await detectEthereumProvider();
if (provider) {
// Detected
} else {
// window.ethereum is undefined
}
When the dApp opens into the metamask mobile app browser, then always for the first time, it goes into the else condition and when page is reloaded, then it works fine.
Any suggestion is appreciated. Thanks.
Works fine on my Metamask Mobile Browser maybe you need to update the app then it may work, Let me know if it worked.
Hi @sangya2001 I have the same problem. Sometimes the Mobile Browser detects de web3 and sometimes it does not. I found out that this is not specially related to this package. The web3 detection fails sometimes anyway on my Android.
Any help is appreciated.
@poonam125sharma
Try status.im browser it's really good.
Hi @sangya2001 I just tried. But it looks there is no qrcode scanner for http. Also deeplinking is not working for me when a querystring is added to the deeplink url. Do you use these features too?
In mobile browser with MetaMask App installed, the provider has not been initialized. Android 8
same problem Android 11 MetaMask v5.1.1