Skip to main content
February 14, 2025
Question

Memory leak with Chrome extension

  • February 14, 2025
  • 1 reply
  • 231 views

We noticed that we have memory leak when using 1password extension in Chrome. Here is a minimal repro code.

<!doctype html>
<html lang="en">
  <body>
    <button id="btn">Test the click and wait for removal</button>
    <script>
      class EasierToFindInShapshot {}

      (() => {
        const button = document.getElementById("btn");

        button.testInstance = new EasierToFindInShapshot();

        setTimeout(() => {
          document.body.removeChild(button);
        }, 10_000);
      })();
    </script>
  </body>
</html>

Steps:

  • Clicking to button until it is removed
  • Take a snapshot and find that EasierToFindInShapshot is not collected
  • Try without extension and EasierToFindInShapshot should be collected.
Extension version: 8.10.60.27
Chrome version: 133.0.6943.99 (Official Build) (arm64)
OS version: macOS Sequoia Version 15.3
Chip: Apple M3 Pro

 

1 reply

1P_Dave
1Password Employee
February 21, 2025

Hello @miroljub1995! 👋

Thank you for reporting this! I've done some testing and I'm not seeing the EasierToFindInShapshot being retained when I have 1Password in the browser enabled. Here are my reproduction steps: 

  1. Saved your code as a HTML file and opened the file in Chrome. 
  2. Opened the Memory tab in DevTools.
  3. Pressed the "Test the click and wait for removal" button. 
  4. Took a heap snapshot. 
  5. Waited for the button to disappear.
  6. Took a second heap snapshot. 


Whether 1Password in the browser is enabled or disabled, the second snapshot doesn't contain reference to EasierToFindInShapshot.

Here are the versions that I'm using: 

  • Chrome version 133.0.6943.127
  • 1Password in the browser version 8.10.62.27


Can you reproduce the issue using the same versions that I'm using? If you can then can you let me know if I got the reproduction steps wrong? 

-Dave