incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-1296) deviceready event is never fired on iOS 4.2.1
Date Wed, 29 Aug 2012 21:18:07 GMT

    [ 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

Mime
View raw message