IBM Worklight 6.1 - iOS上的直接更新失败,更新失败 - 处理应用程序更新文件失败

时间:2014-08-09 09:36:50

标签: ibm-mobilefirst

对于iOS设备,直接更新流程会被触发,但在解压缩更新存档时会失败。 请注意,对于Android设备,该过程可以正常运行,并且更新会成功推送到客户端应用程序。

当初始安装的.ipa版本的内容与新上载的.wlappp与AppCenter之间的校验和不同时,会正确触发直接更新提示。 AppCenter服务器和WL客户端日志都显示连接正常并且包下载成功。

当解压缩已更新的资源包并记录错误时,该过程失败:“更新应用程序的致命错误。无法打开下载的zip文件。”(下方并附上)。

我们尝试了两种具有相同结果的替代方案。

  • 在initOptions.js中启用标志
connectOnStartup : true,      
onConnectionFailure: function (){alert("Worklight server connection failed. Direct Update is not possible.");wlCommonInit();},
  • 在wlCommonInit()

    中触发连接
    WL.Client.connect({
        onSuccess: function(){WL.Logger.error("OK");},
        onFailure: function(){WL.Logger.error("FAIL");}
    });
    

iOS日志:

2014-08-09 10:25:28.974 SMC[1500:60b] [INFO] [wl.client] WL.Client.connect onConnectSuccess ENTERING
2014-08-09 10:25:28.981 SMC[1500:60b] [DEBUG] [NONE] wlclient connect success
2014-08-09 10:25:29.096 SMC[1500:60b] THREAD WARNING: ['Notification'] took '107.535889' ms. Plugin should use a background thread.
2014-08-09 10:26:19.976 SMC[1500:60b] [ERROR] [NONE] Update checksum is 3782542690
2014-08-09 10:26:19.988 SMC[1500:60b] THREAD WARNING: ['NetworkDetector'] took '13.082031' ms. Plugin should use a background thread.
2014-08-09 10:26:19.990 SMC[1500:60b] [ERROR] [NONE] In Progress checksum is 3782542690
2014-08-09 10:26:20.002 SMC[1500:60b] THREAD WARNING: ['NetworkDetector'] took '11.927979' ms. Plugin should use a background thread.
2014-08-09 10:26:20.004 SMC[1500:60b] [DEBUG] [NONE] Request [https://{appceneter_hostname}:443/worklight/apps/services/api/SMC/iphone/setup]
2014-08-09 10:26:20.014 SMC[1500:60b] THREAD WARNING: ['NetworkDetector'] took '10.286133' ms. Plugin should use a background thread.
2014-08-09 10:26:20.041 SMC[1500:60b] Requesting bytes starting from 0
2014-08-09 10:26:20.042 SMC[1500:60b] THREAD WARNING: ['WebResourcesDownloader'] took '25.979004' ms. Plugin should use a background thread.
2014-08-09 10:26:20.106 SMC[1500:60b] Start downloading update file.
2014-08-09 10:26:20.110 SMC[1500:60b] Temp update file is /var/mobile/Applications/2DEEED98-E567-4ABB-AD41-BE74EF28A014/Library/tempUpdateFile
2014-08-09 10:26:20.116 SMC[1500:60b] Length of updateFileBase64String before appending 0 
2014-08-09 10:26:20.118 SMC[1500:60b] Length of updateFileBase64String after appending 0 
2014-08-09 10:26:20.247 SMC[1500:60b] Temp update file is /var/mobile/Applications/2DEEED98-E567-4ABB-AD41-BE74EF28A014/Library/tempUpdateFile
2014-08-09 10:26:20.279 SMC[1500:60b] Length of updateFileBase64String before appending 0 
2014-08-09 10:26:20.281 SMC[1500:60b] Length of updateFileBase64String after appending 0 
2014-08-09 10:26:20.316 SMC[1500:60b] [DEBUG] [NONE] response [https://{appcenter_hostname}:443/worklight/apps/services/api/SMC/iphone/setup] success: 
2014-08-09 10:26:20.326 SMC[1500:60b] THREAD WARNING: ['NetworkDetector'] took '10.586914' ms. Plugin should use a background thread.
2014-08-09 10:26:20.328 SMC[1500:60b] [DEBUG] [NONE] defaultOptions:onSuccess
2014-08-09 10:26:20.339 SMC[1500:60b] THREAD WARNING: ['NetworkDetector'] took '11.760010' ms. Plugin should use a background thread.
2014-08-09 10:26:20.386 SMC[1500:60b] Temp update file is /var/mobile/Applications/2DEEED98-E567-4ABB-AD41-BE74EF28A014/Library/tempUpdateFile
2014-08-09 10:26:20.391 SMC[1500:60b] Length of updateFileBase64String before appending 0 
2014-08-09 10:26:20.392 SMC[1500:60b] Length of updateFileBase64String after appending 0 
2014-08-09 10:26:20.496 SMC[1500:60b] Temp update file is /var/mobile/Applications/2DEEED98-E567-4ABB-AD41-BE74EF28A014/Library/tempUpdateFile
2014-08-09 10:26:20.501 SMC[1500:60b] Length of updateFileBase64String before appending 0 
2014-08-09 10:26:20.502 SMC[1500:60b] Length of updateFileBase64String after appending 0 
2014-08-09 10:26:20.544 SMC[1500:60b] Finished downloading.
2014-08-09 10:26:20.545 SMC[1500:60b] Deleting file
2014-08-09 10:26:20.547 SMC[1500:60b] File deleted
2014-08-09 10:26:20.548 SMC[1500:60b] webViewDidFinishLoad: Length of updateFileBase64String before appending 0 
2014-08-09 10:26:20.550 SMC[1500:60b] webViewDidFinishLoad: Length of updateFileBase64String after appending 0 
2014-08-09 10:26:20.551 SMC[1500:60b] Setting progress
2014-08-09 10:26:20.553 SMC[1500:60b] Starting to unpack
2014-08-09 10:26:20.556 SMC[1500:60b] Decoding base 64
2014-08-09 10:26:20.558 SMC[1500:60b] Unzipping
2014-08-09 10:26:20.562 SMC[1500:60b] Zip file created
2014-08-09 10:26:20.570 SMC[1500:60b] Fatal error updating application. Can't open downloaded zip file.
2014-08-09 10:26:20.572 SMC[1500:60b] Warning: Attempt to dismiss from view controller <CDVMainViewController: 0x15630070> while a presentation or dismiss is in progress!
2014-08-09 10:26:20.586 SMC[1500:60b] Releasing downloadUpdateFileUiWebView
2014-08-09 10:26:20.631 SMC[1500:60b] THREAD WARNING: ['Notification'] took '39.161133' ms. Plugin should use a background thread.
2014-08-09 10:26:20.636 SMC[1500:60b] Temp update file is /var/mobile/Applications/2DEEED98-E567-4ABB-AD41-BE74EF28A014/Library/tempUpdateFile
2014-08-09 10:26:21.236 SMC[1500:60b] Unbalanced calls to begin/end appearance transitions for <CDVMainViewController: 0x15630070>.

2 个答案:

答案 0 :(得分:0)

确保您已将Server和Studio安装更新到最新的6.1.0.02 iFix版本,因为已进行相关的Direct Update修复。 iFix可以从IBM Fix Central获得。

如果它不起作用,请使用更新的日志更新问题。

答案 1 :(得分:0)

当我使用Windows机器构建iOS混合文件时,我遇到了这个问题。 当我使用Mac机器构建时问题解决了。 尝试重建iOS的.wlapp文件并将其重新部署到WL控制台并再次测试直接更新。

希望得到这个帮助。