2

When the app fires up there is a white screen for around 10 seconds and then the console says

deviceready has not fired after 5 seconds.
main.js:104129 Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
main.js:104124 Ionic Native: deviceready event fired after 7860 ms

I dont want a splash screen for my app so i have disabled it from config.xml. Here is my ionic info

Cordova CLI: 6.1.1 
Ionic Framework Version: 3.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v7.6.0
Xcode version: Xcode 8.2.1 Build version 8C1002

This is my package.json file

{
  "name": "ionic-hello-world",
  "version": "0.0.0",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.1.2",
    "@angular/compiler": "4.1.2",
    "@angular/compiler-cli": "4.1.2",
    "@angular/core": "4.1.2",
    "@angular/forms": "4.1.2",
    "@angular/http": "4.1.2",
    "@angular/platform-browser": "4.1.2",
    "@angular/platform-browser-dynamic": "4.1.2",
    "@ionic-native/core": "3.10.2",
    "@ionic-native/splash-screen": "^3.10.2",
    "@ionic-native/status-bar": "3.10.2",
    "@ionic/storage": "2.0.0",
    "ionic-angular": "3.3.0",
    "ionicons": "3.0.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.11"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.7",
    "typescript": "2.3.3"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard",
    "cordova-plugin-device",
    "cordova-plugin-statusbar"
  ],
  "cordovaPlatforms": [
    "android",
    {
      "platform": "android",
      "version": "",
      "locator": "android"
    }
  ],
  "description": "obenzo: An Ionic project"
}

i have done

ionic state reset --plugins
ionic state reset --platforms
Aniket
  • 93
  • 10
  • Have you already tried by removing the platform and add it back again? – sebaferreras Jun 09 '17 at 09:45
  • Yes i tried `ionic state reset --plugins ionic state reset --platforms` also deleted the platforms and plugins folder – Aniket Jun 09 '17 at 09:46
  • can you add some `alert('...')` in the `app.component.ts` file to see if they're executed? – sebaferreras Jun 09 '17 at 09:50
  • i added the alert in the platform ready function it showed up after 5-6 seconds.... where is it going wrong.. – Aniket Jun 09 '17 at 09:57
  • are you building the app with the `--prod` flag? – sebaferreras Jun 09 '17 at 09:58
  • i tried that to.. i'am building it with ionic run android --target=T03850BTH3 --prod – Aniket Jun 09 '17 at 10:00
  • Possible duplicate of [White screen after splashscreen, Ionic2, android device](https://stackoverflow.com/questions/41544016/white-screen-after-splashscreen-ionic2-android-device) – Dilanka Rathnayake Jun 09 '17 at 10:04
  • @DilankaRathnayake i tried manullay hiding the splash screen with the timeout.. but thats not my requirement.. i dont want the splash screen , but i'll try the accepted answer for that question and reply here in sometime – Aniket Jun 09 '17 at 10:08
  • this is a know issue in ionic 2 that does not fixed yet. check here https://forum.ionicframework.com/t/after-splash-screen-display-white-screen-long-time/80162 – Dilanka Rathnayake Jun 09 '17 at 10:18

0 Answers0