Reputation: 43
My app is stuck on splashscreen after resume:
app is stuck on splascreen
Here are my dependencies :
"react-native": "^0.57.4",
"react-native-code-push": "^5.4.2",
"react-native-collapsible": "^1.1.0",
"react-native-datepicker": "^1.7.2",
"react-native-fast-image": "^5.1.0",
"react-native-geocoder": "git://github.com/pizzahutuk/react-native-geocoder",
"react-native-google-analytics-bridge": "^6.1.2",
"react-native-google-autocomplete": "^0.1.5",
"react-native-image-picker": "^0.27.1",
"react-native-iphone-x-helper": "^1.2.0",
"react-native-linear-gradient": "^2.4.2",
"react-native-maps": "git://github.com/react-community/react-native-maps.git#1844d46902629e2caa55527d5bff48a550d92525",
"react-native-picker-select": "^4.4.0",
"react-native-sensors": "^4.0.0",
"react-native-splash-screen": "^3.1.1",
"react-native-svg": "^8.0.8",
"react-native-video": "^3.2.1",
"react-navigation": "^2.16.0",
"react-navigation-redux-helpers": "^2.0.6",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"redux": "^4.0.0"
Here is the log from adb logcat during the issue :
11-13 15:45:30.710 2290 2290 W ResourceType: No known package when getting name for resource number 0x9c020204 11-13 15:45:30.710 2290 2290 I HwLauncher: Launcher onclick begin com.huawei.android.launcher.BubbleTextView{d7d30af VFED..CL. ...P..ID 528,1280-792,1570 #9c020204} 11-13 15:45:30.710 2290 2290 I HwLauncher: Launcher.Utilities startActivitySafely useLaunchAnimation = true 11-13 15:45:30.710 2290 2290 I HwLauncher: Launcher.Utilities startActivitySafely begin startActivity() for current user 11-13 15:45:30.714 2239 2239 I K3V3CpuGovernorPolicy: set scene Hmp policy : 300 , 150 11-13 15:45:30.717 2290 2290 I HwLauncher: Launcher.Utilities startActivitySafely end startActivity() for current user 11-13 15:45:30.717 2290 2290 I HwLauncher: Launcher this view's parent is not SearchGridView , so no need to reportRecentApp. 11-13 15:45:30.717 2290 2290 I HwLauncher: Launcher onclick end 11-13 15:45:30.719 2290 2290 I HwLauncher: Launcher onPause() 11-13 15:45:30.720 2290 12810 I HwLauncher: Launcher.MotionManager stopMotionAppsReco begin,flg = 403 11-13 15:45:30.720 2290 12810 W HwLauncher: Launcher.MotionManager stopMotionAppsReco service flg 403 is unavailable 11-13 15:45:30.725 2239 3057 W PGApi_client: recv actoionId = 10000, action = com.huawei.pgmng.PGAction@3b9ef2f actionId =10000 pkg =air.com.unit9.frapp extend1 =1390 extend2 = flag =3 type =1 11-13 15:45:30.726 2290 12809 I HwLauncher: Launcher.MotionManager stopMotionAppsReco begin,flg = 402 11-13 15:45:30.726 2290 12809 W HwLauncher: Launcher.MotionManager stopMotionAppsReco service flg 402 is unavailable 11-13 15:45:30.729 1893 2018 I HwSystemManager: NotificationGuideService:handle MSG_ACTIVIY_FOREGROUND, uid:10185 11-13 15:45:30.729 10855 10985 I HwSystemManager: NotificationGuideService:handle MSG_ACTIVIY_FOREGROUND, uid:10185 11-13 15:45:30.730 2290 2290 I SendBroadcastPermission: action:com.huawei.android.action.WIDGET_FOCUS_CHANGE, mPermissionType:0 11-13 15:45:30.732 10855 11018 W System.err: android.content.pm.PackageManager$NameNotFoundException: air.com.unit9.frapp 11-13 15:45:30.732 10855 11018 W System.err: at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:321) 11-13 15:45:30.732 10855 11018 W System.err: at com.huawei.systemmanager.netassistant.netapp.service.NetControllService.checkShowNetWorkToast(NetControllService.java:170) 11-13 15:45:30.732 10855 11018 W System.err: at com.huawei.systemmanager.netassistant.netapp.service.NetControllService.access$100(NetControllService.java:56) 11-13 15:45:30.732 10855 11018 W System.err: at com.huawei.systemmanager.netassistant.netapp.service.NetControllService$1.handleMessage(NetControllService.java:114) 11-13 15:45:30.732 10855 11018 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 11-13 15:45:30.732 10855 11018 W System.err: at android.os.Looper.loop(Looper.java:150) 11-13 15:45:30.733 10855 11018 W System.err: at android.os.HandlerThread.run(HandlerThread.java:61) 11-13 15:45:30.737 1893 2093 I HwResources: load icon id : 7f0a0000, pkgName : air.com.unit9.frapp 11-13 15:45:30.744 388 1107 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0x933 11-13 15:45:30.744 388 1107 I gralloc : Alloc handle(0x7f68a58400): interfmt=0x1, stride=1088, size=8486912 11-13 15:45:30.745 1893 2093 I HwResources: icon : air.com.unit9.frapp found in app 11-13 15:45:30.745 12692 12738 I ReactNativeJS: Running application "App" with appParams: {"rootTag":11}. DEV === false, development-level warning are OFF, performance optimizations are ON 11-13 15:45:30.770 388 12146 I gralloc : Free handle(0x7f68a42b00) 11-13 15:45:30.770 388 12146 I gralloc : Free handle(0x7f68a58300) 11-13 15:45:30.771 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.772 388 419 I gralloc : Alloc handle(0x7f68a58600): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.772 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.781 388 419 I gralloc : Alloc handle(0x7f83e88b00): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.781 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.782 388 419 I gralloc : Alloc handle(0x7f68a58700): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.788 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.793 388 419 I gralloc : Alloc handle(0x7f68a58800): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.793 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.798 388 419 I gralloc : Alloc handle(0x7f68a58900): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.798 388 419 I gralloc : Alloc req: dev=0x7f83e42540, w=1080, h=1920, format=0x1, usage=0xb00 11-13 15:45:30.798 388 419 I gralloc : Alloc handle(0x7f68a42200): interfmt=0x200000001, stride=1088, size=8486912 11-13 15:45:30.819 961 1609 E HwCHRWebMonitor: running processNameair.com.unit9.frapp 11-13 15:45:30.819 961 1609 E HwCHRWebMonitor: HwCHRWifiUIDWebSpeed [appName=com.mobilesrepublic.appy UID=10104 WEBSENDSEGS=9 WEBRESENDSEGS=0 WEBRECVSEGS=12 WEBERRSEGS=0 WEBOUTRSTS=0 WEBESTABLISRST=0 WEBRTTDURATION=12 WEBRTTSEGS=2 WEBSNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.820 961 1609 E HwCHRWebMonitor: HwCHRWifiUIDWebSpeed [appName=com.google.uid.shared:10010 UID=10010 WEBSENDSEGS=18 WEBRESENDSEGS=0 WEBRECVSEGS=11 WEBERRSEGS=0 WEBOUTRSTS=0 WEBESTABLISRST=0 WEBRTTDURATION=40 WEBRTTSEGS=9 WEBSNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.820 961 1609 E HwCHRWebMonitor: HwCHRWifiUIDWebSpeed [appName=com.google.uid.shared:10010 UID=1010010 WEBSENDSEGS=0 WEBRESENDSEGS=0 WEBRECVSEGS=1 WEBERRSEGS=0 WEBOUTRSTS=0 WEBESTABLISRST=0 WEBRTTDURATION=0 WEBRTTSEGS=0 WEBSNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.820 961 1609 E HwCHRWebMonitor: HwCHRWifiUIDWebSpeed [appName=com.meraki.sm UID=1010109 WEBSENDSEGS=28 WEBRESENDSEGS=0 WEBRECVSEGS=24 WEBERRSEGS=0 WEBOUTRSTS=0 WEBESTABLISRST=0 WEBRTTDURATION=15 WEBRTTSEGS=8 WEBSNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.820 961 1609 E HwCHRWebMonitor: HwCHRWifiUIDWebSpeed [appName=air.com.unit9.frapp UID=10185 WEBSENDSEGS=40 WEBRESENDSEGS=0 WEBRECVSEGS=28 WEBERRSEGS=0 WEBOUTRSTS=0 WEBESTABLISRST=0 WEBRTTDURATION=182 WEBRTTSEGS=17 WEBSNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.820 961 1609 E HwCHRWebMonitor: WebMonitor [mNetWorkIsSuck=false mUIDIsSuck=] WebSpeed [WEBSENDSEGS=132 WEBRESENDSEGS=8 WEBRECVSEGS=89 WEBERRSEGS=0 WEBOUTRSTS=5 WEBESTABLISRST=0 WEBRTTDURATION=253 WEBRTTSEGS=38 WEBSRTT=860 WEBSNDDUPACKS=0 SENDSEGS=0 RESENDSEGS=0 RECVSEGS=0 ERRSEGS=0 OUTRSTS=0 ESTABLISRST=0 RTTDURATION=0 RTTSEGS=0 SNDDUPACKS=0 suckTimes=0 recovage_times=0] 11-13 15:45:30.844 961 1084 I ActivityManager: Displayed air.com.unit9.frapp/.MainActivity: +124ms 11-13 15:45:30.898 12692 12738 I ReactNativeJS: [CodePush] Checking for update. 11-13 15:45:30.903 12692 12705 I art : Object allocation is busy now, so prior to grow the heap. New heap size is 45 MB 11-13 15:45:30.919 12692 12738 I ReactNativeJS: {"event":"gaevent","eventparameters":{"category":"TAB","action":"Accueil","label":"Page Accueil","value":0,"noninteraction":false}} 11-13 15:45:30.921 12692 12738 I ReactNativeJS: [CodePush] Reporting binary update (2.0) 11-13 15:45:30.962 12692 12705 I art : Object allocation is busy now, so prior to grow the heap. New heap size is 54 MB 11-13 15:45:31.006 2290 2290 I HwLauncher: Launcher mUnlockScreenRunnbale getOrientationEnabled false 11-13 15:45:31.006 2290 2290 I HwLauncher: Launcher onStop() 11-13 15:45:31.025 961 1572 E WifiConfigStore: updateConfiguration freq=5200 BSSID=8a:15:14:74:7c:f2 RSSI=-39 "tiptopdev"WPA_PSK 11-13 15:45:31.027 961 1618 I HuaweiWifiWatchdogStateMachine: spd good count:0, add sc:0.0, rate:1.0 11-13 15:45:31.027 961 1618 I HuaweiWifiWatchdogStateMachine: current mHighDataFlowRate = 1.0 11-13 15:45:31.028 961 1618 I HuaweiWifiWatchdogStateMachine: POta txb txg rxg:0, 58, 0. Lr =0% Totpkt=58 11-13 15:45:31.028 961 961 I WifiProJNI: ######### CMD_QUERY_PKTS ######## 11-13 15:45:31.028 961 1616 I QosMonitor: postEventFromNative: msg=100,arg1=0,arg2=9 11-13 15:45:31.028 961 1616 W WifiProJNI: poll before: g_monitor_fd =175 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: PTcp RTT:860, rtt pkt=17, tcp_rx=30, tcp_tx=45, tcp_reTran=0, rtRate=0 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: pkt chk not bad, reset sc to 0. 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: net speed good 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: judge good link######, goodLinkLevel=3 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: sendResultMsgToQM bssid:8a:15:::7c:f2, qoslevel=3 11-13 15:45:31.030 961 1618 I HuaweiWifiWatchdogStateMachine: link good reported, good base rssi:-39 11-13 15:45:31.035 388 388 I gralloc : Free handle(0x7f68a42e00) 11-13 15:45:31.051 388 388 I gralloc : Free handle(0x7f68a58400) 11-13 15:45:31.132 12692 12738 I ReactNativeJS: [CodePush] Report status failed: {"appVersion":"2.0"} 11-13 15:45:31.133 12692 12738 I ReactNativeJS: [CodePush] An unknown error occurred. 11-13 15:45:31.134 12692 12738 I ReactNativeJS: [CodePush] 400: An update check must include a valid deployment key - please check that your app has been configured correctly. To view available deployment keys, run 'code-push deployment ls -k'. 11-13 15:45:31.333 12692 12738 I ReactNativeJS: {"event":"pageview","page":{"category":"Home","path":"","title":"tip top FRANCE"}} 11-13 15:45:31.428 2239 2239 I K3V3CpuGovernorPolicy: set scene Hmp policy : 665 , 256 11-13 15:45:31.968 961 961 I TrafficMonitor: update:rxPkts:9,txPkts:7,rxBytes:4525,txBytes:1574 11-13 15:45:31.968 961 961 I TrafficMonitor: start expired. level:-1 11-13 15:45:31.968 961 961 I TrafficMonitor: gettimer:interval=2000 11-13 15:45:32.338 961 1572 E WifiConfigStore: updateConfiguration freq=5200 BSSID=8a:15:14:74:7c:f2 RSSI=-38 "tiptopdev"WPA_PSK
Any idea?
Thanks !
Upvotes: 0
Views: 2565
Reputation: 3034
You should call the SplashScreen.hide()
from the componentDidMount()
function.
You can add a delay if you wish, for example:
import { InteractionManager } from 'react-native';
...
componentDidMount() {
// Some code here if needed.
InteractionManager.runAfterInteractions(() => {
setTimeout(() => {
SplashScreen.hide();
}, 750);
});
}
If you have to call it from the componentDidUpdate()
(because you need some data to be ready), just call it, not from inside an if statement. If the splash screen is already gone, SplashScreen.hide()
will not do any harm.
(And remember this - The componentDidUpdate()
is not calle after the first render, only after the second one)
Upvotes: 1