Skip to content

Memory Leak: “JS event listeners” count infinitely incrementing #2550

@karmasakshi

Description

@karmasakshi

JS event listeners infinitely incrementing in batches of 2.

Screenshot 2020-07-21 at 3 08 24 PM

Version info

Angular: 10.0

Firebase: 7.13.1

AngularFire: 6.0.2

Verified on Chrome on macOS. Safari on iPhone heats up the device when loading the affected site.

How to reproduce these conditions

Steps to set up and reproduce

  1. Create a new Angular project using the CLI
  2. Add AngularFire using ng add @angular/fire
  3. Add configuration and AngularFireAnalyticsModule

Please note that the problem may not be with AngularFireAnalyticsModule but it is enough to reproduce the error. I am getting this error on a project that uses MixPanel too.

StackBlitz: https://angular-fire-start-d8ivab.stackblitz.io/
Please open DevTools > Performance Monitor and note the "JS event listeners" count increase

Editable StackBlitz: https://stackblitz.com/edit/angular-fire-start-d8ivab?file=app%2Fapp.module.ts

Expected behaviour

The JS event listeners should be static after a certain point. (Or should be cleaned up regularly).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions