Known Issues for Hybrid Web Container

Learn about known issues and apply workarounds for Hybrid Web Container (HWC) development for all platforms except Windows and Windows Mobile.

Issue #Description
SMPONP-12431
The built-in JavaScript API document.cookie cannot be used to save cookies in Hybrid App pages on a device with Android API level 12 or higher.

This issue is caused by WebView Control update, and is not related to Hybrid Web Container. The cookie is not supported when the URL schema is "content://"

Workaround: Use SUPStorage to persist data.

SMPONP-11897
An iOS device loops infinitely between HWC and an Afaria client when trying to use Afaria registration in flight mode.

Workaround: Press the Home button on the iOS device to exit HWC to end the loop and try to register when a network connection is available.

RTC-428

Server Personalization Key default value not used

If you create a personalization key using a default value and assign the personalization key to the operation parameters of a column in an MBO, it does not use the default value as expected when the back end operation is invoked.

Workaround: Do not specify a value for the parameter.

RTC-334
If you migrate or otherwise generate a Hybrid App with the Use Backwards Compatible API option set one way, for example, off, and then afterwards change that setting, for example, to on, certain key files, namely API.js, Utils.js, WorkflowMessage.js, and Custom.js, are not regenerated and, thus, use the wrong API setting compared to the other generated files. 

Workaround: SAP recommends that you decide prior to migration (or, in the case of newly written Hybrid Apps, prior to generation) which API setting you want to use. Failing that, after changing the API setting, delete the API.js, Utils.js, WorkflowMessage.js, and Custom.js files manually and regenerate the Hybrid App with the desired API setting.

RTC-301
The Timepicker fails to work on iOS4.3.x.

Workaround: Use iOS version 5.0 or later.

 
RTC-287
On BlackBerry 7 simulators, when a Hybrid App is deployed from the Hybrid App Designer, the simulator crashes. See http://forum.jquery.com/topic/jquery-mobile-demo-page-causes-blackberry-7-1-simulator-browser-to-crash for information. This does not happen on a real device. Workaround:

Workaround: Use a BlackBerry 7 device for deploying Hybrid Apps.

RTC266
Changes to JavaScript functions.
  • showAlertDialog() – the title parameter is no longer used on iOS. It is already ignored on other platforms. This is true only for Sybase Unwired Platform versions 2.1.3 and 2.2sp02 (2.2.0 and 2.2sp01 work as before). 
  • showConfirmDialog() – this function does nothing.

These functions are deprecated.

Workaround:
  • showAlertDialog() – use the native JavaScript alert() function.
  • showConfirmDialog() – use the native JavaScript confirm() function

Alternatively, you can use PhoneGap APIs to display an alert or confirmation dialog. Be aware that although the PhoneGap APIs allow you to set the title of the alert and confirmation dialogs, and buttons, the PhoneGap APIs are asynchronous rather than synchronous, so using them as a direct substitute for the showAlertDialog() does not work. That would require refactoring the code in each instance where it is used.

RTC-240
On Android, PhoneGap Media play function does not play sound when the source is a web server. This is a known PhoneGap issue and is fixed in PhoneGap (Cordova) version 2.1.0 so that sound files that are stored on the device play correctly.

Workaround: Include the sound files with the application. See the discussion about this problem at:  https://groups.google.com/forum/?fromgroups=#!topic/phonegap/xCOwgKh0IQ0

RTC-236
When a 2.1.3 or older client tries to connect to a 2.2 or newer server using an invalid URL suffix (such as '/'), the client receives an HTTP authentication challenge and the connection fails.

Workaround: Use a valid URL suffix when attempting to connect a 2.1.3 or older client to a 2.2 or newer server.

RTC-220
In one page of the Hybrid App, the Save or Submit Hybrid App action fails to save the credential information to the local store by providing only "credential cached user name" without "credential cached password."

Workaround: Use the hwc.saveLoginCredentials() JavaScript API to save the user name.

RTC-205
On BlackBerry Torch and Storm devices, when using the Camera API, a picture that is taken is always rotated 90 degrees to the right.

Workaround:  None. This is a known problem with RIM APIs on these devices. See https://www.blackberry.com/jira/browse/JAVAAPI-701   and http://supportforums.blackberry.com/t5/Java-Development/Storm-Torch-camera-getSnapshot-orientation-issue/td-p/1316867. These sites require authorization from BlackBerry.

RTC-171
If a password is used for automatic device registration using the hwc.saveSettings() API, the password is used only once and is not saved in the Hybrid Web Container. Upon successful automatic registration, subsequent connections to the server uses the userid+deviceid+authcode combination (the password is not required). This is by design.

Workaround: If you want to save the password in the application, do so in the application code with the secured storage SUPStorage API.

RTC-169
Using the Hybrid Web Container on older BlackBerry devices may result in warnings or errors from the operating system, such as "The memory available on your device is low. Close some of the items below."

Workaround: Run the BlackBerry Hybrid Web Container on newer OS 6.x or OS 7.x devices with more memory. A fix for this is not available from RIM for Java-based platforms. See  https://www.blackberry.com/jira/browse/JAVAAPI-2275, which requires authorization from BlackBerry.

 
RTC-139
On iOS, when using the JavaScript API functions (hwc.openApp and hwc.openMessage) that allow the user to open a Hybrid App or message from within another Hybrid App, when opening the Hybrid App from within another application, the previously opened application closes. On platforms other than iOS, when the user closes the newly opened application, the previously opened application is still open.

Workaround: None.

RTC-135
On BlackBerry 5.0, the HTML5 sessionStorage object is not supported.

On both window.open() and window.location.href the HTML5 sessionStorage values are not carried to the next page.

Workaround: None.

RTC-115
Cannot update prepackaged Hybrid Apps.

The version number of the new Hybrid App must be higher than the current version number.

Workaround: Edit the manifest.xml file to update the version number and repackage the Hybrid App files.

RTC-111
On Android devices, when attempting to upload log files from the Hybrid Web Container after re re-registering the device user, an "Upload Failed" message is returned periodically.

Workaround: Upload the log files again.

RTC-91
In Hybrid Apps running on iOS devices, when a user enters a string in a numeric field, no error message is given, which allows the user to incorrectly enter string data in a numeric field.

In Hybrid Apps running on iOS, numeric edit boxes do not validate user entries.

Workaround: None.

RTC-90
On all Hybrid Web Container device platforms, when an expired certificate is used for device registration, the error message is "MMS Authentication Failed," which does not indicate the root cause of the error. 

Workaround: If you receive an "MMS Authentication Failed" error message, check your certificate to make sure it is not expired.

RTC-73
On all platforms, in manual registration mode, after calling the hwc.saveSettings API in hwc-api.js, the client cannot connect to the server.

Workaround: The hwc.startClient API must be called after the hwc.saveSettings invocation to connect to the server by manual registration.

RTC-52
A Hybrid App fails to deploy to the device.

If the Sybase Unwired Platform is installed in a cluster, and different paths are used on each application service node, the Hybrid App log may contain a message similar to Updated failed for Hybrid App item. Sybase Unwired Platform currently assumes that application service nodes are installed to the same path on all the nodes in the cluster, that is, that all application server nodes are installed to the same path on all cluster nodes. It stores full paths in the database during Hybrid App package installation. When the client connects, it looks for those paths in the file system. If the node it is connecting to does not have one of those paths, you see the error.

Workaround: Install Sybase Unwired Platform using the same installation path for each node of the cluster.

RTC-51
If you do not provision the Afaria server with the iOS Hybrid Web Container seeding file, and if the Afaria iOS client is installed on the iOS device and not configured with the connection settings in the iOS Hybrid Web Container, the Hybrid Web Container fails upon start-up. This happens because the Hybrid Web Container launches the Afaria client application to get the seeding file (settings) that can be used to connect to the Afaria server. The Afaria client application crashes before relaunching the iOS Hybrid Web Container.

Workaround: If you do not provision the Afaria server with the iOS Hybrid Web Container seeding file, the user must manually enter the connection settings for the Hybrid Web Container before launching it.

This issue does not occur if the Afaria client is not installed on the iOS device.

RTC-37
On Android 3.x devices, when proxy is enabled on the WiFi connection, connecting to Unwired Server directly using the HTTPS protocol makes the Hybrid Web Container client crash. This is an Android bug. See http://code.google.com/p/android/issues/detail?id=37050 for details.

Workaround: Either turn off the proxy or connect through Sybase Relay Server.

RTC-53
On iOS, some APIs, such as SUPStorage, perform slowly when using WiFi with an HTTP proxy
This happens only when all of the following conditions are true:
  • The Hybrid Web Container experiences long (10 - 75 seconds) delays while processing the JavaScript of Hybrid Apps and navigating between screens.
  • The Hybrid Web Container is running on a device connecting to the network through WiFi.
  • The WiFi access point is using a network HTTP proxy (Settings > WiFi > Choose a Network > HTTP Proxy).

If all of these conditions are true, these workarounds are available depending upon whether the Hybrid App is using JavaScript generated by the Mobile Workflow Forms Designer or using the Packaging Tool in conjunction with the JavaScript container code that ships with Sybase Unwired Platform 2.2.

Workaround #1: If you are using the JavaScript files generated by the Mobile Workflow Forms Designer, you must edit API.js, SUPStorage.js, and Utils.js, which are located in the html/js directory of the generated application code. For each file:
  1. Search for POST. Each instance is within a function, and typically there is a unique code path per platform.
  2. Identify the isIOS() code branch where an xmlHttpRequest is being opened, and change the last parameter of the open function call for the xmlHttpRequest to change it from false to true.
    For example, in SUPStorage.js, change line 171 from:
    xmlHttpReq.open("POST", "/sup.amp?querytype=workflowstorage&" + versionURLParam, false); 
    to:
    xmlHttpReq.open("POST", "/sup.amp?querytype=workflowstorage&" + versionURLParam, true); 
    Note: If you are deploying the Hybrid App to multiple platforms, make sure these changes affect only the iOS code path, which might mean creating a new “elseif” clause.
  3. Regenerate the Mobile Workflow package.

Workaround #2: Modify hwc_api.js (usually installed in SUP_HOME\UnwiredPlatform\MobileSDK22\HybridApp\Container) in the Hybrid App to look like the following example, and redeploy the application to the Hybrid Web Container. 

/**   
    * Encapsulate the HTTP post method. This function is called internally   
    */   
   hwc.postDataToContainer = function( queryType, data)   
   {   
                try   
 {   
            var response = "";   
            if (hwc.isWindowsMobile()) {   
            xmlhttp = hwc.getXMLHTTPRequest();   
            xmlhttp.open("POST", "/sup.amp?querytype=" + queryType + "&" + hwc.versionURLParam, false);   
           
            xmlhttp.send(data);   
            response = xmlhttp.responseText;   
                   }   
                  else if (hwc.isAndroid()) {   
                     response = _HWC.postData("http://localhost/sup.amp?querytype=" + queryType + "&" + hwc.versionURLParam, data);   
                  }    
                  else if (hwc.isBlackBerry()) {   
                      var xmlhttp = hwc.getXMLHTTPRequest();   
                      xmlhttp.open("POST",
        "http://localhost/sup.amp?querytype=" + queryType + "&" + hwc.versionURLParam, false);   
                      xmlhttp.send(data);   
                         response = xmlhttp.responseText;   
                   }   
                 else if (hwc.isIOS())
        {   
                   var xmlhttp = hwc.getXMLHTTPRequest();   
                  xmlhttp.open("POST", "http://localhost/sup.amp?querytype=" + queryType + "&" + hwc.versionURLParam, true);   
                  try   
                  {   
                      xmlhttp.send(data);   
                  }   
                  catch (ex)   
                  {   
                     if (ex.message.search(/XMLHttpRequest Exception 101/) == -1)   
                     {   
                        throw ex;   
                     }   
               }   
         }   
         return response;   
      }   
      catch (ex)   
      {   
         hwc.log( "hwc.postDataToContainer error: " + ex.message, "ERROR", false);   
      }   
   }; 
CR-708173
When the Hybrid Web Container tries to retrieve data from the MBO package, an Invalid application id <***> for package error appears.
Workaround: In Sybase Control Center, manually add an application ID for the MBO package's application list.
  1. Log in to Sybase Control Center.
  2. Go to hostname@localhost > Applications and click the Applications tab.
  3. Click Properties.
  4. In Domains and Packages, select the domain that contains the applicable MBO package.
  5. Assign the application ID to the MBO's package's applications list.
CR-705895
After adding JavaScript code in the customAfterMenuItemClick method to update the check box (using JQuery Mobile) state on the screen, the checkbox fails to update.

Workaround: When you use JavaScript to update the check box (using JQueryMobile) value, you must also add the refresh code. For example:

Whole sample in "customAfterMenuItemClick" method of Custom.js

function customAfterMenuItemClick(screen, menuItem) {
    if (screen === "Start" && menuItem === "setCheckbox") {
		var checkbox1 = document.getElementById('checkbox1');  
		checkbox1.checked = true;
		
		var checkbox2 = document.getElementById('checkbox2');
		checkbox2.checked = false;
		
		if (isJQueryMobileLookAndFeel) {
		    $("input[type='checkbox']").checkboxradio("refresh");
		}
    }
}
CR-705219
When the iOS Hybrid Web Container application tries to retrieve seeding information from an Afaria iOS App store hosted package you see this error message: Afaria client application is installed but not configured.
Workarounds: Configure Afaria client application and try again or go to the Settings application and enter your configuration information.
  • Seed Enterprise-hosted packages on the Afaria server.
  • Manually configure the connection information.
CR-703883
Switching from one edit box to another on a BlackBerry 7.0 simulator or device using the touch screen or mouse requires two clicks or touches.

Workaround: None for BlackBerry 7.0. Upgrading to BlackBerry 7.1 eliminates the problem.

CR-702603
BlackBerry 7.0 users see a white screen until the Workflow application's activation screen opens. See https://www.blackberry.com/jira/browse/JAVAAPI-119. Note that the site requires a BlackBerry ID to access the BlackBerry Jam Zone.

Workaround: None.

CR-693907
Hybrid Web Container occasionally fails on Android 2.2.

This can happen when all of these conditions are present:

  • There is only one read-only edit box control on a single screen, and
  • The application is using jQueryMobile GA version, and
  • You are using an Android 2.2 simulator or Samsung Galaxy device with Android 2.2.

Workaround:

  • Upgrade the OS on the device to Android 2.3, or,
  • If using an Android 3.x simulator, see CR 673572, or,
  • Add one or more controls to the screen.
CR-712912
iOS client container files deleted on application close.

The container files are no longer deleted after a package loads, but when the application closes.

CR-691005
Image upload may fail on BlackBerry 6 simulators older than version 6.0.0.499.

Workaround: Use a BlackBerry 9800 simulator with version 6.0.0.499 or later.

CR-689287
2.0 or 2.0 ESD #1 message-based synchronization (MBS) clients and Hybrid Web Container clients may not be able to connect to 2.1 ESD #3 or 2.2 servers.

If 2.0 or 2.0 ESD #1 clients have not connected through an activated registration, and you upgrade to 2.1 ESD #3, those clients may not be able to connect to a 2.1 ESD #3 or a 2.2 server.

Workaround: Implement a server registration that uses an empty application ID, and use manual registration to connect the MBS and Hybrid Web Container 2.0 and 2.0 ESD #1 clients to the server.

CR-686465
Camera feature is supported on some device simulators/emulators.

Workaround: Use a physical device.

CR-680253
Images do not appear correctly on mobile devices.

Hybrid Web Container/Workflow applications can display pictures from binary enterprise information system (EIS) data. But when a MBO developer drags and drops a table that contains an image field to create the MBO, the image field maps to a Binary datatype that has a length of approximately 3KB, which may not be large enough for the entire image. At runtime, the binary data of the image may be truncated in the cache database (CDB), and appear incorrectly on the device.

Workaround: When creating the MBO, manually modify the length of the binary field to make sure it is large enough to hold the image binary data, or use the BigBinary datatype instead.