title: Property 'take' does not exist on type 'AngularFireObject<unknown>'.ts
body: <p>Property 'take' does not exist on type 'AngularFireObject'.ts</p>
  <p>I have this error in my code at 4 places in the Ionic app I am working on and I can't find a way to resolve it, even after looking on-line and trying myself.  Seems to be no information about the take() method about what it does or did.  I just can't figure it out!</p>
  <p>I am working with npm Ionic's AuthService module.  This code has not changed but I have upgraded some components within the project.  Here is the code which generates the error above.</p>
  <pre><code>this.authService.go().take(1).subscribe(snapshot =&gt; {
    if (snapshot.$value &gt; 0) {
      this.navCtrl.push(HomePage);
      return;
    }
  });
  </code></pre>
  <p>this is my package.json file</p>
  <pre><code>{
    &quot;name&quot;: &quot;&quot;,
    &quot;version&quot;: &quot;0.0.25&quot;,
    &quot;author&quot;: &quot;&quot;,
    &quot;homepage&quot;: &quot;&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;clean&quot;: &quot;ionic-app-scripts clean&quot;,
      &quot;build&quot;: &quot;ionic-app-scripts build&quot;,
      &quot;lint&quot;: &quot;ionic-app-scripts lint&quot;,
      &quot;ionic:build&quot;: &quot;ionic-app-scripts build&quot;,
      &quot;ionic:serve&quot;: &quot;ionic-app-scripts serve&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@angular/compiler&quot;: &quot;11.1.1&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;11.1.1&quot;,
      &quot;@angular/fire&quot;: &quot;^6.1.4&quot;,
      &quot;@angular/forms&quot;: &quot;11.1.1&quot;,
      &quot;@angular/http&quot;: &quot;5.0.1&quot;,
      &quot;@angular/platform-browser&quot;: &quot;11.1.1&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;11.1.1&quot;,
      &quot;@ionic-native/background-geolocation&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/background-mode&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/camera&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/core&quot;: &quot;5.31.1&quot;,
      &quot;@ionic-native/date-picker&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/device&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/file&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/file-path&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/file-transfer&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/geolocation&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/google-maps&quot;: &quot;^5.5.0&quot;,
      &quot;@ionic-native/http&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/in-app-browser&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/network&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/onesignal&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/pedometer&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/photo-library&quot;: &quot;^5.31.1&quot;,
      &quot;@ionic-native/safari-view-controller&quot;: &quot;^5.18.0&quot;,
      &quot;@ionic-native/splash-screen&quot;: &quot;5.31.1&quot;,
      &quot;@ionic-native/status-bar&quot;: &quot;5.31.1&quot;,
      &quot;@ionic-native/transfer&quot;: &quot;^3.14.0&quot;,
      &quot;@ionic/pro&quot;: &quot;^2.0.4&quot;,
      &quot;@ionic/storage&quot;: &quot;^2.3.0&quot;,
      &quot;@types/cordova&quot;: &quot;0.0.34&quot;,
      &quot;@types/google-maps&quot;: &quot;^3.2.2&quot;,
      &quot;angular-authentication-service&quot;: &quot;^1.1.8&quot;,
      &quot;angular-gauge&quot;: &quot;^4.0.0&quot;,
      &quot;angular-progress-bar&quot;: &quot;^1.0.11&quot;,
      &quot;angularfire2&quot;: &quot;^5.4.2&quot;,
      &quot;angularfire2-offline&quot;: &quot;^4.3.1&quot;,
      &quot;brmasker-ionic-3&quot;: &quot;^1.6.3&quot;,
      &quot;cordova-android&quot;: &quot;^9.0.0&quot;,
      &quot;cordova-android-support-gradle-release&quot;: &quot;^3.0.1&quot;,
      &quot;cordova-background-geolocation-lt&quot;: &quot;^3.9.4&quot;,
      &quot;cordova-ios&quot;: &quot;^6.1.1&quot;,
      &quot;cordova-plugin-add-swift-support&quot;: &quot;^2.0.2&quot;,
      &quot;cordova-plugin-advanced-http&quot;: &quot;^3.1.0&quot;,
      &quot;cordova-plugin-app-version&quot;: &quot;^0.1.12&quot;,
      &quot;cordova-plugin-background-mode&quot;: &quot;0.7.3&quot;,
      &quot;cordova-plugin-camera&quot;: &quot;^5.0.1&quot;,
      &quot;cordova-plugin-cocoalumberjack&quot;: &quot;0.0.4&quot;,
      &quot;cordova-plugin-datepicker&quot;: &quot;^0.9.3&quot;,
      &quot;cordova-plugin-device&quot;: &quot;^2.0.3&quot;,
      &quot;cordova-plugin-file&quot;: &quot;^6.0.2&quot;,
      &quot;cordova-plugin-filepath&quot;: &quot;^1.5.6&quot;,
      &quot;cordova-plugin-googlemaps&quot;: &quot;^2.7.1&quot;,
      &quot;cordova-plugin-googlemaps-sdk&quot;: &quot;git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#3.8.0&quot;,
      &quot;cordova-plugin-inappbrowser&quot;: &quot;^4.1.0&quot;,
      &quot;cordova-plugin-ionic&quot;: &quot;^5.0.0&quot;,
      &quot;cordova-plugin-ionic-keyboard&quot;: &quot;^2.2.0&quot;,
      &quot;cordova-plugin-ios-camera-permissions&quot;: &quot;^1.2.0&quot;,
      &quot;cordova-plugin-network-information&quot;: &quot;^2.0.2&quot;,
      &quot;cordova-plugin-photo-library&quot;: &quot;^2.3.1&quot;,
      &quot;cordova-plugin-splashscreen&quot;: &quot;6.0.0&quot;,
      &quot;cordova-plugin-statusbar&quot;: &quot;^2.4.3&quot;,
      &quot;cordova-plugin-transport-security&quot;: &quot;~0.1.2&quot;,
      &quot;cordova-plugin-whitelist&quot;: &quot;1.3.4&quot;,
      &quot;cordova-sqlite-storage&quot;: &quot;^5.1.0&quot;,
      &quot;fcm&quot;: &quot;^1.0.3&quot;,
      &quot;firebase&quot;: &quot;^8.2.*&quot;,
      &quot;ion-multi-picker&quot;: &quot;^2.1.3&quot;,
      &quot;ionic&quot;: &quot;^5.4.4&quot;,
      &quot;ionic-angular&quot;: &quot;^3.9.10&quot;,
      &quot;ionicons&quot;: &quot;5.4.0&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;node-sass&quot;: &quot;^5.0.0&quot;,
      &quot;onesignal-cordova-plugin&quot;: &quot;^2.11.2&quot;,
      &quot;rxjs&quot;: &quot;^5.5.11&quot;,
      &quot;rxjs-compat&quot;: &quot;^6.6.3&quot;,
      &quot;simple-crypto-js&quot;: &quot;^3.0.0&quot;,
      &quot;sw-toolbox&quot;: &quot;3.6.0&quot;,
      &quot;zone.js&quot;: &quot;0.11.3&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular/common&quot;: &quot;^11.1.2&quot;,
      &quot;@angular/core&quot;: &quot;^6.0.0-rc.0&quot;,
      &quot;@ionic/angular&quot;: &quot;^5.5.4&quot;,
      &quot;@ionic/app-scripts&quot;: &quot;3.2.4&quot;,
      &quot;com-sarriaroman-photoviewer&quot;: &quot;^1.2.5&quot;,
      &quot;cordova-plugin-background-fetch&quot;: &quot;^6.1.1&quot;,
      &quot;cordova-plugin-safariviewcontroller&quot;: &quot;^1.6.0&quot;,
      &quot;typescript&quot;: &quot;4.1.3&quot;
    },
    &quot;config&quot;: {
      &quot;ionic_bundler&quot;: &quot;webpack&quot;,
      &quot;ionic_source_map&quot;: &quot;source-map&quot;,
      &quot;ionic_source_map_type&quot;: &quot;#inline-source-map&quot;,
      &quot;ionic_copy&quot;: &quot;./config/webpack.config.js&quot;
    },
    &quot;description&quot;: &quot;MedalMad Running App&quot;,
    &quot;cordova&quot;: {
      &quot;plugins&quot;: {
        &quot;cordova-plugin-camera&quot;: {},
        &quot;cordova-plugin-device&quot;: {},
        &quot;cordova-plugin-whitelist&quot;: {},
        &quot;cordova-plugin-splashscreen&quot;: {},
        &quot;cordova-plugin-ionic-keyboard&quot;: {},
        &quot;cordova-plugin-inappbrowser&quot;: {},
        &quot;cordova-plugin-ios-camera-permissions&quot;: {
          &quot;CAMERA_USAGE_DESCRIPTION&quot;: &quot;This app needs camera access&quot;,
          &quot;MICROPHONE_USAGE_DESCRIPTION&quot;: &quot;This app needs microphone access&quot;,
          &quot;PHOTOLIBRARY_ADD_USAGE_DESCRIPTION&quot;: &quot;This app needs write-access to photo library&quot;,
          &quot;PHOTOLIBRARY_USAGE_DESCRIPTION&quot;: &quot;This app needs read/write-access photo library access&quot;
        },
        &quot;cordova-plugin-statusbar&quot;: {},
        &quot;cordova-plugin-app-version&quot;: {},
        &quot;cordova-plugin-background-mode&quot;: {},
        &quot;cordova-plugin-advanced-http&quot;: {
          &quot;OKHTTP_VERSION&quot;: &quot;3.10.0&quot;
        },
        &quot;cordova-background-geolocation-lt&quot;: {
          &quot;OKHTTP_VERSION&quot;: &quot;3.10.0&quot;,
          &quot;GOOGLE_API_VERSION&quot;: &quot;16.+&quot;,
          &quot;APPCOMPAT_VERSION&quot;: &quot;28.+&quot;,
          &quot;EVENTBUS_VERSION&quot;: &quot;3.0.0&quot;,
          &quot;BACKGROUND_MODE_LOCATION&quot;: &quot;&lt;string&gt;location&lt;/string&gt;&quot;,
          &quot;LICENSE&quot;: &quot;4b54a050b2e6c3226c30cc86cc9d43ea35d99218d54492ca6eaea2aebed91aa8&quot;,
          &quot;LOCATION_ALWAYS_AND_WHEN_IN_USE_USAGE_DESCRIPTION&quot;: &quot;Always use is required for constant background location-tracking&quot;,
          &quot;LOCATION_ALWAYS_USAGE_DESCRIPTION&quot;: &quot;Background location-tracking is required&quot;,
          &quot;LOCATION_WHEN_IN_USE_USAGE_DESCRIPTION&quot;: &quot;Background location-tracking is required&quot;,
          &quot;MOTION_USAGE_DESCRIPTION&quot;: &quot;Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving&quot;
        },
        &quot;cordova-plugin-transport-security&quot;: {},
        &quot;cordova-plugin-filepath&quot;: {},
        &quot;cordova-plugin-network-information&quot;: {},
        &quot;cordova-plugin-photo-library&quot;: {
          &quot;PHOTO_LIBRARY_USAGE_DESCRIPTION&quot;: &quot; &quot;
        },
        &quot;onesignal-cordova-plugin&quot;: {},
        &quot;com-sarriaroman-photoviewer&quot;: {},
        &quot;cordova-plugin-safariviewcontroller&quot;: {},
        &quot;cordova-plugin-datepicker&quot;: {}
      },
      &quot;platforms&quot;: [
        &quot;ios&quot;,
        &quot;android&quot;
      ]
    }
  }
  </code></pre>
  <p>this is my app.module.ts:</p>
  <pre><code>import { AngularFireAuth } from &quot;angularfire2/auth&quot;;
  import { BrowserModule } from &quot;@angular/platform-browser&quot;;
  import { ErrorHandler, NgModule, Injectable, Injector } from &quot;@angular/core&quot;;
  import { IonicApp, IonicErrorHandler, IonicModule } from &quot;ionic-angular&quot;;
  import { AngularFireModule } from &quot;angularfire2&quot;;
  import { AngularFireOfflineModule } from &quot;angularfire2-offline&quot;;
  import { AngularFireDatabaseModule } from &quot;angularfire2/database&quot;;
  import { MyApp } from &quot;./app.component&quot;;
  import { AuthService } from &quot;../services/auth-services&quot;;
  import { HomePage } from &quot;../pages/home/home&quot;;
  import { ListPage } from &quot;../pages/list/list&quot;;
  import { SignupPage } from &quot;../pages/signup/signup&quot;;
  import { RaceResultsPage } from &quot;../pages/race-results/race-results&quot;;
  import { LoginPage } from &quot;../pages/login/login&quot;;
  import { BrMaskerModule } from &quot;brmasker-ionic-3&quot;;
  import { globalService } from &quot;../services/globals&quot;;
  import { ChallengesPage } from &quot;../pages/challenges/challenges&quot;;
  import { TrackerPage } from &quot;../pages/tracker/tracker&quot;;
  import { TrackerWeightPage } from '../pages/tracker-weight/tracker-weight';
  import { TrackerUploadOnlyPage } from '../pages/tracker-upload-only/tracker-upload-only';
  import { StatsPage } from &quot;../pages/stats/stats&quot;;
  import { StatusBar } from &quot;@ionic-native/status-bar/ngx&quot;;
  import { SplashScreen } from &quot;@ionic-native/splash-screen/ngx&quot;;
  import { Geolocation } from &quot;@ionic-native/geolocation/ngx&quot;;
  import { SafariViewController } from &quot;@ionic-native/safari-view-controller/ngx&quot;;
  import { IonicStorageModule } from &quot;@ionic/storage&quot;;
  import { InAppBrowser } from &quot;@ionic-native/in-app-browser/ngx&quot;;
  import { HttpModule } from &quot;@angular/http&quot;;
  import { ProgressBarModule } from &quot;angular-progress-bar&quot;;
  import { GaugeModule } from &quot;angular-gauge&quot;;
  import { BackgroundGeolocation } from &quot;@ionic-native/background-geolocation/ngx&quot;;
  import { CommunityPage } from &quot;../pages/community/community&quot;;
  import { OneSignal } from &quot;@ionic-native/onesignal/ngx&quot;;
  import { Camera, CameraOptions } from &quot;@ionic-native/camera/ngx&quot;;
  import { DatePicker } from '@ionic-native/date-picker/ngx';
  import { PhotoLibrary } from &quot;@ionic-native/photo-library/ngx&quot;;
  import { NotificationPage } from &quot;../pages/notification/notification&quot;;
  import { BackgroundMode } from &quot;@ionic-native/background-mode/ngx&quot;;
  import { Device } from &quot;@ionic-native/device/ngx&quot;;
  import { LeaderBoardPage } from '../pages/leader-board/leader-board';
  import { LeaderBoardTeamsPage } from '../pages/leader-board-teams/leader-board-teams'
  import { HTTP } from '@ionic-native/http/ngx';
  import { Network } from '@ionic-native/network/ngx';
  import { ChallengeDownloadsPage } from '../pages/challenge-downloads/challenge-downloads';
  import { OrderHistoryPage } from '../pages/order-history/order-history';
  import { take } from 'rxjs/operators/take';
  
  // Pro.init('26fccb2a', {
  //   appVersion: '0.82'
  // })
  
  @Injectable()
  export class MyErrorHandler implements ErrorHandler {
    ionicErrorHandler: IonicErrorHandler;
  
    constructor(injector: Injector) {
      try {
        this.ionicErrorHandler = injector.get(IonicErrorHandler);
      } catch (e) {
        // Unable to get the IonicErrorHandler provider, ensure
        // IonicErrorHandler has been added to the providers list below
      }
    }
  
  
    handleError(err: any): void {
      //Pro.monitoring.handleNewError(err);
      // Remove this if you want to disable Ionic's auto exception handling
      // in development mode.
      this.ionicErrorHandler &amp;&amp; this.ionicErrorHandler.handleError(err);
    }
  }
  
  @NgModule({
    declarations: [
      MyApp,
      HomePage,
      ListPage,
      SignupPage,
      LoginPage,
      ChallengesPage,
      CommunityPage,
      ChallengeDownloadsPage,
      OrderHistoryPage,
      TrackerPage,
      TrackerUploadOnlyPage,
      TrackerWeightPage,
      StatsPage,
      RaceResultsPage,
      LeaderBoardPage,
      LeaderBoardTeamsPage,
      NotificationPage
    ],
    imports: [
      BrowserModule,
      HttpModule,
      BrMaskerModule,
      ProgressBarModule,
      IonicModule.forRoot(MyApp),
      IonicStorageModule.forRoot(),
      GaugeModule.forRoot(),
      AngularFireModule.initializeApp(firebaseConfig),
      AngularFireDatabaseModule,
      AngularFireOfflineModule
    ],
    bootstrap: [IonicApp],
    entryComponents: [
      MyApp,
      HomePage,
      ListPage,
      SignupPage,
      LoginPage,
      ChallengesPage,
      TrackerPage,
      TrackerWeightPage,
      TrackerUploadOnlyPage,
      StatsPage,
      RaceResultsPage,
      LeaderBoardPage,
      LeaderBoardTeamsPage,
      NotificationPage,
      CommunityPage,
      ChallengeDownloadsPage,
      OrderHistoryPage
    ],
    providers: [
      BackgroundGeolocation,
      SafariViewController,
      DatePicker,
      Device,
      HTTP,
      Network,
      OneSignal,
      IonicErrorHandler,
      [{ provide: ErrorHandler, useClass: MyErrorHandler }],
      StatusBar,
      SplashScreen,
      Geolocation,
      BackgroundMode,
      PhotoLibrary,
      Camera,
      InAppBrowser,
      { provide: ErrorHandler, useClass: IonicErrorHandler },
      globalService,
      AuthService,
      AngularFireAuth
    ]
  })
  export class AppModule { }
  </code></pre>