Skip to content

Version mismatch between @sentry/javascript packages installed by user and the @sentry/capacitor package. #66

@squio

Description

@squio

Environment

How do you use Sentry?

  • Sentry SaaS (sentry.io)

Which SDK and version?

  • Ionic/Angular 5.6.4
  • Angular 11.2.9
  • Capacitor 3.0.1
  • "@sentry/angular": "^6.10.0",
  • "@sentry/capacitor": "^0.3.0",

Steps to Reproduce

Implement Hello World example as per git README instructions, not onboarding example which looks outdated

All relevant code in app-module.ts:

import {ErrorHandler, Injectable, NgModule} from '@angular/core';
import * as Sentry from "@sentry/capacitor";
import { init as sentryAngularInit, createErrorHandler }  from "@sentry/angular";
// ...

Sentry.init({
    dsn: 'https://gsdhgdshghdsds.ingest.sentry.io/32444532',
}, sentryAngularInit);
Sentry.captureMessage('Hello, world!');
// ...

@NgModule({
    declarations: [
        AppComponent,
    ],
    entryComponents: [],
    imports: [
// ...
       ],
    providers: [
        WebView,
//...
        {
            provide: ErrorHandler,
            useValue: createErrorHandler(),
        },
    ],
    bootstrap: [AppComponent]
})
export class AppModule
{
}

Build for Android using Android studio and the following steps:

  • ionic cap sync android
  • build in Android studio
  • run on real device (not emulator)

Expected Result

Just one issue: Hello, world! from http://localhost/
And maybe a lot of other exceptions caused by my code ;-)

Actual Result

Apart from the one Hello World there are many exceptions from Sentry itself: taskProducer is not a function

There are 50 events of this issue in just one App launch without any further interacetion

Screenshot 2021-07-28 at 11-43-43 TypeError taskProducer is not a function

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions