App not displaying for --prod build


I am recently encountering a similar error.

When I run serve/build command with --prod flag and in android/desktop chrome browser - platform ready is not being invoked :S But it works in firefox and edge.

If I run the same commands without --prod flag, it works on all tested platforms.

Ionic info:
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.0
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.0
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.0.0
Ionic Framework : ionic-angular 3.3.0
Node : v6.9.2
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.9.3

Platform.ready Not Firing

What exactly are the commands you use to run/build?
Where and how exactly are you testing?


I have added “build-prod”: “ionic-app-scripts build --prod” to scripts in package.json and I run “npm run build-prod” and after it is done I copy the www folder to the ftp server.
I have done more research, it turns out “platform ready” is firing (I have added a console output) but the web page remains blank, although in console seems like everything has loaded as usual, perhaps the screenshot will be of some use:


It is the same, if I run the app on the device with command "ionic cordova run android --prod"
If I run ionic “cordova run android” it works ok on the Android device as well
(there are less console logs on this screenshot because there are no saved credentials and user would be redirected to the login page)


Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: Look at the console and network tabs for errors.


Thanks for the suggestion, but the second screenshot is from the ADB connection to the Android device and chrome developer tools. There is nothing in the network tab as well. Thanks to my colleague, the solution was removing some color entries from the variables.scss as proposed here:


Sorry :confused:

Please add your details to the issue so the team has more information on what to fix.


I removed the additional variables.scss and now it works, so no fix required.


Breakage without no feedback on doing something quite normal should be fixed :slight_smile:


true, but there is already an issue on the github for that …