MobileFirst 8.0 Direct Update failing after downloading the updates

家住魔仙堡 提交于 2020-01-17 04:40:06

问题


I am using MFP8 and my application is a Cordova based hybrid app running on Android platform (no native code only HTML, JS and CSS)

In MFP8, according to documentation WL.connect() is not there anymore and calling an unprotected resource will not trigger Direct Update. So I created a secured method in my HTTP adapter and I call it. I also wrote a challenge handler (which basically does nothing just returns true,) and the adapter call is successful and rest of my application works fine.

Note: The challenge handler adapter must be written in Java and I followed those steps.

Now I make changes to my HTML do a "cordova build android" and then call the "mfpdev app webupdate".

Everything is successful and I see the web resources updated in the MFP8 console. Now I launch my app and click a button to call the dummy secured method and that triggers the Direct Update. It downloads the resources and at the end after installing thows an error message "Update Failed" "Direct update failure." and shows options "CLOSE" and "RELOAD".

I click "RELOAD" it does the same thing as above.

I click "CLOSE" it throws an error message with error code "CHALLENGE_HANDLING_CANCELED" and error message "Challenge handler operation was cancelled".

Note: I do not get this message when there is no Direct Update, all works fine.

I saw there is a fix for MFP8 (8.0.0.0-MFPF-DevKit-Windows-IF2016070718) and I downloaded that from FixCentral and updated my MFP8 server in my local dev box and changed the config.xml to update the application to a new version and did the deployment once again.

No changes still getting the same error message.

Any help would be appreciated

-A


回答1:


first: the process of migrating a pre-v8.0 MFP client project is described here: http://www.ibm.com/support/knowledgecenter/en/SSHS8R_8.0.0/com.ibm.worklight.upgrade.doc/dev/c_convert2cordova.html

second: the problem in this specific project was that the Cordova's config.xml contained a wrong value ("mfp-pubkey") inside mfp:directUpdateAuthenticityPublicKey element. Once nullified that value , Direct update started to work fine. follow http://www.ibm.com/support/knowledgecenter/en/SSHS8R_8.0.0/com.ibm.worklight.dev.doc/admin/t_authenticated_direct_update.html?view=kc#t_authenticated_dir_update on how to properly fill the correct key.



来源:https://stackoverflow.com/questions/38589286/mobilefirst-8-0-direct-update-failing-after-downloading-the-updates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!