angularfire
angularfire copied to clipboard
Performance & SW: FirebaseError: Performance: Custom metric name _fp is invalid
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-testsng add @angular/fireng add @angular/pwa- Add
firebaseconfig object to yourenvironment.tsfile 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
Seems fixed with Firebase 6.4.2
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