If I build a release version of my app for Android, it includes main.js.map.
No source map in release apk.
Steps to reproduce:
Which @ionic/app-scripts version are you using?
1.0.0
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
$ ionic info
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
Your system information:
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.4.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v6.9.2
Xcode version: Not installed
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
$ node -v
v6.9.2
$ npm -v **this takes about 30s**
4.0.5
$ cordova -v
You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.4.0
$ ionic platform **this also takes about 30s**
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Please install your Cordova CLI to version >=4.2.0 `npm install -g cordova`
******************************************************
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Installed platforms:
android 6.1.0
Available platforms:
amazon-fireos ~3.6.3 (deprecated)
blackberry10 ~3.8.0
browser ~4.1.0
firefoxos ~3.6.3
webos ~3.7.0
windows ~4.4.0
wp8 ~3.8.2 (deprecated)
I cannot recreate this. Please update your ionic cli to ensure you're doing a prod build correctly.
npm uninstall -g ionic
npm install -g ionic
I'll reopen if needed.
Thanks,
Dan
@danbucholtz, I'm glad to hear the problem is just on my computer. I tried uninstall and reinstall of ionic as suggested, but it makes no difference. The source map is still included in the apk. Any other suggestions?
I'll investigate.
Thanks,
Dan
@danbucholtz, I was thinking that maybe there is some strange problem on my Windows PC, so I setup my Mac to build an android apk and can confirm that the source map is also in the apk on my Mac. This is the case for my project and a new project that I created from the blank template:
ionic start --v2 testblank blank
cd testblank
ionic platform add android
ionic build android --release --prod
ionic info
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0-rc.6
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: 5.0.13
OS: OS X El Capitan
Node Version: v6.9.4
Xcode version: Xcode 7.3.1 Build version 7D1014
npm: 4.1.1
cordova-android: 6.1.1
@danbucholtz
I have the another problem with debugging my app on Android device, I haven't source maps (*.ts) in Chrome Sources

My system info:
in package.json I added the next section:
"config" : {
"ionic_source_map" : "source-map"
}
in tsconfig.json I have set:
"sourceMap": true
cli command:
ionic run android --debÂug
Try ionic_source_map_type instead of ionic_source_map, it changed a few months back.
https://github.com/driftyco/ionic-app-scripts#tips
Thanks,
Dan
@moldstadt @danbucholtz
I have the same problem. I updated the ionic cli but .map file is still present.
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.5
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002
I solved this problem by using a cordova hook. It is working, but not a good solution.
For delete map from source: https://www.npmjs.com/package/cordova-hook-ignore-files
And some config in config.xml
<hook type="after_prepare" src="./node_modules/cordova-hook-ignore-files/ignore-files.js" />
<ignore-files ignore="platforms/**/assets/www/build/*.map" />
Are you all including the --prod argument?
Please update ionic cli by running the following:
npm uninstall -g ionic
npm install -g ionic@latest
Sudo may be required for the above.
Please try npm run ionic:build --prod and verify that it's in your www directory. I cannot recreate.
Thanks,
Dan
I updated the project to ionic final 2.0.0
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Xcode 8.2.1 Build version 8C1002
and still get the issue by doing the following:
ionic build android --prod --release
In the generated APK I have assets/www/build/main.js.map with size of 2.5M
Tried npm run ionic:build --prod and main.js.map is present in www directory
@danbucholtz, I am also still experiencing this problem with 2.0.0. I can manually delete the map with a hook, but as per #672, my app is still vulnerable and I can't release it :-( As stated, I have the exact same problems on both my Windows and Mac installations. I didn't do anything special, just followed the guide for setting up on Mac and built the blank project with --prod --release.
@jgw96 do you perhaps have any ideas. I suspect many people may be experiencing the same issues, but just aren't checking their apks.
I am seeing the issue now too. I'm not sure when this snuck in but I am working on a fix. The way we are doing it now is too complicated.
Expect a follow up here in the coming days.
Thanks,
Dan
Great! Can't wait to get this sorted and release my app :-)
Does the iOS ipa have the same problem? I'm new to iOS, so not sure how to check.
Yeah, probably.
Thanks,
Dan
@danbucholtz, Any update on this issue?
On Sat, 28 Jan 2017, 08:23 Dan Bucholtz notifications@github.com wrote:
Yeah, probably.
Thanks,
Dan—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/driftyco/ionic-app-scripts/issues/671#issuecomment-275830608,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVoOPxQX8jJFHhI6zTOSB7L8DMdk3BLOks5rWt7FgaJpZM4Lpvji
.
This is fixed in master or if you run npm install @ionic/app-scripts@nightly. Note: The nightly build is not necessarily stable (but it will probably be fine).
This will certainly be in the next release of @ionic/app-scripts. I'm not sure when that'll be exactly but probably in the next couple weeks.
I'm really sorry about this issue. I am not sure how this snuck back in.
Thanks,
Dan
Thanks Dan.
On Thu, 02 Feb 2017, 19:37 Dan Bucholtz notifications@github.com wrote:
This is fixed in master or if you run npm install
@ionic/app-scripts@nightly. Note: The nightly build is not necessarily
stable (but it will probably be fine).Thanks,
Dan—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/driftyco/ionic-app-scripts/issues/671#issuecomment-277027011,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVoOPxnjog_nKyvNxiG-NGFsoGFzR10Jks5rYhRdgaJpZM4Lpvji
.
@danbucholtz I can confirm that this is working now, but still having problems with #672.