Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Exceptions must be explicitly caught and reported for source mapping to work

Aperta
#2 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ios, typescript

Direzione di ricerca

Inizia tracciando la gestione automatica delle eccezioni del plugin su iOS e confrontala con il percorso manuale Sentry.captureException(error) descritto nel report. Verifica che un crash non intercettato produca frame JavaScript con il mapping delle sorgenti invece di uno stack in testo semplice, in linea con il comportamento dell’eccezione segnalata manualmente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.init({
  dsn, 
  appPrefix: "app:///",
  release: "Your custom release name",
  dist: "Your custom dist name",
});

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

The exception will get reported to Sentry, but the JS stack trace will appear as a plain text string and source mapping will not occur. If instead you manually catch and report the exception source mapping will work. Presumably, stack trace frame rewriting only occurs when exceptions are manually caught and reported. This is problematic because you don't know in advance where exceptions will occur, and wrapping all code in try/catch blocks is unfeasible.

Lingua principale
TypeScript
Stelle
18
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nativescript-community/sentry

Tutte le issue di nativescript-community/sentry

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.