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

[Bug]: Memory leak in Firefox

Open madest92 opened this issue 6 months ago • 4 comments

Describe the bug

The previous issue #40615 was partially fixed: memory no longer grows while MetaMask stays idle.

However, the leak is still reproducible after user interactions.

After performing multiple swaps, memory usage starts increasing continuously and does not return to baseline.

This appears to be related to transaction/signing/activity lifecycle rather than passive extension background execution.

Expected behavior

No response

Screenshots/Recordings

Collected from about:memory.

At the time of capture:

  • ~2.36 GB retained under window-objects → detached
  • ~2.18 GB retained under detached notification.html
  • ~1.79 GB retained in JS object graph
Image

Steps to reproduce

  1. Launch browser with clean session.
  2. Open any swap-enabled website (reproduced on multiple sites, not site-specific).
  3. Connect MetaMask.
  4. Perform ~5–10 swaps.
  5. Confirm transactions through MetaMask popup.
  6. Continue normal interaction (open activity, confirmations, network updates).
  7. Observe memory growth in browser / about:memory.

Error messages or log output


Where was this bug found?

Live version (from official store)

Version

13.30.0

Build type

None

Browser

Firefox

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

madest92 avatar May 23 '26 02:05 madest92

Hi @FrederikBolding

Memory continues to leak. But now in a different place

madest92 avatar May 23 '26 02:05 madest92

Oh no wonder my browser suddenly feels very slow over the past few days, hopefully they can fix this soon

PoohVz avatar Jun 06 '26 03:06 PoohVz

v13.34.1.0 - the same

madest92 avatar Jun 16 '26 03:06 madest92

Missing release label release-13.40.0 on issue. Adding release label release-13.40.0 on issue, as issue is linked to PR #44352 which has this release label.

gauthierpetetin avatar Jul 13 '26 10:07 gauthierpetetin