angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Performance & SW: FirebaseError: Performance: Custom metric name _fp is invalid

Open bogacg opened this issue 7 years ago • 2 comments

Version info

Angular: 8.3.0

Firebase: 6.4.1

AngularFire: 5.2.1

How to reproduce these conditions

Steps to set up and reproduce

  • ng new FirebasePerfErr --skip-tests
  • ng add @angular/fire
  • ng add @angular/pwa
  • Add firebase config object to your environment.ts file
  • app.module.ts :
  imports: [
    BrowserModule,
    AngularFireModule.initializeApp(environment.firebase),
    AngularFirePerformanceModule,
  • ng serve

Debug output

Uncaught FirebaseError: Performance: Custom metric name _fp is invalid (performance/invalide custom metric name).
    at Trace.push../node_modules/@firebase/performance/dist/index.cjs.js.Trace.putMetric (http://localhost:4200/firebase-performance.js:2155:33)
    at Trace.push../node_modules/@firebase/performance/dist/index.cjs.js.Trace.incrementMetric (http://localhost:4200/firebase-performance.js:2140:18)
    at Function.push../node_modules/@firebase/performance/dist/index.cjs.js.Trace.createOobTrace (http://localhost:4200/firebase-performance.js:2252:23)
    at setupOobTraces (http://localhost:4200/firebase-performance.js:2368:15)
    at http://localhost:4200/firebase-performance.js:2334:37
    at ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3626:31)
    at Zone.runTask (http://localhost:4200/polyfills.js:3403:47)
    at invokeTask (http://localhost:4200/polyfills.js:3700:34)
    at ZoneTask.invoke (http://localhost:4200/polyfills.js:3689:48)
    at timer (http://localhost:4200/polyfills.js:5885:29)

Expected behavior

With Angular 8.2.2 and Firebase 6.3.5 (& @angular/fire 5.2.1) I did not have this issue.

Actual behavior

Getting error: FirebaseError: Performance: Custom metric name _fp is invalid

bogacg avatar Aug 23 '19 13:08 bogacg

Seems fixed with Firebase 6.4.2

bogacg avatar Aug 24 '19 19:08 bogacg

Thanks for reporting the issue. Please update to the latest version. It should be fixed as of this pr: https://github.com/firebase/firebase-js-sdk/pull/2110

alikn avatar Aug 25 '19 03:08 alikn