metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: Chrome Extension breaks login on Battle.net

Open IrealiTY opened this issue 2 years ago • 4 comments

Describe the bug

If the Chrome Metamask Extension is activated, the 2FA authentication on https://battle.net breaks. The website usually waits for user input on the mobile device to confirm the 2FA login. If MetaMask Extension is active it redirects you back to login and 2FA fails.

Steps to reproduce

  1. Have MetaMask Extention activated
  2. Visit https://eu.battle.net/login/en/
  3. Login with an account that uses Mobile 2FA
  4. After a few seconds you will be redirected back to the username and password prompt
  5. Deactivate MetaMask extension
  6. Repeat Steps 2 & 3
  7. 2FA Login will work

Error messages or log output

No response

Version

10.12.4

Build type

No response

Browser

Chrome

Operating system

Windows

Hardware wallet

No response

Additional context

More confirmations online about it:

  • https://www.reddit.com/r/Overwatch/comments/tbcbpt/battlenet_browser_login_redirecting_before_i_can/#:~:text=for%20me%20started%20working%20after%20i%20removed%20metamask
  • https://us.forums.blizzard.com/en/wow/t/logging-in-to-browser-based-services-authenticator-page-just-refreshes/1187903/4#:~:text=It%20looks%20like%20the%20crypto%20wallet%20Extension%20%E2%80%9CMetamask%E2%80%9D%20is%20causing%20some%20issues

IrealiTY avatar Apr 18 '22 12:04 IrealiTY

Can provide a video as a demonstration if needed.

IrealiTY avatar Apr 18 '22 12:04 IrealiTY

Can confirm this also happens for me.

clupss avatar Jun 04 '22 09:06 clupss

This happens for me as well

liquidfrollo avatar Jun 27 '22 15:06 liquidfrollo

This is still an active issue. Happened to me today. Thank god for this issue or I would have no idea.

ethan-xd avatar Aug 09 '22 00:08 ethan-xd

I just process-of-elimination'd this bug as well.

MetaMask 10.18.3 on Chrome 104.0.5112.102 Windows 10

jander99 avatar Aug 19 '22 03:08 jander99

This is still an active issue. I'm experiencing it on Chrome 104.0.5112.81 (Official Build) (64-bit) (cohort: Stable)

leighstillard avatar Aug 28 '22 07:08 leighstillard

Exists on Edge as well, probably affects any Chromium-based browser that uses Chrome addons.

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42

Edge Version: Version 105.0.1343.42 (Official build) (x86_64)

SeraphimRP avatar Sep 17 '22 04:09 SeraphimRP

Same here

goncalvesm avatar Sep 28 '22 10:09 goncalvesm

Still not fixed.

clupss avatar Nov 16 '22 21:11 clupss

Well nobody cares.

ZaDarkSide avatar Jan 18 '23 18:01 ZaDarkSide

Yep, still a very annoying problem. A nice work around is to Right Click on the Red Fox icon for Metamask > Manage Extension > change Site Access to "On Click" or "On specific sites" and you should be good to keep using it along with access to Battle.Net.

ayamamotopaz avatar Jun 08 '23 16:06 ayamamotopaz

Still an issue

ACassiusD avatar Aug 03 '23 19:08 ACassiusD

I went through the trouble of testing releases to work out when this started happening. v8.0.0 contains the issue, while v7.7.9 does not.

I'll start bisecting the commits between and see if I can find where this began. I get that these guys are busy with many other things. While I might not be able to implement a solution, I should be able to find where the issue is.

SeraphimRP avatar Aug 03 '23 20:08 SeraphimRP

Bisecting done, first bad commit looks to be f519fa1ed3839bf0f4024517271902fd21c76596 from #7004. It's a pretty big commit by the looks of things, so not sure where to continue from here. I can look more granular into that PR later. Hope this helps devs here.

Full bisect log:

git bisect start
# status: waiting for both good and bad commits
# bad: [db5c7a1c93875184a9ca64ec07b1dd4fe0f7370e] Merge pull request #8718 from MetaMask/Version-v8.0.0
git bisect bad db5c7a1c93875184a9ca64ec07b1dd4fe0f7370e
# status: waiting for good commit(s), bad commit known
# good: [5e8a80e21d667b3c18a931e3da8f136b990bf14c] Merge pull request #8444 from MetaMask/Version-v7.7.9
git bisect good 5e8a80e21d667b3c18a931e3da8f136b990bf14c
# bad: [a67ac8dd61c3b3a1bb14dd7eb1e9cb00b8d8f255] Change fa-refresh to fa-sync (#8301)
git bisect bad a67ac8dd61c3b3a1bb14dd7eb1e9cb00b8d8f255
# bad: [b4339f6cbfe70d292b4d22e76b45102816e9f49f] Move devDeps into devDeps (#7936)
git bisect bad b4339f6cbfe70d292b4d22e76b45102816e9f49f
# bad: [52a38de567a47072ab6ba793dd651655588e936c] Remove unused components (#7802)
git bisect bad 52a38de567a47072ab6ba793dd651655588e936c
# bad: [5958eccf4633d7ff25a14919e601b59e320184c7] Remove unused ExtensionPlatform#queryTabs method (#7691)
git bisect bad 5958eccf4633d7ff25a14919e601b59e320184c7
# bad: [30304913eb8d990823ba7ca0cd6e1de470c3e3f1] Merge pull request #7591 from whymarrh/eslint-object-curly-spacing
git bisect bad 30304913eb8d990823ba7ca0cd6e1de470c3e3f1
# bad: [dfb63ee88bce74581bc140bc7dd7597f25c8ecf5] Merge remote-tracking branch 'origin/develop' into master-sync
git bisect bad dfb63ee88bce74581bc140bc7dd7597f25c8ecf5
# good: [2e69f3233e1891d3633261bfcbe383d862855ed1] eslint: Enable more react/jsx-* rules (#7592)
git bisect good 2e69f3233e1891d3633261bfcbe383d862855ed1
# bad: [d9bdba59482a93efed83dd5ac3c7ad4dbad83bbe] Use ES6 exports for selectors (#7626)
git bisect bad d9bdba59482a93efed83dd5ac3c7ad4dbad83bbe
# bad: [b4fd7aea32f069f3d4142f2bfe736a85601196ae] Fix a typo made comparing previous prop (#7628)
git bisect bad b4fd7aea32f069f3d4142f2bfe736a85601196ae
# bad: [f519fa1ed3839bf0f4024517271902fd21c76596] Connect distinct accounts per site (#7004)
git bisect bad f519fa1ed3839bf0f4024517271902fd21c76596
# first bad commit: [f519fa1ed3839bf0f4024517271902fd21c76596] Connect distinct accounts per site (#7004)

SeraphimRP avatar Aug 03 '23 21:08 SeraphimRP

@SeraphimRP this is good work, but can you bisect it into the actual commits inside PR 7004? That would help me narrow it down further. (https://github.com/MetaMask/metamask-extension/pull/7004/commits)

The cause of this problem is not at all obvious. I opened a PR #20396, but it's more of a band-aid and exploration than an actual fix. It just turns off MetaMask on https://*.battle.net/*

It would be great if other people tested it though. You can either build from source on #20396, or you can download a CircleCI build here.

HowardBraham avatar Aug 04 '23 09:08 HowardBraham

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.

github-actions[bot] avatar Nov 02 '23 10:11 github-actions[bot]

Do not close this.

clupss avatar Nov 02 '23 20:11 clupss

11/20/2023 This issue is still occurring between battle.net login with their own 2FA enabled and the MetaMask extension.

thomascooper avatar Nov 20 '23 20:11 thomascooper

can confirm this is still happening.

BrentMifsud avatar Dec 23 '23 22:12 BrentMifsud

Still here the bug as well with macOS and Google Chrome (Mac M1 and macOS: 13.6.1 (22G313) and Chrome: Version 120.0.6099.129 (Offizieller Build) (arm64)).

Vince

joshivince avatar Dec 30 '23 17:12 joshivince

This is now fixed, and should come out in the next release.

We just solved it by blocking Battle.net, but here's the actual problem if you're curious:

  • The page headers on Battle.net list the following 4 icons
<link rel="icon" type="image/png" sizes="192x192" href="/login/static/images/toolkit/themes/bnet-next/meta/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="/login/static/images/toolkit/themes/bnet-next/meta/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/login/static/images/toolkit/themes/bnet-next/meta/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/login/static/images/toolkit/themes/bnet-next/meta/favicon-96x96.png">
  • That first one, if you try to actually visit it, is a 404 error: https://us.account.battle.net/login/static/images/toolkit/themes/bnet-next/meta/android-icon-192x192.png
  • Our @metamask/providers tries to load that icon
  • Battle.net has some sort of code that if you're in the middle of 2FA and you get a 404 error, go back to the login page
  • You can independently verify this if you disable MetaMask, then on the 2FA page run either of fetch('https://us.account.battle.net/login/static/images/…it/themes/bnet-next/meta/android-icon-192x192.png') fetch('https://us.account.battle.net/login/static/404') (not at all an image, but a deliberate 404) you will get the same result of being forced back to the login page

HowardBraham avatar Feb 02 '24 18:02 HowardBraham