MetaMask / MetaMask/metamask-extension

[Bug] subjectMetadata doesn't return the active Tab metaData

Open
#24,025 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

INVALID-ISSUE-TEMPLATE team-wallet-api-platform-deprecated
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

This is an inconsistent behaviour, but if I try to get the subjectMetaData for a dapp, the selector doesn't return the dapp until I refresh the page. This behaviour is not consistent, most of the times the metaData for the current tab is there. It's quite random

### Manual Steps:
1. Close all the browser windows
2. Go to https://pancakeswap.finance/ or any dapp in a fresh window which is not connected to the extension and start the extension
3. You might need to restart the browser again to replicate this bug

### Screenshots

[Private Zenhub Video](https://api.zenhub.com/attachedFiles/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBKzFkQkE9PSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--d7630c36e5eab424f88f43cf5b3b65a8fefdf356/Screen%20Recording%202024-04-15%20at%203.45.32%E2%80%AFPM.mov)

Screenshot 2024-04-15 at 3.45.15 PM.jpg

### Background console for the send-metaData,

https://github.com/MetaMask/metamask-extension/assets/39872794/96db0519-a805-4587-a9b8-ffd748ea9dde

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the subjectMetadata selector and the send-metaData flow described in the issue, reproducing the fresh-browser startup steps with a dapp such as pancakeswap.finance. Determine why the active tab's metadata is sometimes absent, then verify that the selector consistently returns it without requiring a page refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.