MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.84k stars 4.84k forks source link

Metamask received invalid isUnlocked parameter #11603

Open yunlonglee opened 3 years ago

yunlonglee commented 3 years ago

Not sure why. Showing this error. Metamask received invalid isUnlocked parameter

danjm commented 2 years ago

@yunlonglee Can you still reproduce this bug? If so, can you provide some more details?

freeatnet commented 2 years ago

We get these occasionally via Sentry. We use bnc-onboard and reconnect automatically unless the wallet is locked, like so:

      const isMetaMaskAndLocked =
        previouslySelectedWallet === 'MetaMask' &&
        typeof (window as any).ethereum?._metamask?.isUnlocked === 'function' &&
        !(await (window as any).ethereum._metamask.isUnlocked());

Among 59 error events, 75% had browser logged as "Chrome Mobile iOS 76.0.3809" (OS: iOS 13.1), 25% as "Chrome Mobile 77.0.3865" (OS: Android 10). Is there a way to log MetaMask version to track this down a bit more precisely?

SweetmanTech commented 2 years ago

I'm also getting this error via Sentry.

What checks should we be running to prevent this bug from being reported in Sentry?

Screen Shot 2022-03-04 at 3 20 59 PM
imshadow commented 2 years ago

Hello, I have also encountered this problem. Have you solved it?

qieman commented 2 years ago

I have the same problem, is there any solution?

mburger81 commented 1 year ago

I have the same issue using MM in app browser on an approval trx?

Did someone got a solution?

thibautvdu commented 1 year ago

I'm getting the same error, always on mobile :

Capture d’écran 2023-02-24 à 18 58 58
anistark commented 2 months ago

Same on sentry. @freeatnet your solution works across all devices?