Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#10529 closed bug (invalid)

iOS 5 report error when $.ajax triggered

Reported by: genius_tse@… Owned by: genius_tse@…
Priority: low Milestone: None
Component: ajax Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

this problem only found in Mobile Safari over iOS5. code is working on iOS4

Error will prompt from console like below when ajax triggered

"XMLHttpRequest cannot load http://xxxxxx?xxx=&xxxx. Cannot make any request from null."

Code to fire ajax request:

var saveUrl = 'a.php?action=login&u=a&p=b';
$.ajax({data: $("#theForm").serialize(),
            type: "POST",
            url: saveUrl,
            timeout: 20000,
            contentType: "application/x-www-form-urlencoded;charset=UTF-8",
            dataType: 'json',
            success: function(data) {
                // do nothing
            }
        });

Change History (11)

comment:1 Changed 8 years ago by timmywil

Component: unfiledajax
Owner: set to genius_tse@…
Priority: undecidedlow
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 in reply to:  1 Changed 8 years ago by jbosch

low priority? none of my iphone html5 games works now... when it is expected to release a bugfix for this issue?

thanks!

Replying to timmywil:

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:3 Changed 8 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:4 Changed 8 years ago by anonymous

This issue is still present in latest jQuery version with on my iPad 2.

comment:5 Changed 8 years ago by anonymous

found a working (the bug shows up) jsfiddle at stackoverflow: http://jsfiddle.net/ambiguous/zWC3R/

(interestingly the bug also shows up when trying to change the jquery version within jsfiddle - so jsfiddle alone would also be a good example)

source: http://stackoverflow.com/questions/7942739/jquery-ajax-functions-not-working-in-ios-5-safari-ipad

comment:6 Changed 8 years ago by anonymous

after rebooting the ipad it worked again for some time without any problem - but after a little while the bug was present again.

comment:7 Changed 8 years ago by anonymous

Has somebody found a bugfix for this problem?

comment:8 Changed 8 years ago by anonymous

I also had this issue verbatim. I rebooted my iPad and the issue went away which indicates to me the bug maybe with Safari.

comment:9 Changed 8 years ago by Rick Waldron

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

comment:10 in reply to:  9 ; Changed 8 years ago by ewatje@…

I have managed to reproduce it consistently as follows:

  1. Open a page with an $.ajax() call and a link to a PDF
  2. Click link to download PDF
  3. Open PDF in iBooks, effectively puts Safari in background
  4. Put Safari in foreground, will show the PDF
  5. Press back button to go back to the page with $.ajax() call.

Restarting Safari solves the issue until I do the above again. Maybe this helps.

Replying to rwaldron:

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

comment:11 in reply to:  10 Changed 7 years ago by vanly007@…

Replying to ewatje@…:

I have managed to reproduce it consistently as follows:

  1. Open a page with an $.ajax() call and a link to a PDF
  2. Click link to download PDF
  3. Open PDF in iBooks, effectively puts Safari in background
  4. Put Safari in foreground, will show the PDF
  5. Press back button to go back to the page with $.ajax() call.

Restarting Safari solves the issue until I do the above again. Maybe this helps.

Replying to rwaldron:

Seems to me that the problem is not being caused by jQuery - if it were, the issue would be consistently reproducible. Please stop posting "me too" unless you have verifiable evidence.

I have similar problem, there's a solution that to view pdf file in a popup dialog, but you'll receive safari popup blocker complaint.

Note: See TracTickets for help on using tickets.