Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#11575 closed bug (invalid)

Cross-Domain ajax request error handler does not get called in Firefox 11

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

I have the following AJAX JSONP request, to a third-party free webservice (success and error actions simplified):

      $.ajax({
          type: 'get',
          url: 'http://openapi.ro/api/companies/123456789.json',
          dataType: 'jsonp',     
          success: function(data) {
              alert(data.name);
          },
          error: function(data) {
              alert('fail')
          }
                   
      });

If the call fails (404 for instance), the error callback is not invoked in Firefox 11. In Chrome, Safari (Windows) and IE9 the callback is invoked properly.

Also, in the Firebug tools, the 404 response is visible.

To workaround this, the 'timeout' parameter needs to be added. With the timer parameter present, the error callback is fired normally, after the timeout has elapsed

The behaviour has always been reproduced under Firefox 11 (several computers as well) with the above AJAX request

Change History (3)

comment:1 Changed 10 years ago by sindresorhus

Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 9 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:3 Changed 9 years ago by [email protected]

Issue is no longer present in Firefox 12.

Also, good work jQuery team!

Note: See TracTickets for help on using tickets.