Skip to content

[Bug]: Support automatic account detection and update in in-app browser #24163

@ikang9712

Description

@ikang9712

Describe the bug

Description

I'm a dApp developer and our service primarily runs inside a digital wallet app’s in-app browser. While implementing wallet connection and handling account change events, I noticed that the MetaMask Wallet App’s in-app browser does not automatically detect when the user changes accounts within the wallet.

This causes a poor user experience — after switching accounts inside MetaMask, the connected dApp continues to show the previous account, even if the page is refreshed. The previous session remains active, and the connection to the old account stays alive. The user must manually disconnect and reconnect their wallet to update to the new account.

Other wallets, like Phantom, automatically detect this kind of account change and update the connection seamlessly, providing a smoother and more intuitive experience.

Expected Behavior

When a user switches accounts inside the MetaMask Wallet App, the in-app browser should automatically trigger the account change event and update the connected account in the dApp. The new account should reflect immediately without needing manual intervention.

Actual Behavior

  • Switching accounts inside the wallet does not trigger any account change event in the dApp.
  • Even after a page refresh, the dApp remains connected to the old account.
  • The only way to update to the new account is to manually disconnect and reconnect the wallet.

This inconsistency causes confusion for users and creates friction in the overall wallet experience.

Additional Information

I have two short screen recordings demonstrating this issue and how Phantom Wallet handles it correctly. I can share them here if video attachments are supported.

Environment

  • Platform: MetaMask Wallet App (in-app browser)
  • Issue type: Account change detection bug
  • Context: Mobile dApp using in-app browser connection

Expected behavior

When a user switches accounts inside the MetaMask Wallet App, the in-app browser should automatically trigger the account change event and update the connected account in the dApp. The new account should reflect immediately without needing manual intervention.

Screenshots/Recordings

MetaMask

ScreenRecording_12-19-2025.00-31-07_1.MP4

Phantom (Expected Behavior)

ScreenRecording_12-19-2025.00-03-49_1.MP4

Steps to reproduce

  1. Open MetaMask Wallet App on mobile device
  2. Navigate to a dApp using ethereum.request({ method: 'eth_requestAccounts' }) for connection
  3. Connect with Account A — verify dApp shows Account A is connected
  4. Switch to Account B within MetaMask Wallet (using account switcher)
  5. Return to the dApp — Account A is still shown as connected
  6. Refresh the dApp page — Account A connection is still active
  7. Only manual "Disconnect" + "Reconnect" updates to Account B

Error messages or log output

Where was this bug found?

Live version (from official store)

Version

7.60.4

Build number

3255

Build type

None

Device

iPhone 14 Pro

Operating system

iOS

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions