ICEpush
  1. ICEpush
  2. PUSH-321

notify.icepush fails without subject parameter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: 4.0
    • Component/s: Push Server
    • Labels:
      None
    • Environment:
      ICEpush as a service

      Description

      An attempt to send a push where the options do not contain a subject parameter appear to fail:

      This works:

      curl 'http://dev.bridgeit.io/push/notify.icepush' -H 'Origin: http://bridgeit.github.io' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://bridgeit.github.io/edge/auctionMonitor.html' -H 'Connection: keep-alive' --data 'ice.push.browser=5yhvicrc4w&ice.push.apikey=undefined&ice.push.access_token=3315bfb9-0ea6-46fc-b705-6dc2cef8a8d6&ice.push.realm=edge&group=jofilcer&option=subject%3DOutbid%20by%20pushadmin%3A%2010' --compressed

      but this does not:

      curl 'http://dev.bridgeit.io/push/notify.icepush' -H 'Origin: http://bridgeit.mobi' -H 'Accept-Encoding: gzip,deflate,sdch' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://bridgeit.mobi/demo' -H 'Connection: keep-alive' --data 'ice.push.browser=5yhvicrc4w&ice.push.apikey=undefined&ice.push.access_token=3315bfb9-0ea6-46fc-b705-6dc2cef8a8d6&ice.push.realm=edge&group=jofilcer' --compressed

        Activity

        Hide
        Ted Goddard added a comment -

        This can be reproduced with the auctionMonitor demo page:

        http://bridgeit.github.io/edge/auctionMonitor.html

        open two browsers with the above page and log in as auctioneer/ices0ft22 auctioneer1/ices0ft22.

        In the JavaScript console invoke:

        bridgeit.push(auctionName)

        which will not result in a push to the other browser.

        bridgeit.push(auctionName)

        The following does succeed, however:

        bridgeit.push(auctionName,

        {subject:"why do you need this"}

        )

        Show
        Ted Goddard added a comment - This can be reproduced with the auctionMonitor demo page: http://bridgeit.github.io/edge/auctionMonitor.html open two browsers with the above page and log in as auctioneer/ices0ft22 auctioneer1/ices0ft22. In the JavaScript console invoke: bridgeit.push(auctionName) which will not result in a push to the other browser. bridgeit.push(auctionName) The following does succeed, however: bridgeit.push(auctionName, {subject:"why do you need this"} )
        Hide
        Jack Van Ooststroom added a comment -

        Sending core/src/main/java/org/icepush/LocalPushGroupManager.java
        Transmitting file data .
        Committed revision 41318.

        Sending eps/src/main/java/com/icesoft/push/LocalPushGroupManager.java
        Transmitting file data .
        Committed revision 38564.
        Sending src/main/java/com/icesoft/notify/push/BlockingConnectionServer.java
        Sending src/main/java/com/icesoft/notify/push/LocalPushGroupManager.java
        Transmitting file data ..
        Committed revision 38565.

        Show
        Jack Van Ooststroom added a comment - Sending core/src/main/java/org/icepush/LocalPushGroupManager.java Transmitting file data . Committed revision 41318. Sending eps/src/main/java/com/icesoft/push/LocalPushGroupManager.java Transmitting file data . Committed revision 38564. Sending src/main/java/com/icesoft/notify/push/BlockingConnectionServer.java Sending src/main/java/com/icesoft/notify/push/LocalPushGroupManager.java Transmitting file data .. Committed revision 38565.
        Hide
        Jack Van Ooststroom added a comment -

        There were a couple of things involved here:

        • In the com.icesoft.notify.push.LocalPushGroupManager.Notification's newNotificationEntry(...) method an instance of org.icepush.NotificationEntry was created instead of a com.icesoft.notify.push.NotificationEntry. This has been corrected.
        • As the PushConfiguration is used for more than just "subject" and "detail" for instance, it is also used beyond the NotificationBroadcaster's broadcast(...) point and not just related to Cloud Push, the PushConfiguration should always be set on Browser instances for eligible PushIDs regardless of it being a Notification or OutOfBandNotification.

        Finally, when as the result of fixing the second issue I also made sure that a ConfirmationTimeout is only started if the PushConfiguration contains the "subject" attribute.

        Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - There were a couple of things involved here: In the com.icesoft.notify.push.LocalPushGroupManager.Notification's newNotificationEntry(...) method an instance of org.icepush.NotificationEntry was created instead of a com.icesoft.notify.push.NotificationEntry. This has been corrected. As the PushConfiguration is used for more than just "subject" and "detail" for instance, it is also used beyond the NotificationBroadcaster's broadcast(...) point and not just related to Cloud Push, the PushConfiguration should always be set on Browser instances for eligible PushIDs regardless of it being a Notification or OutOfBandNotification. Finally, when as the result of fixing the second issue I also made sure that a ConfirmationTimeout is only started if the PushConfiguration contains the "subject" attribute. Marking this one as FIXED.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: