uni-app iOS模拟器启动小程序慢 白屏后显示
uni-app iOS模拟器启动小程序慢 白屏后显示
| 产品分类 | uni小程序SDK |
|---|---|
| 手机系统 | iOS |
| 手机系统版本号 | iOS 15 |
| 手机厂商 | 模拟器 |
| 手机机型 | 模拟器 |
| 页面类型 | vue |
| SDK版本号 | 3.2.9 |
操作步骤:
启动 openUniMP 方法,启动官方的Demo也能发现问题,只是没那么明显,但循环输出日志能看得出来。
预期结果:
很快呈现小程序界面
实际结果:
呈现小程序界面会有一长段时间白屏
bug描述:
如下是调用openUniMP方法时输出的日志,注意其中的 “===分割线” ; 调用方法时日志很快就输出到 “【openUniMP 执行成功回调】”,“【openUniMP 执行成功回调】” 以下的日志会等一段时间再输出; 小程序显示快的情况下,-----deviceid会较快输出,在##DCAD之前会有输出;当小程序显示很快时-----deviceid会较慢输出,在##DCAD之后输出;而且还会报Weex错误。 以下各种情况的日志描述了这种情况;
[Runtime][DEBUG:] ##CoreApp##...app start load..
[Runtime][DEBUG:] ##CoreApp##...createAppRuntime..
[Runtime][DEBUG:] ##CoreApp##...createAppWindow..
<Weex>[error]script_bridge.h:168, <WeexCore> xxx set_core_side is runing and 0x600000c29cd0
[Runtime][DEBUG:] ##CoreApp##...Create a homepage...
[Runtime][DEBUG:] show NWindow--[1]
[Runtime][INFO:] refreshWhitePageCheckWebview---evt[3]---[<PDRCoreAppFrame: 0x7f8ae3863a00; frame = (0 0; 390 844); clipsToBounds = YES; layer = <CALayer: 0x600000ef67e0>>
[Runtime][INFO:] Archiver file fullPath /Users/yujingzhou/Library/Developer/CoreSimulator/Devices/C16B394C-509C-4690-B989-531287E921E4/data/Containers/Data/Application/51063ABA-1F1A-4E99-8EBD-1D6E2FE87346/Library/Pandora/apps/UNI86C027D/data/download.plist
[Runtime][INFO:] Archiver file fullPath /Users/yujingzhou/Library/Developer/CoreSimulator/Devices/C16B394C-509C-4690-B989-531287E921E4/data/Containers/Data/Application/51063ABA-1F1A-4E99-8EBD-1D6E2FE87346/Library/Pandora/apps/UNI86C027D/data/upload.plist
<Weex>[log]WXSDKInstance.m:503, Start rendering page:app-service.js
<Weex>[log]WXBridgeContext.m:1310, jsLog: store---COMMA---[object object] at main.ts:6 LOG
<Weex>[log]WXBridgeContext.m:1310, jsLog: App Show at App.vue:13 LOG
<Weex>[log]WXBridgeContext.m:1310, jsLog: app moutend at App.vue:19 LOG
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
<Weex>[log]WXBridgeContext.m:1310, jsLog: , LOG
【openUniMP 执行成功回调】=====================分割线
[Runtime][DEBUG:] doSplashTimeout
[Runtime][DEBUG:] ##DCAD--closeSplashscreen
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<br/> <br/> <br/>
日志到此结束!!!以下是试验几次 “应用打开成功” 之后的输出日志对比====================================================================分割线
<br/>
<br/>
<br/>
<br/>
快的情况日志==========================================================分割线
[Runtime][INFO:] check webview enable white check--[1]--manifesttarget [1]
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[warn]WXTimerModule.m:134, no timer found for callbackID:
[Runtime][DEBUG:] ##DCAD--closeSplashscreen
[Runtime][DEBUG:] show NWindow--[1]
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[log]WXBridgeContext.m:1310, jsLog: 2021-10-15 12:00 at pages/index/index.vue:52 LOG
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<br/>
<br/>
<br/>
<br/>
慢的情况日志==========================================================分割线
[Runtime][DEBUG:] doSplashTimeout
[Runtime][DEBUG:] ##DCAD--closeSplashscreen
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[warn]WXTimerModule.m:134, no timer found for callbackID:
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[log]WXBridgeContext.m:1310, jsLog: 2021-10-15 12:00 at pages/index/index.vue:52 LOG
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
[Runtime][DEBUG:] show NWindow--[1]
<br/>
<br/>
<br/>
<br/>
快的情况日志==========================================================分割线
[Runtime][INFO:] check webview enable white check--[1]--manifesttarget [1]
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[warn]WXTimerModule.m:134, no timer found for callbackID:
[Runtime][DEBUG:] show NWindow--[1]
[Runtime][DEBUG:] ##DCAD--closeSplashscreen
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[log]WXBridgeContext.m:1310, jsLog: 2021-10-15 12:00 at pages/index/index.vue:52 LOG
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') ERROR
<br/>
<br/>
<br/>
<br/>
很慢的情况日志==========================================================分割线
[Runtime][DEBUG:] doSplashTimeout
[Runtime][DEBUG:] ##DCAD--closeSplashscreen
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[warn]WXTimerModule.m:134, no timer found for callbackID:
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<Weex>[log]WXBridgeContext.m:1310, jsLog: 2021-10-15 12:00 at pages/index/index.vue:52 LOG
<Weex>[error]WXBridgeContext.m:1310, jsLog: TypeError: undefined is not an object (evaluating 'e.data.msg') __ERROR
[Runtime][DEBUG:] show NWindow--[1]
[Runtime][DEBUG:] -----deviceid+470B75FA-8B58-4039-9035-CEB9855FD804
<br/>
<br/>
<br/>
<br/>
补充,白屏前xcode日志一直不断地输出如下日志:
<br/>
2021-12-06 17:44:38.824160+0800 Runner[27989:159284] [Loading] 0x7fa3098ba820 - [pageProxyID=732, webPageID=733, PID=0] WebPageProxy::dispatchProcessDidTerminate: reason=3
2021-12-06 17:44:39.046920+0800 Runner[27989:159284] [Process] 0x114778900 - [PID=0] WebProcessProxy::didFinishLaunching: Invalid connection identifier (web process failed to launch)
2021-12-06 17:44:39.047106+0800 Runner[27989:159284] [Process] 0x114778900 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=3
2021-12-06 17:44:39.047412+0800 Runner[27989:159284] [Process] 0x7fa30b81b820 - [pageProxyID=736, webPageID=737, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason 3
更多关于uni-app iOS模拟器启动小程序慢 白屏后显示的实战教程也可以访问 https://www.itying.com/category-93-b0.html

