cordova-plugin-wkwebview-engine icon indicating copy to clipboard operation
cordova-plugin-wkwebview-engine copied to clipboard

Ionic attempting to load map.js.map file on app launch fails

Open gitdisrupt opened this issue 8 years ago • 3 comments

I do a production build of my app, successfully:

ionic build --prod

I run the app from xCode on device running iOS 10, i get the following error in the console:

Failed to load resource: the server responded with a status of 404 (Not Found). http://localhost:8080/Users/mspro/Desktop/testapp/www/build/main.js.map

Why is the app attempting to load that file from my working directory on my desktop?

My system information:

Cordova CLI: 6.5.0 
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.4
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v7.9.0
Xcode version: Xcode 8.3 Build version 8W120l

gitdisrupt avatar May 03 '17 22:05 gitdisrupt

STRANGE ... well i uninstalled and reinstalled and now the console is working ....

Although - i am still seeing the app attempt to load main.js.map from a path located in my working directory on my desktop.

Failed to load resource: the server responded with a status of 404 (Not Found). http://localhost:8080/Users/mspro/Desktop/testapp/www/build/main.js.map

gitdisrupt avatar May 04 '17 01:05 gitdisrupt

If you look at the last line of www/build/main.js you will see that the sourceMappingUrl contains an absolute path (I opend a bug for that with ionic-app-scripts). A production build does (of course) not contain a sourcemap and that is why the webview can't load it.

DavidStrausz avatar May 20 '17 14:05 DavidStrausz

yes understood on why the production build does not and should not include it

gitdisrupt avatar May 22 '17 15:05 gitdisrupt