ICEfaces
  1. ICEfaces
  2. ICE-10538

Showcase -> Mobile Cloud Push demo does not update browser asynchronously on Android device

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA
    • Fix Version/s: EE-4.0.0.GA
    • Component/s: Sample Apps
    • Labels:
      None
    • Environment:
      ICEfaces 4 trunk r44179. Showcase cloud push demo, android 4.4.2 and 5.0.2
    • Assignee Priority:
      P1
    • Affects:
      Sample App./Tutorial

      Description

      The priority and simple push messages are not updated on the page when using the cloud push demo with an android device. This is not an issue with 4.0 release, icefaces showcase public demo, or with QA test apps or ios device.
      To reproduce:
      Build showcase and deploy locally
      Using an android device navigate to showcase-mobile
      Go to Cloud Push demo page.
      Enable cloud push.
      Use either Priority Push or Simple Push.
      The page is not updated with the push messages.

        Activity

        Hide
        Arturo Zambrano added a comment -

        So far, it's not known what exactly caused this issue. The issue is not seen in the showcase application from the 4.0 release. However, if you build and deploy the showcase from the 4.0 trunk and 4.0 tag at revisions around the release date (latest in tag is 43348), the issue is seen again. Building the showcase in this way and replacing icefaces.jar for the one that comes in the 4.0 release solves the issue (doing the same for other jars didn't solve the issue). So, it seems to be a change in icefaces.jar what's causing this, but at the moment it's still not clear what it was.

        Show
        Arturo Zambrano added a comment - So far, it's not known what exactly caused this issue. The issue is not seen in the showcase application from the 4.0 release. However, if you build and deploy the showcase from the 4.0 trunk and 4.0 tag at revisions around the release date (latest in tag is 43348), the issue is seen again. Building the showcase in this way and replacing icefaces.jar for the one that comes in the 4.0 release solves the issue (doing the same for other jars didn't solve the issue). So, it seems to be a change in icefaces.jar what's causing this, but at the moment it's still not clear what it was.
        Hide
        Arturo Zambrano added a comment -

        It's still not clear what causes this issue. This issue has been present in the trunk for a long time, since the 4.0 release and before. In the 4.0 tag it's fixed exactly at revision 43274, when the external icepush folder was updated to /icepush/tags/icepush-core-4.0.0. Using the icepush.jar from this revision in a showcase app built from the trunk fixes the issue. There don't seem to be application-level changes that might have caused this.

        Show
        Arturo Zambrano added a comment - It's still not clear what causes this issue. This issue has been present in the trunk for a long time, since the 4.0 release and before. In the 4.0 tag it's fixed exactly at revision 43274, when the external icepush folder was updated to /icepush/tags/icepush-core-4.0.0. Using the icepush.jar from this revision in a showcase app built from the trunk fixes the issue. There don't seem to be application-level changes that might have caused this.
        Hide
        Ken Fyten added a comment -

        This issue is still occurring with the latest fixes in for ICE-10557 and PUSH-348.

        Show
        Ken Fyten added a comment - This issue is still occurring with the latest fixes in for ICE-10557 and PUSH-348.
        Hide
        Mircea Toma added a comment -

        The issue seems to be caused by the call to bridgeit.register(), when the "Enable Cloud Push" button is clicked. Debugging remotely the client code shows that the before unload event is fired when the BridgeIt container is loaded. The _ unload_ event is not fired at all and when the page re-displayed (after BridgeIt loading) the inline JS code is not evaluated. This causes the ICEpush and ICEfaces bridge to not load properly.

        Show
        Mircea Toma added a comment - The issue seems to be caused by the call to bridgeit.register() , when the "Enable Cloud Push" button is clicked. Debugging remotely the client code shows that the before unload event is fired when the BridgeIt container is loaded. The _ unload_ event is not fired at all and when the page re-displayed (after BridgeIt loading) the inline JS code is not evaluated. This causes the ICEpush and ICEfaces bridge to not load properly.
        Hide
        Mircea Toma added a comment -

        After more debugging I discovered that the call to History.replaceState in bridgeit.js code causes the behaviour described in the previous comment. By just replacing the call to History.pushState (with the same parameters) the page is properly unloaded and then re-loaded which allows for the ICEpush bridge to be fully setup and thus "Simple Push" button will trigger an update that is received by the displayed page.

        Show
        Mircea Toma added a comment - After more debugging I discovered that the call to History.replaceState in bridgeit.js code causes the behaviour described in the previous comment. By just replacing the call to History.pushState (with the same parameters) the page is properly unloaded and then re-loaded which allows for the ICEpush bridge to be fully setup and thus "Simple Push" button will trigger an update that is received by the displayed page.
        Hide
        Mircea Toma added a comment -

        NTFY-220 was created to deal with the changes in Bridgeit.

        Show
        Mircea Toma added a comment - NTFY-220 was created to deal with the changes in Bridgeit.
        Hide
        Ken Fyten added a comment - - edited

        Re-opened.

        The actual cloud push native notifications were working fine all along on Android and iOS. They continue to function correctly using the modified bridgeit.js from NTFY-220. Thus, it is not clear exactly what was fixed in NTFY-220 or if it is a necessary fix.

        HOWEVER, the actual issue that this JIRA is meant to capture is that on Android Chrome browser ONLY, when you either use the Simple Push, or Priority Push with the push connection enabled, the push updates do not appear on the browser page. If you navigate away from the demo and back the updates appear, so either the push update isn't being processed properly or it is and the browser is just not rendering it properly when it arrives. Also note that the desktop showcase push progress bar demo functions correctly on Android Chrome, as do the QA cloud push standalone test applications. So this issue is specific to Android Chrome and the Mobile Showcase Cloud Push demo. Also, it doesn't affect the ACTUAL cloud push native notifications, just the regular push updates to the browser.

        Show
        Ken Fyten added a comment - - edited Re-opened. The actual cloud push native notifications were working fine all along on Android and iOS. They continue to function correctly using the modified bridgeit.js from NTFY-220. Thus, it is not clear exactly what was fixed in NTFY-220 or if it is a necessary fix. HOWEVER, the actual issue that this JIRA is meant to capture is that on Android Chrome browser ONLY, when you either use the Simple Push, or Priority Push with the push connection enabled, the push updates do not appear on the browser page. If you navigate away from the demo and back the updates appear, so either the push update isn't being processed properly or it is and the browser is just not rendering it properly when it arrives. Also note that the desktop showcase push progress bar demo functions correctly on Android Chrome, as do the QA cloud push standalone test applications. So this issue is specific to Android Chrome and the Mobile Showcase Cloud Push demo . Also, it doesn't affect the ACTUAL cloud push native notifications, just the regular push updates to the browser.
        Hide
        Liana Munroe added a comment - - edited

        Android galaxy s4 mini using Chrome 39.0.2171.59, Nexus 5 5.0.2, Nexus S 4.1.1
        Scenario 1
        Tested using local Tomcat 7, ICEfaces EE Jenkins build 204, and latest modified bridgeit.js file.
        received NO page updates for either simple push and priority push. When attempting to get a native notification the following server warning was seen:
        Mar 24, 2015 10:21:52 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie
        r broadcast
        WARNING: No notification providers for 'c2dm:APA91bFfqB2NtsDb45X5G9Tt9JeF9coAedx
        L_0GWaFS7tZ50vC41AxcN5iYtm10Io8JLgVBZn1tVx1zz9SzTuBOnqWQCbepkkQ1Bx6anqYHYJcufP85
        Y8gf_2M5Il6pUqLMLIVPK1bP-T8_MYyXdDt3ydU9ry-x_ow' URI registered
        Mar 24, 2015 10:22:32 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie
        r broadcast

        Scenario 2
        Tested using ICEfaces EE Jenkins build 204, no modification to any files.
        received NO page updates for either simple push and priority push. When attempting to get a native notification the following server warning was seen:
        Mar 24, 2015 10:41:08 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie
        r broadcast
        WARNING: No notification providers for 'c2dm:APA91bFfqB2NtsDb45X5G9Tt9JeF9coAedx
        L_0GWaFS7tZ50vC41AxcN5iYtm10Io8JLgVBZn1tVx1zz9SzTuBOnqWQCbepkkQ1Bx6anqYHYJcufP85
        Y8gf_2M5Il6pUqLMLIVPK1bP-T8_MYyXdDt3ydU9ry-x_ow' URI registered

        Show
        Liana Munroe added a comment - - edited Android galaxy s4 mini using Chrome 39.0.2171.59, Nexus 5 5.0.2, Nexus S 4.1.1 Scenario 1 Tested using local Tomcat 7, ICEfaces EE Jenkins build 204, and latest modified bridgeit.js file. received NO page updates for either simple push and priority push. When attempting to get a native notification the following server warning was seen: Mar 24, 2015 10:21:52 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie r broadcast WARNING: No notification providers for 'c2dm:APA91bFfqB2NtsDb45X5G9Tt9JeF9coAedx L_0GWaFS7tZ50vC41AxcN5iYtm10Io8JLgVBZn1tVx1zz9SzTuBOnqWQCbepkkQ1Bx6anqYHYJcufP85 Y8gf_2M5Il6pUqLMLIVPK1bP-T8_MYyXdDt3ydU9ry-x_ow' URI registered Mar 24, 2015 10:22:32 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie r broadcast Scenario 2 Tested using ICEfaces EE Jenkins build 204, no modification to any files. received NO page updates for either simple push and priority push. When attempting to get a native notification the following server warning was seen: Mar 24, 2015 10:41:08 AM org.icepush.servlet.MainServlet$DefaultOutOfBandNotifie r broadcast WARNING: No notification providers for 'c2dm:APA91bFfqB2NtsDb45X5G9Tt9JeF9coAedx L_0GWaFS7tZ50vC41AxcN5iYtm10Io8JLgVBZn1tVx1zz9SzTuBOnqWQCbepkkQ1Bx6anqYHYJcufP85 Y8gf_2M5Il6pUqLMLIVPK1bP-T8_MYyXdDt3ydU9ry-x_ow' URI registered
        Hide
        Liana Munroe added a comment -

        See attached file androidConsole.txt. This is the console output taken after using an android 4.4.2 device and the showcase > Cloud Push Demo.
        To produce this output I deployed the application using the latest modified bridgeit.js file and EE 4.0.0 Jenkins build 204. Then navigated to the Cloud Push demo, then used Simple Push (page did not update), then used Priority Push (page did not update).

        Show
        Liana Munroe added a comment - See attached file androidConsole.txt. This is the console output taken after using an android 4.4.2 device and the showcase > Cloud Push Demo. To produce this output I deployed the application using the latest modified bridgeit.js file and EE 4.0.0 Jenkins build 204. Then navigated to the Cloud Push demo, then used Simple Push (page did not update), then used Priority Push (page did not update).
        Hide
        Mircea Toma added a comment - - edited

        Well, it turns out there was a change that I missed committing into the repository. The 'onbeforeunload' callback registered by ICEpush is now pausing the blocking connection instead of shutting it down to allow it to resume operations later on. This is necessary to account for the "quirky" Chrome (on Android) behaviour which triggers the beforeUnload event before sending the browser into background, without calling the rest of the events when page is brought forward (unload and load events).
        The fix also satisfies ICE-10377 requirements which introduced the 'onbeforeunload' callback.

        Also this is the only fix required, the change to bridgeit.js is not necessary because calling History.pushState will not generate the expected events on browser hide-show.

        Show
        Mircea Toma added a comment - - edited Well, it turns out there was a change that I missed committing into the repository. The 'onbeforeunload' callback registered by ICEpush is now pausing the blocking connection instead of shutting it down to allow it to resume operations later on. This is necessary to account for the "quirky" Chrome (on Android) behaviour which triggers the beforeUnload event before sending the browser into background, without calling the rest of the events when page is brought forward ( unload and load events). The fix also satisfies ICE-10377 requirements which introduced the 'onbeforeunload' callback. Also this is the only fix required, the change to bridgeit.js is not necessary because calling History.pushState will not generate the expected events on browser hide-show.
        Hide
        Mircea Toma added a comment -

        Yes, additional parameters and setup is required since in iOS the APNS messaging service is used.

        Show
        Mircea Toma added a comment - Yes, additional parameters and setup is required since in iOS the APNS messaging service is used.
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE-4.0.0 Jenkins build 2 using Tomcat 7 on LABS1 instance. Tested on ios 7.2, android 4.4.2, IE 11, FF 34, Chrome 41. All aspects of cloud push, desktop and mobile device are functioning as expected.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE-4.0.0 Jenkins build 2 using Tomcat 7 on LABS1 instance. Tested on ios 7.2, android 4.4.2, IE 11, FF 34, Chrome 41. All aspects of cloud push, desktop and mobile device are functioning as expected.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: