Andrii Damm
Andrii Damm

Reputation: 27

Ionic 3 app stuck with splash screen loading

have a problem with running Ionic 3 app on real device. The application is already in prod and sometimes (not each time but quite often) it stucks on splash-screen. Bellow the device's logs (IOS) when the error appeared.

 default    11:49:57.382435 -0400   OPSEU   Initialized 2 displays
default 11:49:57.388655 -0400   OPSEU   Faulting in NSHTTPCookieStorage singleton
default 11:49:57.388672 -0400   OPSEU   Faulting in CFHTTPCookieStorage singleton
default 11:49:57.388688 -0400   OPSEU   Creating default cookie storage with default identifier
default 11:49:57.389365 -0400   OPSEU   Retrieving resting unlock: 0
default 11:49:57.409105 -0400   OPSEU   Apache Cordova native platform version 4.5.3 is starting.
default 11:49:57.409212 -0400   OPSEU   Multi-tasking -> Device: YES, App: YES
default 11:49:57.454831 -0400   OPSEU   0x1063d0000 - DocumentLoader::startLoadingMainResource: Returning empty document (frame = 0x105534240, main = 1)
default 11:49:57.454853 -0400   OPSEU   Memory usage info dump at MainFrameLoadCompleted:
default 11:49:57.454873 -0400   OPSEU     virtual_size: 4929028096
default 11:49:57.454893 -0400   OPSEU     compressed: 0
default 11:49:57.454936 -0400   OPSEU     javascript_gc_heap_extra_memory_size: 0
default 11:49:57.454957 -0400   OPSEU     phys_footprint: 9798096
default 11:49:57.454976 -0400   OPSEU     internal: 9584640
default 11:49:57.454995 -0400   OPSEU     document_count: 1
default 11:49:57.455037 -0400   OPSEU     pagecache_page_count: 0
default 11:49:57.455056 -0400   OPSEU     javascript_gc_heap_capacity: 65536
default 11:49:57.455075 -0400   OPSEU     resident_size: 20725760
default 11:49:57.503503 -0400   OPSEU   Using UIWebView
default 11:49:57.503719 -0400   OPSEU   [CDVTimer][console] 0.049949ms
default 11:49:57.503743 -0400   OPSEU   [CDVTimer][handleopenurl] 0.074983ms
default 11:49:57.504011 -0400   OPSEU   Unlimited access to network resources
default 11:49:57.504032 -0400   OPSEU   [CDVTimer][intentandnavigationfilter] 1.449943ms
default 11:49:57.504051 -0400   OPSEU   [CDVTimer][gesturehandler] 0.051022ms
default 11:49:57.504101 -0400   OPSEU   [CDVTimer][base64togallery] 0.028014ms
default 11:49:57.504121 -0400   OPSEU   [CDVTimer][camerapreview] 0.113964ms
default 11:49:57.504203 -0400   OPSEU   [CDVTimer][file] 1.989007ms
default 11:49:57.504222 -0400   OPSEU   [CDVTimer][cordovagooglemaps] 0.867963ms
default 11:49:57.504241 -0400   OPSEU   CDVIonicKeyboard: resize mode 1
default 11:49:57.504318 -0400   OPSEU   CDVIonicKeyboard: WARNING!!: Keyboard plugin works better with WK
default 11:49:57.504338 -0400   OPSEU   [CDVTimer][keyboard] 1.910925ms
default 11:49:57.504356 -0400   OPSEU   [CDVTimer][photolibrary] 0.115991ms
default 11:49:57.504869 -0400   OPSEU   [CDVTimer][splashscreen] 5.751967ms
default 11:49:57.505553 -0400   OPSEU   [CDVTimer][statusbar] 8.061051ms
default 11:49:57.505572 -0400   OPSEU   [CDVTimer][TotalPluginStartup] 21.359086ms
default 11:49:57.531240 -0400   OPSEU   createNotificationChecker
default 11:49:57.531273 -0400   OPSEU   not coldstart
default 11:49:57.585531 -0400   OPSEU   HTHangEventCreate: HangTracing is disabled. Not creating a new event.
default 11:49:57.585756 -0400   OPSEU   active
default 11:49:57.585779 -0400   OPSEU   PushPlugin skip clear badge
default 11:49:57.585799 -0400   OPSEU   Memory usage info dump at MainFrameLoadStarted:
default 11:49:57.585819 -0400   OPSEU     virtual_size: 4995710976
default 11:49:57.585837 -0400   OPSEU     compressed: 0
default 11:49:57.585855 -0400   OPSEU     javascript_gc_heap_extra_memory_size: 0
default 11:49:57.585874 -0400   OPSEU     phys_footprint: 12370504
default 11:49:57.585930 -0400   OPSEU     internal: 42434560
default 11:49:57.585952 -0400   OPSEU     document_count: 1
default 11:49:57.585970 -0400   OPSEU     pagecache_page_count: 0
default 11:49:57.586014 -0400   OPSEU     javascript_gc_heap_capacity: 65536
default 11:49:57.586060 -0400   OPSEU     resident_size: 68108288
default 11:49:57.588003 -0400   OPSEU   0x102711620 - FrameLoader::prepareForLoadStart: Starting frame load (frame = 0x105534240, main = 1)
default 11:49:57.588024 -0400   OPSEU   Resetting plugins due to page load.
default 11:49:57.588044 -0400   OPSEU   0x10637c000 - DocumentLoader::startLoadingMainResource: Starting load (frame = 0x105534240, main = 1)
default 11:49:57.612794 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> {strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 0, builtin 0}
default 11:49:57.613217 -0400   OPSEU   TIC Enabling TLS [1:0x283820f00]
default 11:49:57.613257 -0400   OPSEU   TIC TCP Conn Start [1:0x283820f00]
default 11:49:57.613541 -0400   OPSEU   [C1 Hostname#3007e493:443 tcp, url: https://fonts.googleapis.com/css?family=Maven+Pro, tls] start
default 11:49:57.615833 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C1] reporting state preparing
default 11:49:57.615917 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> setting up Connection 1
default 11:49:57.621346 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> {strength 0, tls 4, ct 0, sub 0, sig 1, ciphers 0, bundle 0, builtin 0}
default 11:49:57.621552 -0400   OPSEU   TIC Enabling TLS [2:0x283828c00]
default 11:49:57.621588 -0400   OPSEU   TIC TCP Conn Start [2:0x283828c00]
default 11:49:57.621750 -0400   OPSEU   [C2 Hostname#59d22349:443 tcp, url: https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBlWhkNqdzt7vKcTx-0alvhumVD-_mVF9U, tls] start
default 11:49:57.624564 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C2] reporting state preparing
default 11:49:57.624657 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> setting up Connection 2
default 11:49:57.629657 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C1.1 IPv4#c06d301c:443 in_progress channel-flow (satisfied)] Transport protocol connected
default 11:49:57.631032 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 1, Pending(0)
default 11:49:57.631106 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 2, Pending(0)
default 11:49:57.639754 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C2.1 IPv4#c06d301c:443 in_progress channel-flow (satisfied)] Transport protocol connected
default 11:49:57.641551 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 1, Pending(0)
default 11:49:57.641666 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 2, Pending(0)
default 11:49:57.668317 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 2, Pending(0)
default 11:49:57.668500 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 11, Pending(0)
default 11:49:57.668695 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 14, Pending(0)
default 11:49:57.672138 -0400   OPSEU   TIC TLS Trust Result [1:0x283820f00]: 0
default 11:49:57.678579 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 2, Pending(0)
default 11:49:57.678768 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 11, Pending(0)
default 11:49:57.678875 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 14, Pending(0)
default 11:49:57.685699 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C1.1 IPv4#c06d301c:443 in_progress channel-flow (satisfied)] Output protocol connected
default 11:49:57.685976 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C1] reporting state ready
default 11:49:57.686357 -0400   OPSEU   TIC TLS Event [1:0x283820f00]: 20, Pending(0)
default 11:49:57.686428 -0400   OPSEU   TIC TCP Conn Connected [1:0x283820f00]: Err(16)
default 11:49:57.686699 -0400   OPSEU   TIC TCP Conn Event [1:0x283820f00]: 1
default 11:49:57.686741 -0400   OPSEU   TIC TCP Conn Event [1:0x283820f00]: 8
default 11:49:57.686782 -0400   OPSEU   TIC TLS Handshake Complete [1:0x283820f00]
default 11:49:57.687171 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> now using Connection 1
default 11:49:57.687355 -0400   OPSEU   TIC TLS Trust Result [2:0x283828c00]: 0
default 11:49:57.687489 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C1.1 IPv4#c06d301c:443 ready channel-flow (satisfied)] Output protocol connected
default 11:49:57.687842 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> sent request, body N
default 11:49:57.703001 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C2.1 IPv4#c06d301c:443 in_progress channel-flow (satisfied)] Output protocol connected
default 11:49:57.703221 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C2] reporting state ready
default 11:49:57.703516 -0400   OPSEU   TIC TLS Event [2:0x283828c00]: 20, Pending(0)
default 11:49:57.703541 -0400   OPSEU   TIC TCP Conn Connected [2:0x283828c00]: Err(16)
default 11:49:57.703677 -0400   OPSEU   TIC TCP Conn Event [2:0x283828c00]: 1
default 11:49:57.703782 -0400   OPSEU   TIC TCP Conn Event [2:0x283828c00]: 8
default 11:49:57.703804 -0400   OPSEU   TIC TLS Handshake Complete [2:0x283828c00]
default 11:49:57.703896 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> now using Connection 2
default 11:49:57.704059 -0400   OPSEU   nw_endpoint_flow_protocol_connected [C2.1 IPv4#c06d301c:443 ready channel-flow (satisfied)] Output protocol connected
default 11:49:57.704169 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> sent request, body N
default 11:49:57.725431 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> received response, status 200 content C
default 11:49:57.725948 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> response ended
default 11:49:57.726017 -0400   OPSEU   Task <B75FA3B6-2759-40A1-84FC-1A6A7F58B6BF>.<0> done using Connection 1
default 11:49:57.760519 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> received response, status 200 content K
default 11:49:57.779260 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> response ended
default 11:49:57.779417 -0400   OPSEU   Task <54B08C46-42A9-4A9D-B86A-04A87294C393>.<0> done using Connection 2
default 11:50:27.859420 -0400   OPSEU   TIC TCP Conn Cancel [2:0x283828c00]
default 11:50:27.859911 -0400   OPSEU   [C2 Hostname#59d22349:443 tcp, url: https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBlWhkNqdzt7vKcTx-0alvhumVD-_mVF9U, tls] cancel
default 11:50:27.859942 -0400   OPSEU   [C2 Hostname#59d22349:443 tcp, url: https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyBlWhkNqdzt7vKcTx-0alvhumVD-_mVF9U, tls] cancelled
    [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443]
    Connected Path: satisfied (Path is satisfied), interface: en0, ipv4, dns
    Duration: 30.238s, DNS @0.000s took 0.005s, TCP @0.007s took 0.011s, TLS took 0.063s
    bytes in/out: 30897/677, packets in/out: 24/3, rtt: 0.017s, retransmitted packets: 0, out-of-order packets: 11
default 11:50:27.860002 -0400   OPSEU   0.000s [C2 <private> Hostname#59d22349:443 resolver] path:start
default 11:50:27.860026 -0400   OPSEU   0.000s [C2 <private> Hostname#59d22349:443 resolver] path:satisfied
default 11:50:27.860047 -0400   OPSEU   0.000s [C2 <private> Hostname#59d22349:443 resolver] resolver:start_dns
default 11:50:27.860068 -0400   OPSEU   0.005s [C2 <private> Hostname#59d22349:443 resolver] resolver:receive_dns
default 11:50:27.860117 -0400   OPSEU   0.005s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] path:start
default 11:50:27.860159 -0400   OPSEU   0.006s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] path:satisfied
default 11:50:27.860179 -0400   OPSEU   0.006s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:start_nexus
default 11:50:27.860222 -0400   OPSEU   0.006s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:receive_nexus
default 11:50:27.860396 -0400   OPSEU   0.007s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:start_connect
default 11:50:27.860417 -0400   OPSEU   0.018s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:finish_transport
default 11:50:27.860892 -0400   OPSEU   0.018s [C2 <private> Hostname#59d22349:443 resolver] flow:finish_transport
default 11:50:27.860924 -0400   OPSEU   0.081s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:finish_connect
default 11:50:27.860988 -0400   OPSEU   0.081s [C2 <private> Hostname#59d22349:443 resolver] flow:finish_connect
default 11:50:27.861105 -0400   OPSEU   0.081s [C2.1 <private> 192.168.15.253:61560<->IPv4#c06d301c:443 channel-flow] flow:changed_viability
default 11:50:27.861283 -0400   OPSEU   0.081s [C2 <private> Hostname#59d22349:443 resolver] flow:changed_viability
default 11:50:27.861304 -0400   OPSEU   30.238s [C2] path:cancel
default 11:50:27.861724 -0400   OPSEU   nw_protocol_tcp_log_summary [C2.1:3] 
    [<private> <private>:61560<-><private>:443]
    Init: 1, Conn_Time: 10.234ms, Syn's: 1, WR_T: 0/0, RD_T: 0/0, TFO: 0/0/0, ECN: 0/0/0, TS: 1
    RTT_Cache: process, rtt_upd: 4, rtt: 17.625ms, rtt_var: 13.125ms rtt_nc: 14.437ms, rtt_var_nc: 12.500ms
default 11:50:27.861769 -0400   OPSEU   nw_endpoint_flow_protocol_disconnected [C2.1 IPv4#c06d301c:443 cancelled channel-flow (null)] Output protocol disconnected
default 11:50:27.862051 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C2] reporting state cancelled
default 11:50:27.862070 -0400   OPSEU   TIC TCP Conn Cancel [1:0x283820f00]
default 11:50:27.862108 -0400   OPSEU   [C1 Hostname#3007e493:443 tcp, url: https://fonts.googleapis.com/css?family=Maven+Pro, tls] cancel
default 11:50:27.862137 -0400   OPSEU   [C1 Hostname#3007e493:443 tcp, url: https://fonts.googleapis.com/css?family=Maven+Pro, tls] cancelled
    [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443]
    Connected Path: satisfied (Path is satisfied), interface: en0, ipv4, dns
    Duration: 30.247s, DNS @0.000s took 0.003s, TCP @0.005s took 0.011s, TLS took 0.056s
    bytes in/out: 3623/655, packets in/out: 5/3, rtt: 0.015s, retransmitted packets: 0, out-of-order packets: 2
default 11:50:27.862158 -0400   OPSEU   0.000s [C1 <private> Hostname#3007e493:443 resolver] path:start
default 11:50:27.862179 -0400   OPSEU   0.000s [C1 <private> Hostname#3007e493:443 resolver] path:satisfied
default 11:50:27.862198 -0400   OPSEU   0.000s [C1 <private> Hostname#3007e493:443 resolver] resolver:start_dns
default 11:50:27.862218 -0400   OPSEU   0.003s [C1 <private> Hostname#3007e493:443 resolver] resolver:receive_dns
default 11:50:27.862243 -0400   OPSEU   0.004s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] path:start
default 11:50:27.862263 -0400   OPSEU   0.004s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] path:satisfied
default 11:50:27.862282 -0400   OPSEU   0.004s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:start_nexus
default 11:50:27.862325 -0400   OPSEU   0.004s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:receive_nexus
default 11:50:27.862346 -0400   OPSEU   0.005s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:start_connect
default 11:50:27.862365 -0400   OPSEU   0.016s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:finish_transport
default 11:50:27.862387 -0400   OPSEU   0.016s [C1 <private> Hostname#3007e493:443 resolver] flow:finish_transport
default 11:50:27.862407 -0400   OPSEU   0.072s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:finish_connect
default 11:50:27.862426 -0400   OPSEU   0.072s [C1 <private> Hostname#3007e493:443 resolver] flow:finish_connect
default 11:50:27.862446 -0400   OPSEU   0.072s [C1.1 <private> 192.168.15.253:61559<->IPv4#c06d301c:443 channel-flow] flow:changed_viability
default 11:50:27.862464 -0400   OPSEU   0.072s [C1 <private> Hostname#3007e493:443 resolver] flow:changed_viability
default 11:50:27.862489 -0400   OPSEU   30.247s [C1] path:cancel
default 11:50:27.862690 -0400   OPSEU   nw_protocol_tcp_log_summary [C1.1:3] 
    [<private> <private>:61559<-><private>:443]
    Init: 1, Conn_Time: 10.057ms, Syn's: 1, WR_T: 0/0, RD_T: 0/0, TFO: 0/0/0, ECN: 0/0/0, TS: 1
    RTT_Cache: kernel, rtt_upd: 4, rtt: 15.750ms, rtt_var: 10.312ms rtt_nc: 13.156ms, rtt_var_nc: 8.875ms
default 11:50:27.862729 -0400   OPSEU   nw_endpoint_flow_protocol_disconnected [C1.1 IPv4#c06d301c:443 cancelled channel-flow (null)] Output protocol disconnected
default 11:50:27.862767 -0400   OPSEU   nw_connection_report_state_with_handler_locked [C1] reporting state cancelled
default 11:50:27.862860 -0400   OPSEU   TIC TCP Conn Destroyed [2:0x283828c00]
default 11:50:27.862956 -0400   OPSEU   TIC TCP Conn Destroyed [1:0x283820f00]

I'm a new guy in the development world, so can you determine where is the problem here?

Upvotes: 0

Views: 1515

Answers (3)

Delwyn Pinto
Delwyn Pinto

Reputation: 612

This usually happens when some code in your app throws an error on launch that causes the app to break. Might be an incompatible plugin, or some other function that is failing at times. Run a debug build and check the console for any errors. You could also post your ionic info output and check if all plugin requirements are met.

Upvotes: 0

Andrii Damm
Andrii Damm

Reputation: 27

Ok, the funny thing. When I added catch block for platform.ready promise - the problem had gone.

    platform.ready().then(() => {

        .....

        console.log('---READY---');
        splashScreen.hide();

    })
    .catch((err)=> {

        console.log('ERROR: ', err);

    });

I hoped to see what cause an error, but my console is crystal clear. I would be appreciated if some one could explain this phenomena.

Thank you.

Upvotes: 0

ashirwadrk
ashirwadrk

Reputation: 126

What you have given isn't sufficient, though have you enabled prod mode in your main.ts? If not change your main.ts to below

    import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 
import { AppModule } from './app.module'; 
import {enableProdMode} from "@angular/core";
 enableProdMode();
 platformBrowserDynamic().bootstrapModule(AppModule);

Upvotes: 1

Related Questions