nativescript-community / nativescript-community/sentry

Can't set other options in init

Open
#22 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
18
Forks
12
PR merge metrics
No merged PRs in 30d

Description

When setting other options in the init, the code fails with:

  JS: CONSOLE ERROR: Error starting Sentry Error: Cannot convert boolean to Ljava/lang/Boolean; at index 0 Error: Cannot convert boolean to Ljava/lang/Boolean; at index 0
  JS:     at file: src/webpack:/MobileApp/node_modules/@nativescript-community/sentry/wrapper.android.js:346:55

For example in the following code:

Sentry.init({
	dsn: "dsnhere",
	enableAutoPerformanceTracking: true,
	enableTracing: true,
	tracesSampleRate: 1,
});

The error relates to the following line: https://github.com/nativescript-community/sentry/blob/master/src/sentry/wrapper.android.ts#L385

Perhaps a case for booleans need to be added as well?

Edit: looks like it's specifically enableTracing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/sentry/wrapper.android.ts around line 385 and trace how enableTracing is handled in init options. Reproduce the issue with the shown Sentry.init configuration and verify that the boolean options no longer produce the Android conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.