You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Joe Bowser (JIRA)" <ji...@apache.org> on 2012/11/15 00:50:12 UTC

[jira] [Created] (CB-1856) Offline Event fires twice on Jellybean

Joe Bowser created CB-1856:
------------------------------

             Summary: Offline Event fires twice on Jellybean
                 Key: CB-1856
                 URL: https://issues.apache.org/jira/browse/CB-1856
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.3.0
         Environment: Neuxs 7 running Android 4.2
            Reporter: Joe Bowser
            Assignee: Joe Bowser
            Priority: Minor
             Fix For: 2.3.0


While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509364#comment-13509364 ] 

Joe Bowser commented on CB-1856:
--------------------------------

Does this mean that we should fire the Online event twice in this circumstance?
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506126#comment-13506126 ] 

Simon MacDonald commented on CB-1856:
-------------------------------------

Hey Joe, there is a delay on the JS side when it receives and offline event for exactly the situation you are talking about. We notice when going from 3G/4G to Wifi there would be a short period where the device is offline but there is no point sending that offline event since the app will be online again before the app can react. 
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506014#comment-13506014 ] 

Joe Bowser commented on CB-1856:
--------------------------------

https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=commit;h=2c202b82d737c00b3b03b9c6988e1780d3f2df68
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>             Fix For: 2.4.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497685#comment-13497685 ] 

Andrew Grieve commented on CB-1856:
-----------------------------------

The JS has code to throttle offline events, so my guess here is that the webview is sending one of the events and cordova is sending the other. We could work around this by cancelling cordova's if the system sends one, or maybe just disable cordova's for JB? Either way, I'm not going to look at this (at least not right away) since it's low priority.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-1856:
---------------------------

         Priority: Minor  (was: Major)
    Fix Version/s:     (was: 2.3.0)
                   2.4.0

Seriously, this isn't worth holding up a release over.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-1856:
---------------------------

    Priority: Major  (was: Minor)

Galaxy Nexus is getting 4.2, bumping priority.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>             Fix For: 2.3.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502974#comment-13502974 ] 

Joe Bowser commented on CB-1856:
--------------------------------

After looking at this, it's not coming from the webview at all.  For some reason the receiver is being called twice.  We can suppress duplicates on the updateConnectionInfo so that switching from WiFi to WiFi doesn't get sent.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>             Fix For: 2.3.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509499#comment-13509499 ] 

Simon MacDonald commented on CB-1856:
-------------------------------------

Yes, we still fire the online event twice as the type of connection changes but we eat the offline event.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.4.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498241#comment-13498241 ] 

Joe Bowser commented on CB-1856:
--------------------------------

Yeah, this will end up being higher priority the more people start using 4.1/4.2, so the priority is a bit deceiving.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.3.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1856) Offline Event fires twice on Jellybean

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506013#comment-13506013 ] 

Joe Bowser commented on CB-1856:
--------------------------------

Added a partial fix.  The issue is that when you switch from 4G to WiFi, it goes online, then offline, then online again.  The question is where the offline event went in that process.  I'll try to figure this out, but this is really nit-picky at this point.
                
> Offline Event fires twice on Jellybean
> --------------------------------------
>
>                 Key: CB-1856
>                 URL: https://issues.apache.org/jira/browse/CB-1856
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.3.0
>         Environment: Neuxs 7 running Android 4.2
>            Reporter: Joe Bowser
>            Assignee: Joe Bowser
>             Fix For: 2.3.0
>
>
> While testing CB-1846, I discovered that the Offline and Online events are being called twice on my Galaxy Nexus and my Nexus 7.  The Samsung Galaxy S2 and the Nexus S that I tested are working as expected.  We ideally should only fire this event once when we switch WiFi on and off.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira