Topic
  • 9 replies
  • Latest Post - ‏2012-12-11T16:20:14Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic iPhone & iPad Platforms Update Issue for 5.0.5

‏2012-12-10T15:21:38Z |
Do the following for upgrade to 5.0.5:

1. Remove any existing Worklight plugin in eclipse
2. Create a brand new workspace
3. Perform a new installation to 5.0.5
4. Import 5.0.0.3 project
The Worklight console now is saying peforming upgrade. There are two platforms failed to upgrade: iPhone and iPad. The error message is:
>> Failed to upgrade environment iphone of application <appname>.Failed upgrading folder. Upgrade process - Problem in updating an entry in Cordova.plist
This project is using webview overlay so the .plist contains WebViewOverlayPlugin in dict tag. What should I do for next step?

Regards

Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T15:35:15Z  
    Jerry, I had a similar issue. I think it was due to me changing the name of a file when I imported my project. I changed the name back and cleaned my project, everything was fine.

    Just make sure you didn't remove or rename the file path the error is barking about when you were importing it, then clean it.

    Ralph Pina
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T15:54:15Z  
    Jerry, I had a similar issue. I think it was due to me changing the name of a file when I imported my project. I changed the name back and cleaned my project, everything was fine.

    Just make sure you didn't remove or rename the file path the error is barking about when you were importing it, then clean it.

    Ralph Pina
    Hi Ralph

    No I didn't rename anything. I just imported exactly same project from my old 5.0.0.3 project. I am using web view overlay to extend Worklight heavily. That file contains cordova plugin extension for iPhone or iPad. Not sure how to do manually upgrade since the cordova has been upgraded to 2.X for iPhone and iPad as well.

    Get first time com.worklight.shared.common.messages:logger.removeTempDirError when try to build and deploy app. Then I tried clean project and then build and deploy. The error message didn't come out again. Have to see how it is in Mac to see what should be done for unsuccessful iPhone upgrade...

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T16:11:43Z  
    Hi Ralph

    No I didn't rename anything. I just imported exactly same project from my old 5.0.0.3 project. I am using web view overlay to extend Worklight heavily. That file contains cordova plugin extension for iPhone or iPad. Not sure how to do manually upgrade since the cordova has been upgraded to 2.X for iPhone and iPad as well.

    Get first time com.worklight.shared.common.messages:logger.removeTempDirError when try to build and deploy app. Then I tried clean project and then build and deploy. The error message didn't come out again. Have to see how it is in Mac to see what should be done for unsuccessful iPhone upgrade...

    Jerry
    Just tried Android, the upgrade process is identified successfully but failed to start mobile app. The message is like:
    I/Web Console(23059): Falling back on PROMPT mode since _cordovaNative is missing. at file:///data/data/com.something/files/www/default/wlclient/js/cordova.js:1034

    E/Web Console(23059): Uncaught TypeError: Object #<Object> has no method 'exec' at file:///data/data/com.something/files/www/default/wlclient/js/wlgap.android.js:779

    The cordova plugin js has to be updated like such as:
    if(!window.plugins) {
    window.plugins = {};
    }
    if (!window.plugins.webViewOverlay) {
    window.plugins.webViewOverlay = new WebViewOverlayPlugin();
    }

    Still try to find update document. Does any one has any?

    Jerry
  • IdanAdar
    IdanAdar
    741 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T16:42:18Z  
    In both the case of iOS and Android this seems to be related to webViewOverlay; can you attach your project or alike prior to importing it to 5.0.5?
    Does it happen to a project not containing this option?
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform

    Message was edited by: IdanAdar
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T16:42:19Z  
    • IdanAdar
    • ‏2012-12-10T16:30:45Z
    In both the case of iOS and Android this seems to be related to webViewOverlay; can you attach your project or alike prior to importing it to 5.0.5?
    Does it happen to a project not containing this option?
    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform

    Message was edited by: IdanAdar
    Hi Idan

    The updating process didn't complain anything for Android. When try to deploy app into Android devices, the LogCat it showed 12-10 11:24:25.586: E/Web Console(24077): Uncaught TypeError: Object #<Object> has no method 'exec' at file:///data/data/com.something/files/www/default/wlclient/js/wlgap.android.js:779. You could see a white blank screen in device and no response since then. The application is not initialized yet.

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T18:31:39Z  
    Hi Idan

    The updating process didn't complain anything for Android. When try to deploy app into Android devices, the LogCat it showed 12-10 11:24:25.586: E/Web Console(24077): Uncaught TypeError: Object #<Object> has no method 'exec' at file:///data/data/com.something/files/www/default/wlclient/js/wlgap.android.js:779. You could see a white blank screen in device and no response since then. The application is not initialized yet.

    Jerry
    OK. Here is the latest findings:

    In wlInitOptions, showLogger has been changed to enableLogger. Change it will enable local web app to be running without issue. Next step is to upgrade server to 5.0.5 and see how far for a real device will go. Will test on Android devices first.

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-10T19:03:10Z  
    OK. Here is the latest findings:

    In wlInitOptions, showLogger has been changed to enableLogger. Change it will enable local web app to be running without issue. Next step is to upgrade server to 5.0.5 and see how far for a real device will go. Will test on Android devices first.

    Jerry
    Further question how to rerun the upgrade process for iphone and ipad?

    How to convert Cordova.plist to config.xml in manual way?

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-11T06:46:43Z  
    Further question how to rerun the upgrade process for iphone and ipad?

    How to convert Cordova.plist to config.xml in manual way?

    Jerry
    "How to convert Cordova.plist to config.xml in manual way?"

    https://github.com/apache/cordova-ios/blob/master/bin/cordova_plist_to_config_xml

    It seems to be needed for Cordova 2.3, not sure if that will help with your Cordova 2.2 issues.
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: iPhone &#38; iPad Platforms Update Issue for 5.0.5

    ‏2012-12-11T16:20:14Z  
    "How to convert Cordova.plist to config.xml in manual way?"

    https://github.com/apache/cordova-ios/blob/master/bin/cordova_plist_to_config_xml

    It seems to be needed for Cordova 2.3, not sure if that will help with your Cordova 2.2 issues.
    You are correct. The 2.3 unified to be all into config.xml. My upgrade for iPhone and iPad is failed in one of my company's laptop. What I want to know is what is changed for this Cordova.plist in new Worklight version 5.0.5. Fortunately exactly same projects successfully upgraded in Linux. So I transported all code back to that laptop. Now I could see what is updated in upgrade process and manually fix potential problems. So far get Android, iPhone and iPad all successfully migrated. Just two points:

    1. In wlInitOptions, showLogger is shown in information center as an option. But it has some problem. In the log it showed WL is looking for enableLogger.

    2. All Cordova custom plugin as to be upgraded:
    if(!window.plugins) {
    window.plugins = {};
    }
    if (!window.plugins.webViewOverlay) {
    window.plugins.webViewOverlay = new WebViewOverlayPlugin();
    }

    Then all things will be running smoothly in WL studio. Didn't notice too much difference on performance. But at least JQuery is in 1.8.1 and Cordova is in 2.2.0. Thanks, IBM Worklight team!

    Jerry