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

Custom release and dist not used for uncaught errors #1

Open
kajic opened this issue Jan 24, 2021 · 5 comments
Open

Custom release and dist not used for uncaught errors #1

kajic opened this issue Jan 24, 2021 · 5 comments

Comments

@kajic
Copy link

kajic commented Jan 24, 2021

Which platform(s) does your issue occur on?

  • Tested on iPhone 11 Xs Max
  • iOS 14.3

Please, provide the following version numbers that your issue occurs with:

  • CLI: 7.0.12
  • Cross-platform modules: 7.0.13
  • iOS Runtime: 7.0.6
  • Plugin(s):
"dependencies": {
    "@nativescript-community/push": "^1.1.9",
    "@nativescript-community/sentry": "^2.0.8",
    "@nativescript/core": "~7.0.0",
    "@nativescript/iqkeyboardmanager": "^2.0.0",
    "@nativescript/localize": "^5.0.2",
    "@nativescript/theme": "~2.3.0",
    "@nota/nativescript-webview-ext": "^7.0.3",
    "@nstudio/nativescript-pulltorefresh": "^3.0.1",
    "nativescript-lottie": "^5.0.2",
    "nativescript-sound-kak": "^1.2.0",
    "nativescript-vibrate": "^4.0.1",
    "nativescript-vue": "~2.8.0",
    "vuex": "^3.6.0"
  },
  "devDependencies": {
    "@babel/core": "~7.1.0",
    "@babel/preset-env": "~7.1.0",
    "@nativescript/android": "7.0.1",
    "@nativescript/ios": "7.0.6",
    "@nativescript/webpack": "~3.0.0",
    "@sentry/webpack-plugin": "^1.14.0",
    "babel-loader": "~8.0.0",
    "dotenv": "^8.2.0",
    "nativescript-vue-template-compiler": "~2.8.0",
    "node-sass": "^4.14.1",
    "vue-loader": "~15.9.3"
  },

Please, tell us how to recreate the issue in as much detail as possible.

Initialize the plugin like so:

import * as Sentry from '@nativescript-community/sentry';
const dsn = "your Sentry dsn here";
Sentry.setRelease("Your custom release name");
Sentry.setDist("Your custom dist name");
Sentry.init({
  dsn, 
  appPrefix: 'app:///',
});

Then cause the application to crash, and let the plugin catch and report the exception on its own (rather than try/catching it yourself manually).

The exception will get reported to Sentry, but you'll notice that your custom release and dist names were not used.

@farfromrefug
Copy link
Member

@kajic i see in my other projects that i do this:

Sentry = require('@nativescript-community/sentry');
            Sentry.init({
                dsn: SENTRY_DSN,
                appPrefix: SENTRY_PREFIX,
                release: `${version}`,
                dist: `${versionCode}.${gVars.platform}`
            });

There is a big difference because by doing so release and dist are to the native part. Can you try that way?

@kajic
Copy link
Author

kajic commented Jan 24, 2021

@farfromrefug Thanks for the suggestion! Unfortunately, the issue persists with release and dist passed in to init as well.

@farfromrefug
Copy link
Member

@kajic ios or android ?

@kajic
Copy link
Author

kajic commented Jan 25, 2021

@farfromrefug On iOS.

@farfromrefug
Copy link
Member

@kajic could you try on android? You might have found an issue with the ios implementation. Want to. make sure you have the same behavior as me on android

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

No branches or pull requests

2 participants