MetaMask / MetaMask/metamask-extension
[Bug] subjectMetadata doesn't return the active Tab metaData
Nobody has claimed this yet.
- 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)

### Background console for the send-metaData,
https://github.com/MetaMask/metamask-extension/assets/39872794/96db0519-a805-4587-a9b8-ffd748ea9dde
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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