当我们重新编译带有 JS 源代码更改的 android APK 并使用 Testflight 或 Eclipse Android 工具将此 APK 安装在应用程序的已安装 APK 之上时,我们在应用程序的第一次启动时看到以下问题(第二次起作用):
以下打印来自带有 Android 4.3 API 18 的 AVD。应用启动在真实设备上也会中断,但我们还没有调试打印。
当我们有:
<encryptWebResources enabled="false"/>
然后我们看到:
09-04 13:28:21.908: D/WLDroidGap(2322): New installation/upgrade detected, copying resources and saving new checksum
09-04 13:28:22.417: D/CordovaWebView(2322): DroidGap.loadUrl(file:///data/data/com.App/files/www/default/App.html, 60000)
09-04 13:28:22.417: D/DroidGap(2322): onMessage(splashscreen,show)
09-04 13:28:22.417: D/CordovaWebView(2322): >>> loadUrl(file:///data/data/com.App/files/www/default/App.html)
09-04 13:28:22.417: D/PluginManager(2322): init()
09-04 13:28:22.427: D/CordovaWebView(2322): >>> loadUrlNow()
09-04 13:28:22.427: D/DroidGap(2322): Resuming the App
09-04 13:28:22.497: D/libEGL(2322): loaded /system/lib/egl/libEGL_emulation.so
09-04 13:28:22.507: D/(2322): HostConnection::get() New Host Connection established 0x2a213708, tid 2322
09-04 13:28:22.517: D/libEGL(2322): loaded /system/lib/egl/libGLESv1_CM_emulation.so
09-04 13:28:22.517: D/libEGL(2322): loaded /system/lib/egl/libGLESv2_emulation.so
09-04 13:28:22.577: W/EGL_emulation(2322): eglSurfaceAttrib not implemented
09-04 13:28:22.587: D/OpenGLRenderer(2322): Enabling debug mode 0
09-04 13:28:22.597: D/SoftKeyboardDetect(2322): Ignore this event
09-04 13:28:22.627: W/EGL_emulation(2322): eglSurfaceAttrib not implemented
09-04 13:28:22.838: D/WLDroidGap(2322): Started copying files to local storage...
09-04 13:28:22.928: D/SoftKeyboardDetect(2322): Ignore this event
09-04 13:28:30.978: D/dalvikvm(2322): GC_FOR_ALLOC freed 1561K, 19% free 7469K/9188K, paused 25ms, total 25ms
09-04 13:28:37.098: D/WLDroidGap(2322): Finished copying files to local storage...
09-04 13:28:37.098: D/WLDroidGap(2322): no need to check web resource integrity
09-04 13:28:37.148: D/DroidGap(2322): onMessage(onPageStarted,file:///data/data/com.App/files/www/default/App.html)
09-04 13:28:42.448: E/CordovaWebView(2322): CordovaWebView: TIMEOUT ERROR!
09-04 13:28:42.448: D/Cordova(2322): CordovaWebViewClient.onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///data/data/com.App/files/www/default/App.html
09-04 13:28:42.448: D/DroidGap(2322): onMessage(onReceivedError,{"errorCode":-6,"url":"file:\/\/\/data\/data\/com.App\/files\/www\/default\/App.html","description":"The connection to the server was unsuccessful."})
当我们有:
<encryptWebResources enabled="true"/>
然后我们看到:
App09-04 14:56:46.408: D/dalvikvm(3375): GC_FOR_ALLOC freed 42K, 8% free 2640K/2840K, paused 25ms, total 30ms
09-04 14:56:46.417: I/dalvikvm-heap(3375): Grow heap (frag case) to 3.803MB for 1127536-byte allocation
09-04 14:56:46.447: D/dalvikvm(3375): GC_FOR_ALLOC freed <1K, 6% free 3741K/3944K, paused 34ms, total 34ms
09-04 14:56:46.547: I/CordovaLog(3375): Changing log level to DEBUG(3)
09-04 14:56:46.557: I/CordovaLog(3375): Found preference for exit-on-suspend=false
09-04 14:56:46.557: D/CordovaLog(3375): Found preference for exit-on-suspend=false
09-04 14:56:46.557: I/CordovaLog(3375): Found preference for show-splash-screen-spinner=true
09-04 14:56:46.557: D/CordovaLog(3375): Found preference for show-splash-screen-spinner=true
09-04 14:56:46.577: D/JsMessageQueue(3375): Set native->JS mode to 2
09-04 14:56:46.637: D/DroidGap(3375): DroidGap.init()
09-04 14:56:46.748: D/dalvikvm(3375): GC_FOR_ALLOC freed 121K, 7% free 3802K/4080K, paused 39ms, total 39ms
09-04 14:56:46.778: I/dalvikvm-heap(3375): Grow heap (frag case) to 7.379MB for 3686416-byte allocation
09-04 14:56:46.808: D/dalvikvm(3375): GC_FOR_ALLOC freed <1K, 4% free 7402K/7684K, paused 29ms, total 29ms
09-04 14:56:46.828: D/WLDroidGap(3375): New installation/upgrade detected, copying resources and saving new checksum
09-04 14:56:47.278: D/CordovaWebView(3375): DroidGap.loadUrl(file:///data/data/com.App/files/www/default/App.html, 60000)
09-04 14:56:47.278: D/DroidGap(3375): onMessage(splashscreen,show)
09-04 14:56:47.278: D/CordovaWebView(3375): >>> loadUrl(file:///data/data/com.App/files/www/default/App.html)
09-04 14:56:47.278: D/PluginManager(3375): init()
09-04 14:56:47.288: D/CordovaWebView(3375): >>> loadUrlNow()
09-04 14:56:47.298: D/DroidGap(3375): Resuming the App
09-04 14:56:47.367: D/libEGL(3375): loaded /system/lib/egl/libEGL_emulation.so
09-04 14:56:47.367: D/(3375): HostConnection::get() New Host Connection established 0x2a21e670, tid 3375
09-04 14:56:47.387: D/libEGL(3375): loaded /system/lib/egl/libGLESv1_CM_emulation.so
09-04 14:56:47.387: D/libEGL(3375): loaded /system/lib/egl/libGLESv2_emulation.so
09-04 14:56:47.428: W/EGL_emulation(3375): eglSurfaceAttrib not implemented
09-04 14:56:47.447: D/OpenGLRenderer(3375): Enabling debug mode 0
09-04 14:56:47.457: D/SoftKeyboardDetect(3375): Ignore this event
09-04 14:56:47.487: W/EGL_emulation(3375): eglSurfaceAttrib not implemented
09-04 14:56:47.668: D/WLDroidGap(3375): Started copying files to local storage...
09-04 14:56:47.677: D/WLDroidGap(3375): Found resources zip stream. Starting decryption and unzipping process.
09-04 14:56:47.687: I/dalvikvm(3375): Could not find method com.worklight.utils.PaidSecurityUtils.kpg, referenced from method com.worklight.utils.SecurityUtils.kpg
09-04 14:56:47.687: W/dalvikvm(3375): VFY: unable to resolve static method 8750: Lcom/worklight/utils/PaidSecurityUtils;.kpg (Landroid/content/Context;[Ljava/lang/String;)[B
09-04 14:56:47.687: D/dalvikvm(3375): VFY: replacing opcode 0x71 at 0x0000
09-04 14:56:47.798: D/SoftKeyboardDetect(3375): Ignore this event
09-04 14:56:47.898: I/dalvikvm(3375): Total arena pages for JIT: 11
09-04 14:56:47.898: I/dalvikvm(3375): Total arena pages for JIT: 12
09-04 14:56:47.898: I/dalvikvm(3375): Total arena pages for JIT: 13
09-04 14:56:47.898: I/dalvikvm(3375): Total arena pages for JIT: 14
09-04 14:56:47.898: I/dalvikvm(3375): Total arena pages for JIT: 15
09-04 14:56:47.908: I/dalvikvm(3375): Total arena pages for JIT: 16
09-04 14:56:47.908: I/dalvikvm(3375): Total arena pages for JIT: 17
09-04 14:56:47.938: I/dalvikvm(3375): Total arena pages for JIT: 18
09-04 14:56:54.987: D/dalvikvm(3375): GC_FOR_ALLOC freed 1500K, 19% free 7536K/9192K, paused 25ms, total 25ms
09-04 14:56:56.067: D/WLDroidGap(3375): Resources.zip unzipped
09-04 14:56:56.067: D/WLDroidGap(3375): Finished copying files to local storage...
09-04 14:56:56.077: D/WLDroidGap(3375): no need to check web resource integrity
09-04 14:56:56.127: D/DroidGap(3375): onMessage(onPageStarted,file:///data/data/com.App/files/www/default/App.html)
09-04 14:57:03.768: E/cutils-trace(3375): Error opening trace file: No such file or directory (2)
09-04 14:57:06.108: D/CordovaLog(3375): [object Object]
09-04 14:57:06.108: I/Web Console(3375): [object Object] at file:///data/data/com.App/files/www/default/js/appNav.js:174
09-04 14:57:07.318: E/CordovaWebView(3375): CordovaWebView: TIMEOUT ERROR!
09-04 14:57:07.318: D/Cordova(3375): CordovaWebViewClient.onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=file:///data/data/com.App/files/www/default/App.html
09-04 14:57:07.327: D/DroidGap(3375): onMessage(onReceivedError,{"errorCode":-6,"url":"file:\/\/\/data\/data\/com.App\/files\/www\/default\/App.html","description":"The connection to the server was unsuccessful."})
09-04 14:57:07.567: D/SoftKeyboardDetect(3375): Ignore this event
09-04 14:57:07.808: W/EGL_emulation(3375): eglSurfaceAttrib not implemented
09-04 14:57:07.968: D/Cordova(3375): onPageFinished(file:///data/data/com.App/files/www/default/App.html)
09-04 14:57:07.979: D/DroidGap(3375): onMessage(onNativeReady,null)
09-04 14:57:07.979: D/DroidGap(3375): onMessage(onPageFinished,file:///data/data/com.App/files/www/default/App.html)
09-04 14:57:08.088: E/SQLiteLog(3375): (14) cannot open file at line 30191 of [00bb9c9ce4]
09-04 14:57:08.098: E/SQLiteLog(3375): (14) os_unix.c:30191: (2) open(/CachedGeoposition.db) -
09-04 14:57:08.098: D/WebKit(3375): ERROR:
09-04 14:57:08.098: D/WebKit(3375): SQLite database failed to load from /CachedGeoposition.db
09-04 14:57:08.098: D/WebKit(3375): Cause - unable to open database file
09-04 14:57:08.098: D/WebKit(3375): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
09-04 14:57:08.228: D/CordovaNetworkManager(3375): Connection Type: 3g
09-04 14:57:08.238: D/DroidGap(3375): onMessage(networkconnection,3g)
09-04 14:57:08.248: D/CordovaNetworkManager(3375): Connection Type: 3g
09-04 14:57:08.288: D/DroidGap(3375): onMessage(spinner,stop)
09-04 14:57:08.288: D/SoftKeyboardDetect(3375): Ignore this event
09-04 14:57:08.327: D/TilesManager(3375): Starting TG #0, 0x2a2d6440
09-04 14:57:08.338: D/TilesManager(3375): new EGLContext from framework: 2a21e9c0
09-04 14:57:08.338: D/GLWebViewState(3375): Reinit shader
09-04 14:57:08.387: D/App(3375): ondeviceready event dispatched
09-04 14:57:08.427: D/App(3375): wlclient init started
09-04 14:57:08.447: D/App(3375): Read cookies: null
09-04 14:57:08.457: D/App(3375): CookieMgr read cookies: {}
09-04 14:57:08.657: D/App(3375): Request [http://XXX:8080/apps/services/api/App/android/init]
09-04 14:57:08.868: D/GLWebViewState(3375): Reinit transferQueue
09-04 14:57:09.118: D/(3375): HostConnection::get() New Host Connection established 0x2a8da1b0, tid 3405
09-04 14:57:09.278: W/EGL_emulation(3375): eglSurfaceAttrib not implemented
09-04 14:57:09.577: D/App(3375): Request [http://XXX:8080/apps/services/api/App/android/init]
09-04 14:57:09.778: D/App(3375): response [http://XXX:8080/apps/services/api/App/android/init] success: /*-secure-
09-04 14:57:09.778: D/App(3375): {"userPrefs":{},"WL-Authentication-Success":{"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"wl_antiXSRFRealm":{"userId":"cov37tnm5kcuievnjlq18ruh6k","attributes":{},"isUserAuthenticated":1,"displayName":"cov37tnm5kcuievnjlq18ruh6k"},"wl_deviceNoProvisioningRealm":{"userId":"71ecfc9e-69f1-41c7-9007-7da6e31207f1","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@1df9ea5f"},"isUserAuthenticated":1,"displayName":"71ecfc9e-69f1-41c7-9007-7da6e31207f1"},"wl_anonymousUserRealm":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"}},"gadgetProps":{"ENVIRONMENT":"android"},"userInfo":{"SubscribeServlet":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"SampleAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"wl_antiXSRFRealm":{"userId":"cov37tnm5kcuievnjlq18ruh6k","attributes":{},"isUserAuthenticated":1,"displayName":"cov37tnm5kcuievnjlq18ruh6k"},"WorklightConsole":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceNoProvisioningRealm":{"userId":"71ecfc9e-69f1-41c7-9007-7da6e31207f1","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@1df9ea5f"},"isUserAuthenticated":1,"displayName":"71ecfc9e-69f1-41c7-9007-7da6e31207f1"},"myserver":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"},"wl_anonymousUserRealm":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"}}}*/
09-04 14:57:09.798: D/App(3375): wlclient connect success
09-04 14:57:09.868: E/App(3375): [http://XXX:8080/apps/services/api/App/android/init] exception. Cannot read property 'skinLoaderContent' of undefined
09-04 14:57:09.948: D/CordovaLog(3375): Uncaught TypeError: Cannot read property 'skinLoaderContent' of undefined
09-04 14:57:09.948: E/Web Console(3375): Uncaught TypeError: Cannot read property 'skinLoaderContent' of undefined at file:///data/data/com.App/files/www/default/wlclient/js/worklight.js:1487
在 web 视图中复制文件和打开文件似乎是某种竞争条件......
我们尝试了一些实验,结果都与上述相同:
我们将“connectOnStartup”更改为 false,WL.Client.connect 在 wlCommonInit() 中手动连接到 WL 服务器
增加了 initOption 超时
以下似乎减少了问题......但它并没有消除问题。多次尝试时只有更少的中断:
- 每次重新编译之前,在应用程序描述符中增加 Android 应用程序环境版本。(这将在发布到 Google Play 商店之前完成!)
以下似乎消除了这个问题:
每次重新编译和部署之前交换 encryptWebResources 参数 true/false,apk install
在启动时根本没有连接到 WL 服务器... wlCommonInit() 中没有 connectOnStartup 和 WL.Client.connect。
有没有人遇到过这个问题,并且会对如何解决它有一些建议?
似乎有一种本地方法可以捕获在上述第一种情况下触发 的onReceiveError Cordova 事件 - 但 worklight 没有这样做?:在 javascript 中捕获 phonegap GapViewClient.onReceivedError
这是启动成功时的输出(例如交换 encryptWebResources 参数后):
App09-04 15:22:01.378: D/dalvikvm(3575): GC_FOR_ALLOC freed 53K, 8% free 2640K/2852K, paused 25ms, total 30ms
09-04 15:22:01.388: I/dalvikvm-heap(3575): Grow heap (frag case) to 3.803MB for 1127536-byte allocation
09-04 15:22:01.418: D/dalvikvm(3575): GC_FOR_ALLOC freed <1K, 6% free 3741K/3956K, paused 35ms, total 35ms
09-04 15:22:01.518: I/CordovaLog(3575): Changing log level to DEBUG(3)
09-04 15:22:01.528: I/CordovaLog(3575): Found preference for exit-on-suspend=false
09-04 15:22:01.538: D/CordovaLog(3575): Found preference for exit-on-suspend=false
09-04 15:22:01.538: I/CordovaLog(3575): Found preference for show-splash-screen-spinner=true
09-04 15:22:01.538: D/CordovaLog(3575): Found preference for show-splash-screen-spinner=true
09-04 15:22:01.578: D/JsMessageQueue(3575): Set native->JS mode to 2
09-04 15:22:01.578: D/DroidGap(3575): DroidGap.init()
09-04 15:22:01.717: D/dalvikvm(3575): GC_FOR_ALLOC freed 120K, 7% free 3802K/4080K, paused 36ms, total 37ms
09-04 15:22:01.747: I/dalvikvm-heap(3575): Grow heap (frag case) to 7.378MB for 3686416-byte allocation
09-04 15:22:01.787: D/dalvikvm(3575): GC_FOR_ALLOC freed <1K, 4% free 7402K/7684K, paused 32ms, total 32ms
09-04 15:22:01.797: D/WLDroidGap(3575): New installation/upgrade detected, copying resources and saving new checksum
09-04 15:22:02.248: D/CordovaWebView(3575): DroidGap.loadUrl(file:///data/data/com.App/files/www/skinLoader.html, 60000)
09-04 15:22:02.248: D/DroidGap(3575): onMessage(splashscreen,show)
09-04 15:22:02.248: D/CordovaWebView(3575): >>> loadUrl(file:///data/data/com.App/files/www/skinLoader.html)
09-04 15:22:02.248: D/PluginManager(3575): init()
09-04 15:22:02.258: D/CordovaWebView(3575): >>> loadUrlNow()
09-04 15:22:02.258: D/DroidGap(3575): Resuming the App
09-04 15:22:02.338: D/libEGL(3575): loaded /system/lib/egl/libEGL_emulation.so
09-04 15:22:02.338: D/(3575): HostConnection::get() New Host Connection established 0x2a23a318, tid 3575
09-04 15:22:02.348: D/libEGL(3575): loaded /system/lib/egl/libGLESv1_CM_emulation.so
09-04 15:22:02.358: D/libEGL(3575): loaded /system/lib/egl/libGLESv2_emulation.so
09-04 15:22:02.418: W/EGL_emulation(3575): eglSurfaceAttrib not implemented
09-04 15:22:02.428: D/OpenGLRenderer(3575): Enabling debug mode 0
09-04 15:22:02.437: D/SoftKeyboardDetect(3575): Ignore this event
09-04 15:22:02.468: W/EGL_emulation(3575): eglSurfaceAttrib not implemented
09-04 15:22:02.627: D/WLDroidGap(3575): Started copying files to local storage...
09-04 15:22:02.747: D/SoftKeyboardDetect(3575): Ignore this event
09-04 15:22:10.618: D/dalvikvm(3575): GC_FOR_ALLOC freed 1563K, 19% free 7469K/9192K, paused 24ms, total 25ms
09-04 15:22:16.718: D/WLDroidGap(3575): Finished copying files to local storage...
09-04 15:22:16.728: D/WLDroidGap(3575): no need to check web resource integrity
09-04 15:22:16.778: D/DroidGap(3575): onMessage(onPageStarted,file:///data/data/com.App/files/www/skinLoader.html)
09-04 15:22:17.458: D/chromium(3575): Unknown chromium error: -6
09-04 15:22:17.488: D/Cordova(3575): onPageFinished(file:///data/data/com.App/files/www/skinLoader.html)
09-04 15:22:17.488: D/DroidGap(3575): onMessage(onNativeReady,null)
09-04 15:22:17.488: D/DroidGap(3575): onMessage(onPageFinished,file:///data/data/com.App/files/www/skinLoader.html)
09-04 15:22:17.498: E/cutils-trace(3575): Error opening trace file: No such file or directory (2)
09-04 15:22:17.558: E/SQLiteLog(3575): (14) cannot open file at line 30191 of [00bb9c9ce4]
09-04 15:22:17.558: E/SQLiteLog(3575): (14) os_unix.c:30191: (2) open(/CachedGeoposition.db) -
09-04 15:22:17.558: D/WebKit(3575): ERROR:
09-04 15:22:17.558: D/WebKit(3575): SQLite database failed to load from /CachedGeoposition.db
09-04 15:22:17.558: D/WebKit(3575): Cause - unable to open database file
09-04 15:22:17.558: D/WebKit(3575): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)
09-04 15:22:17.678: D/CordovaNetworkManager(3575): Connection Type: 3g
09-04 15:22:17.678: D/DroidGap(3575): onMessage(networkconnection,3g)
09-04 15:22:17.688: D/CordovaNetworkManager(3575): Connection Type: 3g
09-04 15:22:17.738: D/DroidGap(3575): onMessage(spinner,stop)
09-04 15:22:17.758: D/TilesManager(3575): Starting TG #0, 0x2a23d728
09-04 15:22:17.758: D/TilesManager(3575): new EGLContext from framework: 2a23a668
09-04 15:22:17.758: D/GLWebViewState(3575): Reinit shader
09-04 15:22:17.837: D/GLWebViewState(3575): Reinit transferQueue
09-04 15:22:17.873: D/CordovaWebView(3575): >>> loadUrl(file:///data/data/com.App/files/www/default/App.html)
09-04 15:22:17.877: D/CordovaWebView(3575): >>> loadUrlNow()
09-04 15:22:17.897: D/DroidGap(3575): onMessage(onPageStarted,file:///data/data/com.App/files/www/default/App.html)
09-04 15:22:19.508: D/DroidGap(3575): onMessage(spinner,stop)
09-04 15:22:26.567: D/CordovaLog(3575): [object Object]
09-04 15:22:26.567: I/Web Console(3575): [object Object] at file:///data/data/com.App/files/www/default/js/appNav.js:174
09-04 15:22:27.898: D/Cordova(3575): onPageFinished(file:///data/data/com.App/files/www/default/App.html)
09-04 15:22:27.898: D/DroidGap(3575): onMessage(onNativeReady,null)
09-04 15:22:27.908: D/DroidGap(3575): onMessage(onPageFinished,file:///data/data/com.App/files/www/default/App.html)
09-04 15:22:27.948: D/(3575): HostConnection::get() New Host Connection established 0x2a6ca158, tid 3605
09-04 15:22:28.118: D/CordovaNetworkManager(3575): Connection Type: 3g
09-04 15:22:28.128: D/CordovaNetworkManager(3575): Connection Type: 3g
09-04 15:22:28.148: D/DroidGap(3575): onMessage(networkconnection,3g)
09-04 15:22:28.168: D/DroidGap(3575): onMessage(spinner,stop)
09-04 15:22:28.188: D/App(3575): ondeviceready event dispatched
09-04 15:22:28.258: D/App(3575): wlclient init started
09-04 15:22:28.288: D/App(3575): Read cookies: null
09-04 15:22:28.298: D/App(3575): CookieMgr read cookies: {}
09-04 15:22:28.577: D/dalvikvm(3575): GC_FOR_ALLOC freed 774K, 18% free 7613K/9232K, paused 61ms, total 67ms
09-04 15:22:28.607: D/App(3575): Request [http://XXX:8080/apps/services/api/App/android/init]
09-04 15:22:28.768: W/EGL_emulation(3575): eglSurfaceAttrib not implemented
09-04 15:22:29.477: D/App(3575): Request [http://XXX:8080/apps/services/api/App/android/init]
09-04 15:22:29.587: D/App(3575): response [http://XXX:8080/apps/services/api/App/android/init] success: /*-secure-
09-04 15:22:29.587: D/App(3575): {"userPrefs":{},"WL-Authentication-Success":{"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"wl_antiXSRFRealm":{"userId":"dnp53p3bq3h02g6d6bpkgs7al0","attributes":{},"isUserAuthenticated":1,"displayName":"dnp53p3bq3h02g6d6bpkgs7al0"},"wl_deviceNoProvisioningRealm":{"userId":"71ecfc9e-69f1-41c7-9007-7da6e31207f1","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@7483ddc7"},"isUserAuthenticated":1,"displayName":"71ecfc9e-69f1-41c7-9007-7da6e31207f1"},"wl_anonymousUserRealm":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"}},"gadgetProps":{"directUpdate":{"updateUnpackedSize":4464136,"availableSkins":["default"],"checksum":4181283381,"updateSize":1934792},"ENVIRONMENT":"android"},"userInfo":{"SubscribeServlet":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"SampleAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null"},"wl_antiXSRFRealm":{"userId":"dnp53p3bq3h02g6d6bpkgs7al0","attributes":{},"isUserAuthenticated":1,"displayName":"dnp53p3bq3h02g6d6bpkgs7al0"},"WorklightConsole":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null},"wl_deviceNoProvisioningRealm":{"userId":"71ecfc9e-69f1-41c7-9007-7da6e31207f1","attributes":{"mobileClientData":"com.worklight.core.auth.impl.MobileClientData@7483ddc7"},"isUserAuthenticated":1,"displayName":"71ecfc9e-69f1-41c7-9007-7da6e31207f1"},"myserver":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"},"wl_anonymousUserRealm":{"userId":"74a2c152-5a50-4d73-9644-177b7db04c9b","attributes":{},"isUserAuthenticated":1,"displayName":"74a2c152-5a50-4d73-9644-177b7db04c9b"}}}*/
09-04 15:22:29.597: D/App(3575): wlclient connect success
09-04 15:22:29.637: D/App(3575): before: app init onSuccess
09-04 15:22:29.637: D/App(3575): in startBusyIndicator
09-04 15:22:29.648: D/App(3575): busyIndicator is null or not visible, so create and show
09-04 15:22:29.668: D/App(3575): Exiting startBusyIndicator: [object Object]
09-04 15:22:29.668: D/App(3575): WL.Client.connect by-passed
09-04 15:22:29.868: W/EGL_emulation(3575): eglSurfaceAttrib not implemented
09-04 15:22:29.898: D/App(3575): after: app init onSuccess
09-04 15:22:29.898: D/App(3575): wlclient init success
09-04 15:22:30.297: D/App(3575): Request [http://XXX:8080/apps/services/api/App/android/query]
09-04 15:22:30.467: D/CordovaLog(3575): [object Object]
09-04 15:22:30.467: I/Web Console(3575): [object Object] at file:///data/data/com.App/files/www/default/js/appNav.js:174
09-04 15:22:31.347: D/Cordova(3575): onPageFinished(file:///data/data/com.App/files/www/default/App.html#/data/data/com.App/files/www/default/pages/home/Home.html)
09-04 15:22:31.347: D/DroidGap(3575): onMessage(onNativeReady,null)
09-04 15:22:31.347: D/DroidGap(3575): onMessage(onPageFinished,file:///data/data/com.App/files/www/default/App.html#/data/data/com.App/files/www/default/pages/home/Home.html)
09-04 15:22:31.547: D/App(3575): response [http://XXX:8080/apps/services/api/App/android/query] success: /*-secure-
09-04 15:22:31.547: D/App(3575): {"responseID":"574","result":{"travelAdvisory"}},"isSuccessful":true}*/
09-04 15:22:31.618: E/App(3575): [http://XXX:8080/apps/services/api/App/android/query] exception. Cannot read property 'question' of undefined
09-04 15:22:31.767: D/CordovaLog(3575): Uncaught TypeError: Cannot read property 'question' of undefined
09-04 15:22:31.767: E/Web Console(3575): Uncaught TypeError: Cannot read property 'question' of undefined at file:///data/data/com.App/files/www/default/wlclient/js/worklight.js:1487
09-04 15:22:35.187: D/App(3575): Hiding splash screen
09-04 15:22:35.197: D/App(3575): in stopBusyIndicator: [object Object]
09-04 15:22:35.207: D/DroidGap(3575): onMessage(splashscreen,hide)
09-04 15:22:36.218: D/App(3575): Calling initializeAirportLookupData
09-04 15:22:59.908: D/App(3575): Hiding splash screen
09-04 15:22:59.908: D/App(3575): in stopBusyIndicator: [object Object]
09-04 15:22:59.917: D/DroidGap(3575): onMessage(splashscreen,hide)
设备测试更新
在带有 Android 4.1.2 的测试设备 LG Optimus G 上,上述第二种情况的错误是:
09-04 14:57:09.798: D/App(3375): wlclient connect success
09-04 14:57:09.868: E/App(3375): [http://XXX:8080/apps/services/api/App/android/init] exception. Cannot read property 'skinLoaderContent' of undefined
09-04 14:57:09.948: D/CordovaLog(3375): Uncaught TypeError: Cannot read property 'skinLoaderContent' of undefined
09-04 14:57:09.948: E/Web Console(3375): Uncaught TypeError: Cannot read property 'skinLoaderContent' of undefined at file:///data/data/com.App/files/www/default/wlclient/js/worklight.js:1487
每次我们在 USB 连接设备上“运行为”“Android 应用程序”时都会发生这种情况。中间的其他时间成功地没有错误。
当我们在启动时不连接时,它总是可以正常工作。