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 (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 23:23:40 UTC

[jira] [Created] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

Bug when connect/disconnect while make ajax request (iOS)
---------------------------------------------------------

                 Key: CB-53
                 URL: https://issues.apache.org/jira/browse/CB-53
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS
            Reporter: Shazron Abdullah


reported at: https://github.com/phonegap/phonegap-iphone/issues/331
by: https://github.com/prsolucoes

Hi,

I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.

The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).

So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Eric C commented on CB-53:
--------------------------

This is a big problem for the project I'm working on since the wifi is very spotty.

The project is written in Sencha Touch 1.1 and uses Ext.Ajax.request to make AJAX calls every 10 seconds.

The way I've reproduced this issue is:
- Open up the PhoneGap app on iOS device
- Walk out of range of wifi
- App crashes

Now, I'm unsure if the repetitive AJAX calls have anything to do with this, but looking at the previous comment, it seems to be a factor.  I'll try and do a test with my AJAX requests off and see if it crashes.  Also, in addition to testing on a physical iOS device, I tested the app on the simulator by pulling out and putting back in the ethernet cable.  The simulator fired off the online/offline events correctly and did not crash.
                
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Shazron Abdullah reassigned CB-53:
----------------------------------

    Assignee: Shazron Abdullah
    
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
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-53) Bug when connect/disconnect while make ajax request (iOS)

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

Shazron Abdullah updated CB-53:
-------------------------------

    Fix Version/s: 2.2.0

Assigning to 2.2.0 for investigation and resolution.
                
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
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] [Issue Comment Edited] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

Posted by "Eric C (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212880#comment-13212880 ] 

Eric C edited comment on CB-53 at 2/21/12 8:33 PM:
---------------------------------------------------

This is a big problem for the project I'm working on since the wifi is very spotty.

The project is written in Sencha Touch 1.1 and uses Ext.Ajax.request to make AJAX calls every 10 seconds.

The way I've reproduced this issue is:
- Be connected to wifi
- Open up the PhoneGap app on iOS device
- Walk out of range of wifi
- App crashes

The reverse wifi situation will also cause a crash: Start app when disconnected from wifi and then walk into wifi range.

Now, I'm unsure if the repetitive AJAX calls have anything to do with this, but looking at the previous comment, it seems to be a factor.  I'll try and do a test with my AJAX requests off and see if it crashes.  Also, in addition to testing on a physical iOS device, I tested the app on the simulator by pulling out and putting back in the ethernet cable.  The simulator fired off the online/offline events correctly and did not crash.
                
      was (Author: ecolman):
    This is a big problem for the project I'm working on since the wifi is very spotty.

The project is written in Sencha Touch 1.1 and uses Ext.Ajax.request to make AJAX calls every 10 seconds.

The way I've reproduced this issue is:
- Open up the PhoneGap app on iOS device
- Walk out of range of wifi
- App crashes

Now, I'm unsure if the repetitive AJAX calls have anything to do with this, but looking at the previous comment, it seems to be a factor.  I'll try and do a test with my AJAX requests off and see if it crashes.  Also, in addition to testing on a physical iOS device, I tested the app on the simulator by pulling out and putting back in the ethernet cable.  The simulator fired off the online/offline events correctly and did not crash.
                  
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Shazron Abdullah updated CB-53:
-------------------------------

    Priority: Minor  (was: Major)
    
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Shazron Abdullah commented on CB-53:
------------------------------------

This sorely needs a test case. Sounds like something else is going on (Reachability crash?) but without further info this can't be acted on. 
                
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

Posted by "Randy McMillan (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220210#comment-13220210 ] 

Randy McMillan edited comment on CB-53 at 3/1/12 6:23 PM:
----------------------------------------------------------

Use 

if (navigator.onLine){} else {}

or

if (!navigator.onLine){} else {}

NOTE:

navigator.onLine will always be true in the simulator. 

Also:

If the type is unknown it is better to assume the app is offline.

if (navigator.network.connection.type == "unknown")
{
console.log('Assume app offLine');
onOffline(); //trigger onOffline event
}


function onOffline (){}


https://raw.github.com/RandyMcMillan/SenchaTouch/master/www/src/demos/myDemos/Accelerometer.js



                
      was (Author: randymcmillan):
    Use 

if (navigator.onLine){} else {}

or

if (!navigator.onLine){} else {}

for the apps initial load. 

NOTE:

navigator.onLine will always be true in the simulator. 

Also:

If the type is unknown it is better to assume the app is offline.

if (navigator.network.connection.type == "unknown")
{
console.log('Assume app offLine');
onOffline(); //trigger onOffline event
}


function onOffline (){}


https://raw.github.com/RandyMcMillan/SenchaTouch/master/www/src/demos/myDemos/Accelerometer.js



                  
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Randy McMillan commented on CB-53:
----------------------------------

Use 

if (navigator.onLine){} else {}

or

if (!navigator.onLine){} else {}

for the apps initial load. 

NOTE:

navigator.onLine will always be true in the simulator. 

Also:

If the type is unknown it is better to assume the app is offline.

if (navigator.network.connection.type == "unknown")
{
console.log('Assume app offLine');
onOffline(); //trigger onOffline event
}


function onOffline (){}


https://raw.github.com/RandyMcMillan/SenchaTouch/master/www/src/demos/myDemos/Accelerometer.js



                
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-53) Bug when connect/disconnect while make ajax request (iOS)

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

Shazron Abdullah resolved CB-53.
--------------------------------

    Resolution: Cannot Reproduce

More like a "can't fix". If ajax calls are crashing, it's something internal to WebKit anyway and we can't fix those. Crash logs will re-open this
                
> Bug when connect/disconnect while make ajax request (iOS)
> ---------------------------------------------------------
>
>                 Key: CB-53
>                 URL: https://issues.apache.org/jira/browse/CB-53
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>            Priority: Minor
>             Fix For: 2.2.0
>
>
> reported at: https://github.com/phonegap/phonegap-iphone/issues/331
> by: https://github.com/prsolucoes
> Hi,
> I post it on start project because the link to iphone on wiki is wrong, but now i found it searching on github.
> The problem is my app is make an ajax call every 1 second on my server and if i start the app without internet connect and connect on wifi/3g the application is killed (fatal error). Other situation is when im on my app connected and making ajax pooling and the connection (wifi or 3g) is dropped, the application is killed too (fatal error).
> So, if you are making ajax call and your connection change state (connected/disconnected) your app get a fatal error and close. :(

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