question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No error sents on native devices

See original GitHub issue

Environment

How do you use Sentry? Sentry SaaS (sentry.io)

Which SDK and version?

"@angular/core": "~10.0.0",
"@capacitor/android": "^2.4.6",
"@capacitor/core": "2.4.6",
"@capacitor/ios": "^2.4.6",
"@sentry/angular": "^6.16.1",
"@sentry/capacitor": "^0.4.1"

Steps to Reproduce

I use the default setup

// app.module.ts
Sentry.init(
    {
        dsn: 'https://xxxxxx@xxxxx.ingest.sentry.io/xxxxxx',
        release: 'myapp@0.9',
        dist: '0.9',
        tracesSampleRate: 1.0,
        integrations: [
            new TracingIntegrations.BrowserTracing({
                tracingOrigins: ['localhost'],
            }),
        ]
    },
    // Forward the init method from @sentry/angular
    SentryAngular.init
);


@NgModule({
    declarations: [AppComponent],
    entryComponents: [],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        IonicModule.forRoot(),
        AppRoutingModule,
        HttpClientModule,
        IonicStorageModule.forRoot()
    ],
    providers: [
        {provide: ErrorHandler, useValue: SentryAngular.createErrorHandler()},
        {provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
        File,
        FileTransfer,
        InAppBrowser,
        AuthGuardService,
        HTTP,
        FileOpener
    ],
    bootstrap: [AppComponent]
})
export class AppModule {}
// app.component.ts
throwError() {
    throw new Error(`Test Thrown Error`);
}

throwErrorNative() {
  Sentry.nativeCrash();
}

Expected Result

Should throw errors and log it t sentry.io with a click of a button but I’m receiving nothing when using real devices (both android and iOS).

Actual Result

It works when I run it in the browser using ionic serve

It throws this error at startup :

Unhandled Promise rejection: Native Client is not available, can't start on native. ; Zone: <root> ; Task: null ; Value: e: Native Client is not available, can't start on native.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brosparscommented, Dec 20, 2021

Yes I did, maybe I missed a step but I don’t think so because on iOS when I sync using ionic capacitor sync ios it says Updating iOS native dependencies, etc. I think it could be that I’m running Capacitor 2 and not 3. I’ll try on a fresh install and come back to you.

0reactions
lucas-zimermancommented, May 23, 2022

Thanks for the fix 😄 The original issue may be unrelated but at this point could be fixed since in the past few months there were fixes in regard to the SDK Initialization.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Conditional Access - Intune - Microsoft Learn
Devices are noncompliant but users are not blocked · For Windows PCs, Conditional Access only blocks the native email app, Office 2013 with ......
Read more >
React Native Android Fetch failing on connection to local API
I'm not sure if this is what I'm supposed to be doing for testing on a physical device. My fetch code looks like...
Read more >
React Native Device Info - GitHub
Fired when the battery level changes; sent no more frequently than once per minute. Examples. import { useBatteryLevel } from 'react-native- ...
Read more >
Behavior changes: Apps targeting Android 12
Learn about changes in Android 12 that will affect apps when they target Android 12.
Read more >
Notifications Not Shown - Mobile Push
Common reasons why Mobile Push notifications are not showing on your device. ... "Delivered" notifications in OneSignal means we have successfully sent the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found