带有 sourcemap 问题的哨兵因此它不显示 ts 详细信息

Sentry with sourcemap issue hence it is not showing ts details

我在 Ionic 3 应用程序中使用 Sentry。我使用 Sentry Cordova 插件,在 Sentry 仪表板上一切正常。但是缺少一件事。即它不显示 .ts 文件。这似乎是一个源地图问题。关于如何解决此问题的任何线索?

注意:我需要将sourcemap发送到Sentry吗?但是上面的文档并没有说明这样的事情。我使用 Win 10 Pro OS 进行开发。那么我可以在 win 平台上使用他们的 CLI 吗?

以下是缺少 ts 详细信息以及 package.json 和依赖项的屏幕截图:

tsconfig.json

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "inlineSources": true,
    "sourceRoot": "/",
    "target": "es5"
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

package.json

{
    "name": "MyRo",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "config": {
        "ionic_generate_source_map": "true"
    },
    "dependencies": {
        "@angular/common": "5.0.0",
        "@angular/compiler": "5.0.0",
        "@angular/compiler-cli": "5.0.0",
        "@angular/core": "5.0.0",
        "@angular/forms": "5.0.0",
        "@angular/http": "5.0.0",
        "@angular/platform-browser": "5.0.0",
        "@angular/platform-browser-dynamic": "5.0.0",
        "@ionic-native/app-rate": "4.5.3",
        "@ionic-native/call-number": "4.3.3",
        "@ionic-native/camera": "4.3.2",
        "@ionic-native/contacts": "4.3.3",
        "@ionic-native/core": "4.3.3",
        "@ionic-native/facebook": "4.5.3",
        "@ionic-native/file": "4.5.3",
        "@ionic-native/file-opener": "4.5.3",
        "@ionic-native/firebase": "4.5.3",
        "@ionic-native/globalization": "4.5.3",
        "@ionic-native/google-plus": "4.5.3",
        "@ionic-native/in-app-browser": "4.6.0",
        "@ionic-native/local-notifications": "4.5.3",
        "@ionic-native/network": "4.5.3",
        "@ionic-native/screen-orientation": "4.4.2",
        "@ionic-native/social-sharing": "4.3.3",
        "@ionic-native/splash-screen": "4.3.2",
        "@ionic-native/status-bar": "4.3.2",
        "@ionic/storage": "2.1.3",
        "@types/papaparse": "4.1.33",
        "angular2-text-mask": "8.0.2",
        "angularfire2": "5.0.0-rc.6",
        "call-number": "^1.0.1",
        "cordova-android": "6.4.0",
        "cordova-android-support-gradle-release": "2.0.1",
        "cordova-ios": "4.5.5",
        "cordova-plugin-apprate": "1.4.0",
        "cordova-plugin-badge": "0.8.8",
        "cordova-plugin-camera": "2.4.1",
        "cordova-plugin-compat": "1.2.0",
        "cordova-plugin-contacts": "2.3.1",
        "cordova-plugin-device": "1.1.7",
        "cordova-plugin-dialogs": "2.0.1",
        "cordova-plugin-facebook4": "1.9.1",
        "cordova-plugin-file": "4.3.3",
        "cordova-plugin-file-opener2": "2.0.19",
        "cordova-plugin-firebase": "0.1.25",
        "cordova-plugin-globalization": "1.0.9",
        "cordova-plugin-googleplus": "5.2.1",
        "cordova-plugin-inappbrowser": "1.7.2",
        "cordova-plugin-ionic-webview": "1.1.16",
        "cordova-plugin-local-notification": "0.9.0-beta.2",
        "cordova-plugin-nativestorage": "2.3.2",
        "cordova-plugin-network-information": "2.0.1",
        "cordova-plugin-screen-orientation": "2.0.2",
        "cordova-plugin-splashscreen": "4.1.0",
        "cordova-plugin-statusbar": "2.3.0",
        "cordova-plugin-whitelist": "1.3.3",
        "cordova-plugin-x-socialsharing": "5.2.1",
        "cordova-sqlite-storage": "2.1.2",
        "es6-promise-plugin": "4.2.2",
        "firebase": "4.8.2",
        "highcharts": "6.0.2",
        "highcharts-more": "0.1.2",
        "ionic-angular": "3.9.2",
        "ionic-img-viewer": "2.7.3",
        "ionic-plugin-keyboard": "2.2.1",
        "ionic2-rating": "1.2.2",
        "ionicons": "3.0.0",
        "lodash": "4.17.11",
        "moment": "2.19.3",
        "mx.ferreyra.callnumber": "0.0.2",
        "ng2-truncate": "1.3.11",
        "papaparse": "4.3.7",
        "rxjs": "5.5.4",
        "sentry-cordova": "^0.15.0",
        "sw-toolbox": "3.6.0",
        "text-mask-addons": "3.6.0",
        "zone.js": "0.8.18"
    },
    "devDependencies": {
        "@ionic/app-scripts": "3.2.4",
        "typescript": "2.4.2"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-device": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-sqlite-storage": {},
            "cordova-plugin-ionic-webview": {},
            "cordova-plugin-camera": {
                "CAMERA_USAGE_DESCRIPTION": " ",
                "PHOTOLIBRARY_USAGE_DESCRIPTION": " "
            },
            "cordova-plugin-contacts": {
                "CONTACTS_USAGE_DESCRIPTION": " "
            },
            "cordova-plugin-x-socialsharing": {},
            "mx.ferreyra.callnumber": {},
            "call-number": {},
            "cordova-plugin-screen-orientation": {},
            "cordova-plugin-inappbrowser": {},
            "cordova-plugin-firebase": {},
            "cordova-plugin-apprate": {},
            "cordova-plugin-file": {},
            "cordova-plugin-file-opener2": {},
            "cordova-plugin-local-notification": {},
            "cordova-plugin-facebook4": {
                "APP_ID": "0",
                "APP_NAME": "My Re"
            },
            "cordova-plugin-googleplus": {
                "REVERSED_CLIENT_ID": ""
            },
            "cordova-plugin-globalization": {},
            "cordova-plugin-compat": {},
            "cordova-plugin-network-information": {},
            "cordova-android-support-gradle-release": {
                "ANDROID_SUPPORT_VERSION": "27.+"
            },
            "sentry-cordova": {}
        },
        "platforms": [
            "ios",
            "android"
        ]
    }
}

.ts

goToAddContacts() {
    throw new Error("I am a bug...");
 }

构建:ionic cordova run android --prod --device

这对我有用:

 SENTRY_SKIP_AUTO_RELEASE=true ionic cordova build android --prod

    ./node_modules/.bin/sentry-cli releases -o machines -p reno new 1.0.8

    ./node_modules/.bin/sentry-cli releases -o machines -p reno files 1.0.8 upload-sourcemaps www/build --rewrite

    ./node_modules/.bin/sentry-cli releases -o machines -p reno finalize 1.0.8

参考:https://github.com/getsentry/sentry-cordova/issues/136