I have build a webapp to MINT our ERC721 token using Webflow. It works fine on desktop but the window.ethereum is never injected on mobile (browsers & metamask application) Here is my code to detect the provider:
detectEthereumProvider().then((result) => {
if (result) {
web3 = new Web3(result);
handleEthereum(result);
} else {
setupOnboarding();
}
}).catch((error) => { console.log(error); });
On mobile setupOnboarding(); is always called as window.ethereum doesn't seem to be injected. Mobile is Android 10 Huawei P30. Tested Chrome, Android & Metamask in-app browser. There is no CSP set for the website, CORS is set to strict-origin-when-cross-origin (cannot change it).
I've tested the same mobile on pancakeswap, it works in Metamask in-app browser but not Chrome (provider not found when clicking Metamask).
Any help would be appreciated I've been stuck on this :(