Ionic 3 app using Sentry - Uncaught (in promise): not implemented

I am trying to incorporate Sentry into my Ionic 3 app. I followed the Ionic documentation: https://docs.sentry.io/clients/cordova/ionic/

I am getting the following: Uncaught (in promise): not implemented

My app.module looks like this:

    import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';


import * as Sentry from 'sentry-cordova';

Sentry.init({ dsn: 'https://93da91970aa44726af36c2ee43283795@sentry.io/1253164' });


/*Pro.init('45b1038d', {
  appVersion: '0.0.1'
})*/


class SentryIonicErrorHandler extends IonicErrorHandler {
  handleError(error) {
    super.handleError(error);
    try {
      Sentry.captureException(error.originalError || error);
    } catch (e) {
      console.error(e);
    }
  }
}

/*@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 && this.ionicErrorHandler.handleError(err);
  }
}*/

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: SentryIonicErrorHandler}
    //IonicErrorHandler,
        //[{ provide: ErrorHandler, useClass: MyErrorHandler }]
    //{provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}

For ref: https://github.com/getsentry/sentry-cordova/issues/72 :slight_smile:

I appreciate the quick response - how should we get the latest if we are not pulling from Github?