Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular - Uncaught SentryError: Native Client is not available, can't start on native. #193

Closed
3 tasks done
dodomui opened this issue Jul 9, 2022 · 27 comments · Fixed by #199
Closed
3 tasks done

Comments

@dodomui
Copy link

dodomui commented Jul 9, 2022

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/angular

SDK Version

7.6.0

Framework Version

0.6.1

Link to Sentry event

No response

Steps to Reproduce

Environment

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

Which SDK and version?

@sentry/angular: ^7.6.0
@sentry/capacitor: ^0.6.1

Ionic:

   Ionic CLI                     : 6.20.1
   Ionic Framework               : @ionic/angular 6.1.13
   @angular-devkit/build-angular : 14.0.5
   @angular-devkit/schematics    : 14.0.5
   @angular/cli                  : 14.0.5
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 3.6.0
   @capacitor/android : 3.6.0
   @capacitor/core    : 3.6.0
   @capacitor/ios     : 3.6.0

Steps to Reproduce

error.js:8 Uncaught SentryError: Native Client is not available, can't start on native.
    at new SentryError (error.js:8:28)
    at 41406 (wrapper.js:336:25)
    at __webpack_require__ (bootstrap:19:1)
    at 88931 (index.js:2:1)
    at __webpack_require__ (bootstrap:19:1)
    at 71571 (eventorigin.js:2:1)
    at __webpack_require__ (bootstrap:19:1)
    at 82103 (scope.js:7:1)
    at __webpack_require__ (bootstrap:19:1)
    at 85208 (xhr.js:49:2)

Expected Result

Had been using sentry capacitor plugin for several months.
This issue happens recently and unable to initial sentry service and App at all.

Actual Result

error.js:8 Uncaught SentryError: Native Client is not available, can't start on native.
    at new SentryError (error.js:8:28)
    at 41406 (wrapper.js:336:25)
    at __webpack_require__ (bootstrap:19:1)
    at 88931 (index.js:2:1)
    at __webpack_require__ (bootstrap:19:1)
    at 71571 (eventorigin.js:2:1)
    at __webpack_require__ (bootstrap:19:1)
    at 82103 (scope.js:7:1)
    at __webpack_require__ (bootstrap:19:1)
    at 85208 (xhr.js:49:2)
@marandaneto marandaneto transferred this issue from getsentry/sentry-javascript Jul 11, 2022
@AbhiPrasad
Copy link
Member

Hey, thanks for writing in! You'll have to make sure your @sentry/angular is at 6.19.2. Does that fix the problem?

@dodomui
Copy link
Author

dodomui commented Jul 13, 2022

Here is my sentry version
@sentry/angular 7.6.0
@sentry/capacitor ^0.7.0

The problem still persist.

@stevecarlton
Copy link

I received this error and assumed, perhaps incorrectly, that it was due to lack of Angular 14 support in this plugin. Once the Angular 14 support ships, I can re-test.

@AbhiPrasad
Copy link
Member

@lucas-zimerman any ideas?

@muuvmuuv
Copy link

Try this, got the same error. It is always the peer that is making trouble, so make sure you remove the "^" from the peer version.

"@sentry/angular": "7.1.1",
"@sentry/capacitor": "^0.7.0",
"@sentry/tracing": "7.1.1",

@EinfachHans
Copy link

I got this error on @sentry/angular": "7.2.0" but not on @sentry/angular": "7.1.1". Not 100% sure but i think this PR is the reason: getsentry/sentry-javascript#5260 because this new method is shown in the stacktrace

@lucas-zimerman lucas-zimerman self-assigned this Jul 19, 2022
@lucas-zimerman
Copy link
Collaborator

Just to make sure, are you facing this issue on the Web or on Mobile?
Also at the moment the current SDK is incompatible with Angular 14, the next release will fix that problem.

@EinfachHans
Copy link

@lucas-zimerman Web 😊 Any ETA for that next release? we want to upgrade to angular 14

@sync667
Copy link

sync667 commented Jul 19, 2022

Downgraded to Angular 13 and still have same issue.

@muuvmuuv
Copy link

Still an issue with

"@sentry/angular": "7.6.0",
    "@sentry/capacitor": "0.7.1",
    "@sentry/tracing": "7.6.0",

@WetCouch
Copy link

Facing the same issue on Web with

"@sentry/angular": "7.1.1",
"@sentry/capacitor": "0.7.0",

@lucas-zimerman
Copy link
Collaborator

@lucas-zimerman Web 😊 Any ETA for that next release? we want to upgrade to angular 14

Hi, version 0.7.1 got released, could you check if the problem persists?

@lucas-zimerman
Copy link
Collaborator

Facing the same issue on Web with

"@sentry/angular": "7.1.1",
"@sentry/capacitor": "0.7.0",

You'll need to update @sentry/capacitor but also @sentry/angular to 7.6.0 (the version that got the issues fixed with Angular 14)

@EinfachHans
Copy link

@lucas-zimerman Version 0.7.1 in combination with 7.6.0 still throws this error when running in the web

@lucas-zimerman
Copy link
Collaborator

Ok, I may have found the source of the issue, I'll check what's enabling the Native flag on the Web code tomorrow and hopefully it's just a quick fix to unblock you from using Angular 14.

@WetCouch
Copy link

WetCouch commented Jul 20, 2022

@lucas-zimerman Tried it with newer versions, didn't resolve the issue, but also don't think it's related to Angular version in my case, as I'm still on Angular 13. Until I got it wrong, and the Capacitor plugin doesn't recognize the web out of the box, and I should conditionally initialize the Capacitor Sentry on mobile platforms, and Angular Sentry on web.

@sdsanders
Copy link

sdsanders commented Jul 20, 2022

I'm also running into this on the web with Angular 12, @sentry/angular 7.6.0, and @sentry/capacitor 0.7.1.

@dodomui
Copy link
Author

dodomui commented Jul 23, 2022

Update: The latest version still having the same issue.
"@sentry/angular": "^7.7.0",
"@sentry/capacitor": "^0.7.1",

This error happens while running ionic serve.
It working well on native App but not ionic serve & web

@EinfachHans
Copy link

@lucas-zimerman any updates? 😬

@lucas-zimerman
Copy link
Collaborator

@lucas-zimerman any updates? 😬

Hi, you were correct :D, getsentry/sentry-javascript#5260 introduced a new call to SetContext and that sets the context before the Capacitor SDK gets initialized,

I'll release a PR to fix this new Behavior.

@bentzibentz
Copy link

With the latest version i still have the same issue.
"@sentry/angular": "^7.12.0",
"@sentry/capacitor": "^0.9.0",

This error happens while running ionic serve.

@lucas-zimerman lucas-zimerman changed the title Uncaught SentryError: Native Client is not available, can't start on native. Angular - Uncaught SentryError: Native Client is not available, can't start on native. Sep 1, 2022
@tharrington
Copy link

This is still an issue for me as well:

"@sentry/angular": "^7.37.1",
"@sentry/capacitor": "^0.11.2",

@AbhiPrasad
Copy link
Member

@tharrington if you run npm run why @sentry/angular, what version do you get? If it isn't 7.37.1 exactly you'll be getting problems, since that is what Capacitor 0.11.2 expects:

"@sentry/angular": "7.37.1",
"@sentry/react": "7.37.1",
"@sentry/vue": "7.37.1"

@tharrington
Copy link

Yes, I checked it is 7.37.1

@tharrington
Copy link

Any update there?

@AbhiPrasad
Copy link
Member

@lucas-zimerman could you take a look?

@bruno-garcia
Copy link
Member

Oh I see @tharrington opened a new one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.