You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2012/08/29 22:39:07 UTC

[jira] [Created] (CB-1296) deviceready event is never fired on iOS 4.2.1

Shazron Abdullah created CB-1296:
------------------------------------

             Summary: deviceready event is never fired on iOS 4.2.1
                 Key: CB-1296
                 URL: https://issues.apache.org/jira/browse/CB-1296
             Project: Apache Cordova
          Issue Type: Bug
          Components: CordovaJS
    Affects Versions: 2.1.0
            Reporter: Shazron Abdullah
            Assignee: Filip Maj
            Priority: Critical
             Fix For: 2.1.0


deviceready event is never fired on iOS 4.2.1.

Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.



--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah commented on CB-1296:
--------------------------------------

onCordovaConnectionReady is dependent on the getInfo call, which in turns calls the NetworkStatus plugin's "getConnectionInfo" method.

The calls are relayed to the exec method, which uses the xhr bridge mode. I verified that the xhrs are sent, then I logged the corresponding response in CDVURLProtocol. No JavaScript exceptions are thrown regarding the xhrs.

For iOS 5, these calls are sent in succession and are received in the native side:
    #. [["NetworkStatus0","NetworkStatus","getConnectionInfo",[]]]
    #. [["Device1","Device","getDeviceInfo",[]]]


For iOS 4.2.1, the same calls are sent in succession, BUT only this message is received in the native side:
    #. [["Device1","Device","getDeviceInfo",[]]]

Somehow the NetworkStatus call just disappears without a trace. I will try querying the xhr status next to see what's going on.

                
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah commented on CB-1296:
--------------------------------------

Isolated it to the new xhr bridgemode we use. The command is never received by the CDVURLProtocol class.
                
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah updated CB-1296:
---------------------------------

    Priority: Blocker  (was: Critical)
    
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah commented on CB-1296:
--------------------------------------

I confirmed by setting the bridge mode back to IFRAME_NAV, everything works fine:
exec.setJsToNativeBridgeMode(exec.jsToNativeModes.IFRAME_NAV);
                
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah updated CB-1296:
---------------------------------

    Comment: was deleted

(was: Isolated it to the new xhr bridgemode we use. The command is never received by the CDVURLProtocol class.)
    
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah updated CB-1296:
---------------------------------

    Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
    
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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] [Resolved] (CB-1296) deviceready event is never fired on iOS 4.2.1

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

Andrew Grieve resolved CB-1296.
-------------------------------

    Resolution: Fixed

Fixed it by just setting the default bridge mode to IFRAME for 4.x devices.

commit: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=commit;h=b17e8cdf69b067f9fc7326164b5dbdea307ae85f

I updated the pre-built JS in the ios repo as well.

While debugging this, I did find that changing the XHR from a HEAD request to a GET made the request show up in the URIProtocol. It then properly made its way over to the UI thread to execute the plugin. It would go into deadlock at that point though, so I stopped pursuing it. IFRAME bridge mode is faster anyway and doesn't have any bugs that it triggers on 4.x

                
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS, iOS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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] [Comment Edited] (CB-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah edited comment on CB-1296 at 8/30/12 8:17 AM:
---------------------------------------------------------------

The onCordovaConnectionReady event is dependent on the getInfo call, which in turns calls the NetworkStatus plugin's "getConnectionInfo" method. The event is not fired if the method never returns - which is the source of the bug.

The calls are relayed to the exec method, which uses the xhr bridge mode. I verified that the xhrs are sent, then I logged the corresponding response in CDVURLProtocol. No JavaScript exceptions are thrown regarding the xhrs.

For iOS 5, these calls are sent in succession and are received in the native side:
# [["NetworkStatus0","NetworkStatus","getConnectionInfo",[]]]
# [["Device1","Device","getDeviceInfo",[]]]


For iOS 4.2.1, the same calls are sent in succession, BUT only this message is received in the native side:
# [["Device1","Device","getDeviceInfo",[]]]

Somehow the NetworkStatus call just disappears without a trace. I will try querying the xhr status next to see what's going on.

                
      was (Author: shazron):
    onCordovaConnectionReady is dependent on the getInfo call, which in turns calls the NetworkStatus plugin's "getConnectionInfo" method.

The calls are relayed to the exec method, which uses the xhr bridge mode. I verified that the xhrs are sent, then I logged the corresponding response in CDVURLProtocol. No JavaScript exceptions are thrown regarding the xhrs.

For iOS 5, these calls are sent in succession and are received in the native side:
    #. [["NetworkStatus0","NetworkStatus","getConnectionInfo",[]]]
    #. [["Device1","Device","getDeviceInfo",[]]]


For iOS 4.2.1, the same calls are sent in succession, BUT only this message is received in the native side:
    #. [["Device1","Device","getDeviceInfo",[]]]

Somehow the NetworkStatus call just disappears without a trace. I will try querying the xhr status next to see what's going on.

                  
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah updated CB-1296:
---------------------------------

    Component/s: iOS
    
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS, iOS
>    Affects Versions: 2.1.0
>         Environment: iOS 4.2.1 (iPod Touch 2nd Gen)
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Blocker
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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] [Assigned] (CB-1296) deviceready event is never fired on iOS 4.2.1

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

Shazron Abdullah reassigned CB-1296:
------------------------------------

    Assignee: Shazron Abdullah  (was: Filip Maj)
    
> deviceready event is never fired on iOS 4.2.1
> ---------------------------------------------
>
>                 Key: CB-1296
>                 URL: https://issues.apache.org/jira/browse/CB-1296
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.1.0
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 2.1.0
>
>
> deviceready event is never fired on iOS 4.2.1.
> Debugging this, I found that the problem is onCordovaConnectionReady is never fired, the deviceready channel is waiting for this event before it fires.

--
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