capacitor-community / firebase-remote-config

MIT License
23 stars 38 forks source link

Firebase App has not yet initialized. #7

Open dodomui opened 4 years ago

dodomui commented 4 years ago
Describe the bug Error message received: `Firebase App has not yet initialized. (anonymous) @ instrument.js:108
  (anonymous) @ web.js:161
  fulfilled @ web.js:4
  invoke @ zone-evergreen.js:364
  run @ zone-evergreen.js:123
  (anonymous) @ zone-evergreen.js:857
  invokeTask @ zone-evergreen.js:399
  runTask @ zone-evergreen.js:167
  drainMicroTaskQueue @ zone-evergreen.js:569
  invokeTask @ zone-evergreen.js:484
  invokeTask @ zone-evergreen.js:1621
  globalZoneAwareCallback @ zone-evergreen.js:1647
  load (async)    
  customScheduleGlobal @ zone-evergreen.js:1773
  scheduleTask @ zone-evergreen.js:385
  scheduleTask @ zone-evergreen.js:210
  scheduleEventTask @ zone-evergreen.js:236
  (anonymous) @ zone-evergreen.js:1928
  (anonymous) @ instrument.js:345
  (anonymous) @ trycatch.js:137
  desc.set @ zone-evergreen.js:1279
  (anonymous) @ web.js:188
  (anonymous) @ web.js:183
  ZoneAwarePromise @ zone-evergreen.js:960
  loadScripts @ web.js:177
  (anonymous) @ web.js:156
  (anonymous) @ web.js:7
  ZoneAwarePromise @ zone-evergreen.js:960
  push../node_modules/@capacitor-community/firebase-remote-config/dist/esm/web.js.__awaiter @ web.js:3
  configure @ web.js:154
  FirebaseRemoteConfigWeb @ web.js:28
  ./node_modules/@capacitor-community/firebase-remote-config/dist/esm/web.js @ web.js:205
  __webpack_require__ @ bootstrap:84
  ./node_modules/@capacitor-community/firebase-remote-config/dist/esm/index.js @ index.js:1
  __webpack_require__ @ bootstrap:84
  ./src/app/services/general/config.service.ts @ event-list.service.ts:18
  __webpack_require__ @ bootstrap:84
  ./src/app/services/event/event-list.service.ts @ device.service.ts:27
  __webpack_require__ @ bootstrap:84
  ./src/app/services/user/user.service.ts @ provider.service.ts:9
  __webpack_require__ @ bootstrap:84
  ./src/app/app.component.ts @ main.js:704
  __webpack_require__ @ bootstrap:84
  ./src/app/app.module.ts @ app.component.ts:28
  __webpack_require__ @ bootstrap:84
  ./src/main.ts @ main.ts:1
  __webpack_require__ @ bootstrap:84
  0 @ main.ts:17
  __webpack_require__ @ bootstrap:84
  checkDeferredModules @ bootstrap:45
  webpackJsonpCallback @ bootstrap:32
  (anonymous)

`

To Reproduce Will see this error as long as I import the plugin. import '@capacitor-community/firebase-remote-config'; import { Plugins } from '@capacitor/core'; const { FirebaseRemoteConfig } = Plugins;

Additional context "@capacitor-community/firebase-remote-config": "^0.1.3",

Ionic:

Ionic CLI : 6.11.0 Ionic Framework : @ionic/angular 5.2.2 @angular-devkit/build-angular : 0.901.9 @angular-devkit/schematics : 9.1.9 @angular/cli : 9.1.9 @ionic/angular-toolkit : 2.2.0

Capacitor:

Capacitor CLI : 2.2.0 @capacitor/core : 2.4.0

Utility:

cordova-res : 0.15.1 native-run : 1.0.0

System:

NodeJS : v12.16.1 npm : 6.14.7 OS : macOS Catalina

mic345 commented 3 years ago

Hi dodomui,

Comparing FirebaseRemoteConfigWeb.configure() and FirebaseAnalyticsWeb.configure() I wonder if the message should be printed at all.

Thanks, mic.