Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    134
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default [4.1.1 rc1] Ext.Ajax.abort() does not abort the request in Chrome

    [4.1.1 rc1] Ext.Ajax.abort() does not abort the request in Chrome


    REQUIRED INFORMATION Ext version tested:
    • Ext 4.1.0
    • Ext 4.1.1 RC1 (4/30)
    Browser versions tested against:
    • Chrome (18.0.1025.168 )
    • IE9
    • FF3
    DOCTYPE tested against:
    • <!DOCTYPE HTML>
    Description:
    • Ajax requests does not get aborted when using Chrome
    Steps to reproduce the problem:
    • Load the test case and set up an appropriate URL
    • load the page
    The result that was expected:
    • All ajax requests must be aborted
    • Screen from FF with Firebug:
    • Capture7.jpg
    The result that occurs instead: Test Case:
    Code:
          var req = Ext.Ajax.request({
                        url: './test/ajaxabort',
    
                        success: function(response){
                            console.log('success',response);
                        },
                        failure: function (response){
                            console.log('failure',response);
                        }
                    });
                    Ext.Ajax.abort(req);
                    req = Ext.Ajax.request({
                        url: './test/ajaxabort',
    
                        success: function(response){
                            console.log('success',response);
                        },
                        failure: function (response){
                            console.log('failure',response);
                        }
                    });
                    Ext.Ajax.abort(req);
                    req = Ext.Ajax.request({
                        url: './test/ajaxabort',
    
                        success: function(response){
                            console.log('success',response);
                        },
                        failure: function (response){
                            console.log('failure',response);
                        }
                    });
                    Ext.Ajax.abort(req);
                    req = Ext.Ajax.request({
                        url: './test/ajaxabort',
    
                        success: function(response){
                            console.log('success',response);
                        },
                        failure: function (response){
                            console.log('failure',response);
                        }
                    });
                    Ext.Ajax.abort(req);
                    req = Ext.Ajax.request({
                        url: './test/ajaxabort',
    
                        success: function(response){
                            console.log('success',response);
                        },
                        failure: function (response){
                            console.log('failure',response);
                        }
                    });
                    Ext.Ajax.abort(req);

    HELPFUL INFORMATION
    Possible fix:
    • I traced it back and it seems that the method isLoading in Ext.data.Connection returns false because the state = 0....weird... :
      Code:
      isLoading : function(request) {         if (!request) { 
      
                  request = this.getLatest(); 
              } 
              if (!(request && request.xhr)) { 
      
                  return false; 
              } 
               
              var state = request.xhr.readyState; 
              return !(state === 0 || state == 4); 
          },
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Win7

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is what I get in Chrome 18:

    Screen Shot 2012-05-07 at 1.48.22 PM.png

    All requests have been canceled (aborted). In FF12 they show aborted and the failure callback is fired just like in Chrome 18. Am I missing something?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    134
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default


    Could you please provide me with your test case. Based my test case none of the requests get aborted(in Chrome) , the result is returned from the server, with the data and the success is fired.
    Capture9.PNG

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by anton.dimitrov View Post
    Could you please provide me with your test case. Based my test case none of the requests get aborted(in Chrome) , the result is returned from the server, with the data and the success is fired.
    Attachment 34972
    I used your code except I changed the urls to a local php script with a sleep(5)
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,166
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    In the same boat as Mitchell, I ran your test case, only changing the url to a local page, see the attached screen:abort.jpg
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Ext JS Premium Member anton.dimitrov's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    134
    Vote Rating
    5
    anton.dimitrov is on a distinguished road

      0  

    Default


    I found the issue and I am happy to say that it was with Chrome, my Chrome. I am migrating to 4.1 and it seems that the browser was still hanging to an old nightly build and not the latest one , which was causing the weird problem with the abort. Silly me..

    10x for the help

    Cheers

  7. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by anton.dimitrov View Post
    I found the issue and I am happy to say that it was with Chrome, my Chrome. I am migrating to 4.1 and it seems that the browser was still hanging to an old nightly build and not the latest one , which was causing the weird problem with the abort. Silly me..

    10x for the help

    Cheers
    Anytime, glad it was resolved in one way or another!
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 2

Tags for this Thread