Returns an empty array despite Metamask having one account, how should I be retrieving the accounts in a way that will work with Mist and Metamask?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
I'm also facing same problem. My ganache was running, metamask is also running, web3 is also injected. The problem was
web3.eth.getAccounts().then(...) was returning null. But after lot of searching I found that
I run this command and one metamask popup was opened, which connected my metamask account to app.