-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Source maps in production build pointing to .html file instead of .ts #643
Comments
Hi Eugene and thank you for opening this issue with all the information for reproducing it! |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment to not close |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment to not close |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Any progress on this? |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment to not close |
I faced the same problem and the issue is because the copying of the web assets happens before the injection of the debug ids. One way to fix this is to generate the web assets first, run the sentry cli sourcemap commands and then copy the web assets to Capacitor native platform(s). This would work even without providing the release and dist values and with optimization set to true |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
comment |
Environment
Production
What version are you running? Etc.
"@angular/common": "^17.3.7"
"@ionic/angular": "7.8.6"
"@capacitor/ios": "5.7.5"
"@sentry/angular-ivy": "^7.93.0"
"@sentry/capacitor": "^0.17.0"
"@sentry/cli": "^2.31.0"
Steps to Reproduce
ionic capacitor build ios --configuration=prod --source-map
sentry-cli sourcemaps inject --org gymcloud --project strongfirst-mobile ./www && sentry-cli sourcemaps upload --org gymcloud --project strongfirst-mobile ./www --release 1.6 --dist 14
Expected Result
With
"optimization": true
(enabled for production builds) error stack trace should point to .ts file and method that caused errorActual Result
With
"optimization": true
(enabled for production builds) error stack trace points to .html file that contains button that triggers error method, but points to the code at the top of the file, not even the button itselfWhat actually happened.
The issue is with source maps. I have the next angular.json configuration
When I'm using
"optimization": true
inconfigurations -> prod
source maps are showing html file as a source of error, and position is wrong (button that triggers error is far below).If I'm using
"optimization": false
then it shows correct typescript file (error location is little wrong, showing 3 lines higher then it is).I've tried to choose both Angular and tsc options in sentry wizard, but result is the same. tsc option added this code to tsconfig.json file
This is the result for
"optimization": true
link to event
this is for
"optimization": false
link to event
I don't think disabling optimization for production is good idea.
The text was updated successfully, but these errors were encountered: