ionic app stuck in splash screen, only works in live reload mode

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


ionic app stuck in splash screen, only works in live reload mode



My app worked well previously, left it a month then came back to work on it. Had some fixes done, updated some packages, then kept having to build and install it on IOS device when it suddenly stopped working, now its constantly stuck on splash screen. The app only works when I run it on live reload. System details as below. Android app works fine.



@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0



global packages:


cordova (Cordova CLI) : 8.0.0



local packages:


@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2



System:


Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v6.11.4
npm : 5.8.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145



In addition to the issue above. When try to do a web inspect, there's no error/warning/message nor any indicator that it runs or not.



Additional Findings:



So I tried to build the app on with prod version, and enabled prod mode in main.ts. I was able to successfully build and the launch the app. Still stuck in splash screen, and these were in the logs.



2018-04-06 02:31:25.781389+0800 Masahista[3670:2080484] [DYMTLInitPlatform] platform initialization successful
2018-04-06 02:31:25.838408+0800 Masahista[3670:2080191] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/75E478CD-A0C6-4EBA-A045-BDBC2F5A5285/Library/Cookies/Cookies.binarycookies
2018-04-06 02:31:27.732006+0800 Masahista[3670:2080191] Apache Cordova native platform version 4.5.3 is starting.
2018-04-06 02:31:27.732441+0800 Masahista[3670:2080191] Multi-tasking -> Device: YES, App: YES
2018-04-06 02:31:28.010948+0800 Masahista[3670:2080191] Using UIWebView
2018-04-06 02:31:28.013978+0800 Masahista[3670:2080191] [CDVTimer][console] 0.087023ms
2018-04-06 02:31:28.014157+0800 Masahista[3670:2080191] [CDVTimer][handleopenurl] 0.084043ms
2018-04-06 02:31:28.015977+0800 Masahista[3670:2080191] Unlimited access to network resources
2018-04-06 02:31:28.016068+0800 Masahista[3670:2080191] [CDVTimer][intentandnavigationfilter] 1.847982ms
2018-04-06 02:31:28.016204+0800 Masahista[3670:2080191] [CDVTimer][gesturehandler] 0.086069ms
2018-04-06 02:31:28.036980+0800 Masahista[3670:2080191] [CDVTimer][statusbar] 20.529985ms
2018-04-06 02:31:28.041706+0800 Masahista[3670:2080191] [CDVTimer][keyboard] 4.225016ms
2018-04-06 02:31:28.042470+0800 Masahista[3670:2080191] Starting Facebook Connect plugin
2018-04-06 02:31:28.042703+0800 Masahista[3670:2080191] [CDVTimer][facebookconnectplugin] 0.669003ms
2018-04-06 02:31:28.052769+0800 Masahista[3670:2080191] [CDVTimer][cordovagooglemaps] 9.946942ms
2018-04-06 02:31:28.118633+0800 Masahista[3670:2080191] [CDVTimer][splashscreen] 65.530896ms
2018-04-06 02:31:28.118782+0800 Masahista[3670:2080191] [CDVTimer][TotalPluginStartup] 104.990005ms
2018-04-06 02:31:30.679755+0800 Masahista[3670:2080500] Metal GPU Frame Capture Enabled
2018-04-06 02:31:30.725692+0800 Masahista[3670:2080500] Metal API Validation Enabled
2018-04-06 02:31:31.267728+0800 Masahista[3670:2080191] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-04-06 02:31:31.268555+0800 Masahista[3670:2080191] [MC] Reading from public effective user settings.
2018-04-06 02:31:31.316671+0800 Masahista[3670:2080500] TIC Read Status [1:0x0]: 1:57
2018-04-06 02:31:31.316709+0800 Masahista[3670:2080500] TIC Read Status [1:0x0]: 1:57
2018-04-06 02:31:31.382977+0800 Masahista[3670:2080191] Resetting plugins due to page load.
2018-04-06 02:31:33.129862+0800 Masahista[3670:2080625] TIC Read Status [4:0x0]: 1:57
2018-04-06 02:31:33.129904+0800 Masahista[3670:2080625] TIC Read Status [4:0x0]: 1:57
2018-04-06 02:31:33.173966+0800 Masahista[3670:2080628] TIC Read Status [2:0x0]: 1:57
2018-04-06 02:31:33.174007+0800 Masahista[3670:2080628] TIC Read Status [2:0x0]: 1:57
2018-04-06 02:31:33.225086+0800 Masahista[3670:2080625] TIC Read Status [3:0x0]: 1:57
2018-04-06 02:31:33.225128+0800 Masahista[3670:2080625] TIC Read Status [3:0x0]: 1:57
2018-04-06 02:31:43.201667+0800 Masahista[3670:2080703] TIC TCP Conn Failed [5:0x1c416b7c0]: 3:-9802 Err(-9802)
2018-04-06 02:31:53.436266+0800 Masahista[3670:2080732] TIC TCP Conn Failed [6:0x1c416b640]: 3:-9802 Err(-9802)
2018-04-06 02:31:53.583001+0800 Masahista[3670:2080774] TIC TCP Conn Failed [7:0x1c016bac0]: 3:-9802 Err(-9802)
2018-04-06 02:31:53.583173+0800 Masahista[3670:2080774] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2018-04-06 02:31:53.583192+0800 Masahista[3670:2080774] Task .<0> HTTP load failed (error code: -1200 [3:-9802])
2018-04-06 02:31:53.583748+0800 Masahista[3670:2080784] NSURLConnection finished with error - code -1200
2018-04-06 02:32:00.008634+0800 Masahista[3670:2080191] Status bar could not find cached time string image. Rendering in-process.
2018-04-06 02:33:00.003372+0800 Masahista[3670:2080191] Status bar could not find cached time string image. Rendering in-process.
2018-04-06 02:33:13.989244+0800 Masahista[3670:2081189] XPC connection interrupted



I disconnect the phone on the last part.





You can just edit and add above line in question itself.
– Sangwin Gawande
Mar 31 at 11:19





yep. deleted my comment. now if someone could help me with this. :(
– lifox
Apr 5 at 15:27





@lifox I am having the exact same issue: works with ionic serve and livereload in my custom Ionic DevApp but is now stuck on the splash screen with no console logs whatsoever (though I can inspect elements and see the ion-app element in index.html) when packaged with Ionic Pro Package and installed on my device. Any luck resolving this? ``` cordova (Cordova CLI) : 8.0.0 @ionic/app-scripts : 3.1.10 cordova-android 6.4.0 cordova-ios 4.5.4 ionic-angular 3.8.0 ```
– TaeKwonJoe
2 days ago






2 Answers
2



My app was also stuck on the splash screen with no console logs in the remote debugger (although I can inspect elements and see that <ion-app></ion-app> is empty with no other ionic directive children) when using a --prod build but I could run ionic serve -c just fine and the app initializes properly and console logs are emitted.


<ion-app></ion-app>


ionic serve -c



Turns out @ionic/app-scripts 3.1.10 was the culprit but after reverting to last working --prod build version @ionic/app-scripts 2.1.4 and painstakingly reverting my webpack.config.js to separate webpack.config.js and optimization.config.js files I am able to successfully do a --prod build and have it work normally on devices.



With a different project I am able to do --prod builds just fine with @ionic/app-scripts 3.1.10 so it must be some plugin or project dependency that causes the unresponsive --prod build.



cordova (Cordova CLI) : 8.0.0
@ionic/app-scripts : 3.1.10 <!--this version does not like a package or plugin in my project.
cordova-android 6.4.0
cordova-ios 4.5.4
ionic-angular 3.8.0


cordova (Cordova CLI) : 8.0.0
@ionic/app-scripts : 3.1.10 <!--this version does not like a package or plugin in my project.
cordova-android 6.4.0
cordova-ios 4.5.4
ionic-angular 3.8.0



cordova (Cordova CLI) : 8.0.0
@ionic/app-scripts : 2.1.4 <!--this version plays nicely with my project packages and plugins.
cordova-android 6.4.0
cordova-ios 4.5.4
ionic-angular 3.8.0


cordova (Cordova CLI) : 8.0.0
@ionic/app-scripts : 2.1.4 <!--this version plays nicely with my project packages and plugins.
cordova-android 6.4.0
cordova-ios 4.5.4
ionic-angular 3.8.0



Uncertain what it would take to get the project compatible with ionic-app-scripts 3.1.10 and above but my client does not want to waste another day or more troubleshooting so I'll be staying on 2.1.4 for now.



We had the same problem, app doesn't work on iOS in production, but works with livereload in iOS and Android for all cases. We used the iOS simluator and then attached safari to it and tried to look for logs in the console (refreshing the app with command R).



Noticed none of the resources were loaded into the app, and we were getting 404 when the app was trying to navigate to our login page. Followed some instructions here: https://ionicframework.com/docs/wkwebview/ and disabled CDVWKWebViewEngine by setting:


<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />



in config.xml. Now the resources were being loaded, and the app would load after we hit command R, but would get stuck on splashscreen if we didn't hit command R... getting there. Thought it might be something to do with cordova-plugin-ionic trying to refresh the app in the simulator so we uninstalled it and now it seems to be working fine.



We are still working through now how to get it to work with CDVWKWebViewEngine & cordova-plugin-ionic, but at least for us it allows us to deploy to production again.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

How to scale/resize CVPixelBufferRef in objective C, iOS