srhyne / jQuery-Parse

An AJAX wrapper for the Parse.com REST API
212 stars 31 forks source link

Get error no transport when call $.parse.get("tasks"); #10

Open stan4th opened 12 years ago

stan4th commented 12 years ago

Hi, I init OK in javascript but when I call javascript $.parse.get("tasks"); I get the Microsoft JScript runtime error: $.parse :error No Transport. The error occurs in jquery at the following function;-

    error: function( msg ) {
        throw new Error( msg );
    },

javascript msg = "$.parse :error No Transport" Any ideas please?

PS using jquery-1.7.2

srhyne commented 12 years ago

I think this is an issue with IE/CORS support.

Looking at this...

srhyne commented 12 years ago

Perhaps we can have some of these headers set by default or dynamically based on user agent.

ikeamanual commented 12 years ago

I get the same error in IE9. Also when allowing cross domain as shown in the settings of the link above.

Chrome and FF are ok.

srhyne commented 12 years ago

I'm in the process of trying to fix this IE issue. Just downloaded IE into virtualbox for my mac. I think that $.support.cors = true; ($.support.cors return false in IE right now). Might help fix this error but I don't know yet.

ikeamanual commented 12 years ago

In IE0 I normally get the error: {"readyState":0,"status":0,"statusText":"No Transport"}

after adding: $.support.cors = true;

I get a different error: {"readyState":0,"status":0,"statusText":"Error: Toegang geweigerd.\r\n"}

which is Dutch for " entry not allowed"

On Sun, May 27, 2012 at 9:04 PM, Stephen Rhyne < reply@reply.github.com

wrote:

$.support.cors = true;

householdsteve commented 11 years ago

hello, is there any update on this? or has anyone successfully done this? i have the same issue with $.support.cors = true; after adding it i do not get the no transport error, but rather an access denied from parse. i am also using session_token for the call. it works in all non IE browsers (i'm using jquery 1.10.x).

please let me know! thanks so much.

srhyne commented 11 years ago

Hi Steve,

Yeah, I'm going to guess it's a combo of using 1.1.x for jQuery and being on IE. That's quite the legacy combo. Have you tried upgrading jQuery?

Also, have you tried using Parse's official JS library?

-Stephen

householdsteve commented 11 years ago

hi stephen, thanks for the quick response, i suppose i should have read up a little more on the subject before writing. i think i'm just going to put up a good ol' no support for < ie 10 message and hope no one really cares! :D

in case you or others are interested here's what's going on: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx this article outlines all of the requirements for XDomainRequest on IE8&9 and after comparing the internals of your plugin with the official parse javascript sdk it's rather clear to see why it's not working.

the official sdk sets up the ajax call differently based on those legacy browsers and sends the appropriate headers/contentType. see lines: 1464 - 1534 (https://www.parsecdn.com/js/parse-1.2.8.js) while your plugin just handles a single type of ajax call with the "application/json" contentType.

i'm not sure if you're interested in integrating this capability, i hate IE with a passion and i'd love to see it disappear, however (fortunately and unfortunately) i have been working with several large companies lately all who use it and their IT departments have no roadmap to eliminate them... can't believe it's like this still in 2013!

anyway, thanks again! -steve (btw, i'm using 1.10.2 the latest jquery branch before 2.x.x because as i'm sure you know 2 no longer supports IE 6/7/8 and it seems shaky with 9 ;)