[SOLVED] Blank screen & StatusBar.styleDefault, but Cordova is not available


#1

When I’m running my Ionic 2 app with ionic serve, I’m getting a blank screen and the following console logs:

0     499279   log      Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
1     499405   warn     Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

My system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: Not installed
ios-sim version: 5.0.7 
OS: Mac OS X El Capitan
Node Version: v4.3.1
Xcode version: Xcode 7.3.1 Build version 7D1014

#2

Just tested this out. The warning message is from Ionic-native, part of it’s own debug/warn API so that is expected when running in the browser.

But I am not getting a blank screen, my app is loading correctly.

What commands did you use to create your project?


#3

@untmat Are you still getting a blank screen, it might be related to the following issue:


#4

@iignatov: I’m not getting a blank screen anymore.
Yes, it’s related to this issue, I found an error in my code.


#5

This means that the errors are being swallowed and not displayed. I would recommend you to check out the following guide for updating to beta.6 and make sure that you haven’t missed a step when updating. Pay attention to steps 3 and 4 because if they are not properly executed you’ll most probably experience problems with the errors and the Angular’s change-detection.