ngx-auth-firebaseui icon indicating copy to clipboard operation
ngx-auth-firebaseui copied to clipboard

Settings `appNameFactory` causes Firebase Performance Monitoring to break

Open Blunderchips opened this issue 4 years ago • 2 comments

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Versions


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 11.0.5
Node: 12.18.2
OS: linux x64

Angular: 11.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
... service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.5
@angular-devkit/build-angular   0.1100.5
@angular-devkit/core            10.1.1
@angular-devkit/schematics      11.0.5
@angular/cdk                    11.0.3
@angular/fire                   6.1.4
@angular/flex-layout            11.0.0-beta.33
@angular/material               11.0.3
@schematics/angular             11.0.5
@schematics/update              0.1100.5
rxjs                            6.6.3
typescript                      4.0.5

Repro steps

Enable angularfire peformance, see here.

Set appNameFactory when importing NgxAuthFirebaseUIModule.

NgxAuthFirebaseUIModule.forRoot(
   connection,
   () => 'hello world',
   firebaseAuthUIConfing,
),

The log given by the failure

core.js:5967 ERROR Error: Uncaught (in promise): FirebaseError: Performance: Performance can only start when Firebase app instance is the default one. (performance/FB not default).
FirebaseError: Performance: Performance can only start when Firebase app instance is the default one. (performance/FB not default).
    at factoryMethod (index.esm.js:1426)
    at Component.instanceFactory (index.esm.js:1445)
    at Provider.push./6Yf.Provider.getOrInitializeService (index.esm.js:218)
    at Provider.push./6Yf.Provider.getImmediate (index.esm.js:116)
    at FirebaseAppImpl.push.zIRd.FirebaseAppImpl._getService (index.esm.js:220)
    at FirebaseAppImpl.firebaseAppImpl.<computed> [as performance] (index.esm.js:432)
    at angular-fire-performance.js:63
    at ZoneDelegate.invoke (zone-evergreen.js:364)
    at Zone.run (zone-evergreen.js:123)
    at NgZone.runOutsideAngular (core.js:28209)
    at resolvePromise (zone-evergreen.js:798)
    at resolvePromise (zone-evergreen.js:750)
    at zone-evergreen.js:860
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:28269)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at drainMicroTaskQueue (zone-evergreen.js:569)

Desired functionality

Peformance works with appNameFactory set.

Mention any other details that might be useful

There this stackoverflow question where is suggests removing the appNameFactory from the config.

Blunderchips avatar Dec 29 '20 14:12 Blunderchips

any progress on this issue?

rubenheymans avatar Jul 20 '21 17:07 rubenheymans

any idea how to improve that?

AnthonyNahas avatar Feb 15 '22 22:02 AnthonyNahas