Issue with Metamask accounts request

I have a problem with MetaMask. I request accounts in js using getClient().eth.getAccounts(), and it works for some users, while returning empty array for others. All users are logged into MetaMask. What could be the reason for this?

1 Like

One very common reason where MetaMask accounts do not work with web3 is when a given user did not receive an alert (prompt) or somehow did not allow the application (code) to access MetaMask data. At the end of the year 2018, MetaMask stopped injecting web3, which disabled user accounts exposure by default (not without user’s consent).
See also: