question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Source map issue with latest Ionic/Angular/ Capacitor app

See original GitHub issue

Hi,

This is an Ionic/Angular/Capacitor native app.

package.json

{
  "name": "TaxiMate",
  "version": "1.5.0",
  "author": "TaxiMate",
  "homepage": "",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build --prod",
    "lint": "ng lint"
  },
  "private": true,
  "dependencies": {
    "@angular/cdk": "14.0.0",
    "@angular/common": "14.0.0",
    "@angular/core": "14.0.0",
    "@angular/forms": "14.0.0",
    "@angular/platform-browser": "14.0.0",
    "@angular/platform-browser-dynamic": "14.0.0",
    "@angular/router": "14.0.0",
    "@capacitor-community/sqlite": "4.2.2",
    "@capacitor-firebase/authentication": "1.2.0",
    "@capacitor/android": "4.4.0",
    "@capacitor/app": "4.1.0",
    "@capacitor/camera": "4.0.0",
    "@capacitor/core": "4.4.0",
    "@capacitor/haptics": "4.0.1",
    "@capacitor/ios": "4.2.0",
    "@capacitor/keyboard": "4.0.1",
    "@capacitor/network": "4.0.0",
    "@capacitor/preferences": "4.0.1",
    "@capacitor/splash-screen": "4.0.0",
    "@capacitor/status-bar": "4.0.1",
    "@ionic/angular": "6.1.9",
    "@sentry/angular": "7.13.0",
    "@sentry/capacitor": "0.10.1",
    "@types/lodash": "4.14.178",
    "dayjs": "1.10.7",
    "firebase": "9.6.10",
    "guid-typescript": "1.0.9",
    "lodash": "4.17.21",
    "rxjs": "6.6.0",
    "tslib": "2.2.0",
    "zone.js": "0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "14.0.0",
    "@angular-eslint/builder": "14.1.2",
    "@angular-eslint/eslint-plugin": "14.1.2",
    "@angular-eslint/eslint-plugin-template": "14.1.2",
    "@angular-eslint/template-parser": "14.1.2",
    "@angular/cli": "14.0.0",
    "@angular/compiler": "14.0.0",
    "@angular/compiler-cli": "14.0.0",
    "@angular/language-service": "14.0.0",
    "@capacitor/cli": "4.4.0",
    "@ionic/angular-toolkit": "6.0.0",
    "@sentry/cli": "2.8.1",
    "@types/node": "12.11.1",
    "@typescript-eslint/eslint-plugin": "5.42.0",
    "@typescript-eslint/parser": "5.42.0",
    "eslint": "7.6.0",
    "eslint-plugin-import": "2.22.1",
    "eslint-plugin-jsdoc": "30.7.6",
    "eslint-plugin-prefer-arrow": "1.2.2",
    "prettier": "2.5.1",
    "ts-node": "8.3.0",
    "typescript": "4.7.3"
  },
  "description": "TaxiMate"
}

This is the Sentry issue link on my project: Link

angular.json

"configurations": {
            "production": {
               "sourceMap": {
                "hidden": true,
                "scripts": true,
                "styles": true
              },
 }

But it doesn’t show the ts details on the error. Any clue, please? Thanks!

explain cli shows this?

✔ Fetched data for event: 9f22b34e8e2d48df9baed6b3468bc4df ✔ Event has release name: taximate-mobile@1.5.0 ✔ Event has a valid exception present ✔ Event has a valid stacktrace present ✖ Uploaded artifacts do not include entry: ~/src_app_modules_home_home_module_ts.js

What should I do to generate home_module_ts.js?

I use ionic build --prod with the above angular.json configurations. I have tried "sourceMap": true, also. But the Same error.

upload-sourcemaps

./node_modules/.bin/sentry-cli releases --org appthebusiness-ltd --project taximate-mobile files taximate-mobile@1.5.0 upload-sourcemaps ./www --dist 1

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Sampath-Lokugecommented, Nov 22, 2022

Hi @souredoutlook

Yes, it seems more work with the live reload option. So I’m very happy with the current production build workflow. Thanks a lot for the support.

2reactions
souredoutlookcommented, Nov 22, 2022

Because you’re using the livereload option you’re running a dev server, this is not serving the files from your production build (the files that you’re sending to sentry).

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: source maps are not loaded when debugging ... - GitHub
Start a new project with ionic start sourcemaps blank --type=angular . Path into the project directory and run ionic cordova prepare android ...
Read more >
Failed to load source maps via chromium devtools - Ionic Forum
Known solution: Use inline-source-maps. But this is not yet supported by Angular. You have to use a 3rd lib to extract / modify...
Read more >
SourceMaps failed to load SourceMap IonicAngular
I have solved the problem. The problem with sourcemaps is not the reason of the broken console. I removed tha android platform and...
Read more >
Ionic 6 Google Maps - New Capacitor Official Plugin ...
In this video, we are going to implement a New Capacitor Official Plugin "Google Maps " using​ # ionic # angular...
Read more >
Ionic for Cordova - Sentry Documentation
Check out our Ionic with Sentry Capacitor documentation. ... When building your app with ionic for production make sure you have source maps...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found