Skip to content

Conversation

@ffmcgee725
Copy link
Member

@ffmcgee725 ffmcgee725 commented Dec 4, 2025

When using @metamask/connect in the Firefox Extension, when the dapp side disconnects, the UI updates correctly, but attempting to reconnect does not prompt the wallet pop-up for permission granting.

This happens because createDupeReqFilterStream middleware is responsible for keeping track of IDs that have been recently seen and not respond to request incoming from these matching IDs.

On disconnect, calling getUniqueId function once at the beginning of windowPostMessageTransport was not enough to make sure we avoid repeated IDs, so the proposed fix here is to make sure we call it on each individual request, guaranteeing the unique requests make it through.

Screenshots/Recordings

Before

Screen.Recording.2025-12-03.at.11.43.05.mov

After

Screen.Recording.2025-12-04.at.12.37.40.mov

Note

Use getUniqueId for every windowPostMessageTransport request to avoid duplicate RPC IDs (Firefox), and document in CHANGELOG.

  • Transport
    • src/transports/windowPostMessageTransport.ts: Generate a new id via getUniqueId() for each request, replacing the incremented counter to prevent duplicate RPC IDs.
  • Docs
    • CHANGELOG.md: Add Unreleased entry under Fixed describing the per-request getUniqueId change and associated Firefox duplicate ID issue.

Written by Cursor Bugbot for commit d1b49ef. This will update automatically on new commits. Configure here.

@ffmcgee725 ffmcgee725 requested a review from a team as a code owner December 4, 2025 11:47
Copy link

@wenfix wenfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

@ffmcgee725 ffmcgee725 merged commit b4d792f into main Dec 4, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants