Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$http.post crashes when request times out! #4585

Closed
gchurchley opened this issue Oct 22, 2013 · 9 comments
Closed

$http.post crashes when request times out! #4585

gchurchley opened this issue Oct 22, 2013 · 9 comments

Comments

@gchurchley
Copy link

If a timeout is used on a $http.post request, and the timeout expires, IE9 throws an exception. This means that code cannot be written to handle timeout conditions

EDIT: I have created a single html page that runs on IE10, Chrome, and Firefox, and clearly shows the error on IE9:
http://www.apxproto.com/api/ngPost.htm

You don't need to read any further.


Here's a plunker: http://plnkr.co/12rp7WqmDpPJC5ASazkJ
Here's a jsFiddle: http://jsfiddle.net/bonneville/J3Txh/

Note that for some reason, the plunker and jsfiddle will not run on IE9 - even for the $http.post requests that don't time out! You will have to put the code into a web page to see the problem.

@eddiemonge
Copy link
Contributor

One problem you have is that you are trying to log headers() when headers is undefined

@gchurchley
Copy link
Author

eddiemonge: I have updated the plunker and jsFiddle so that the error callback doesn't log headers. Note that the headers is being passed in to the callbacks as a parameter. More importantly, the angular code crashes on IE9 BEFORE the callbacks are called in the case of a timeout.

@IgorMinar
Copy link
Contributor

this is not IE9 specific issue, so I updated the original issue title

@tbosch tbosch modified the milestones: 1.2.12, 1.2.11, 1.2.13 Feb 3, 2014
@btford btford modified the milestones: 1.2.14, 1.2.13 Feb 15, 2014
@IgorMinar IgorMinar modified the milestones: 1.3.0-beta.1, 1.2.14 Mar 1, 2014
@cironunes
Copy link
Member

I guess it's already fixed by 6f1050d

@btford btford modified the milestones: 1.3.0-beta.2, 1.3.0-beta.1 Mar 10, 2014
@IgorMinar IgorMinar self-assigned this Mar 10, 2014
@linclark
Copy link
Contributor

@gchurchley I don't have access to IE9, but it sounds like it might not be IE9 specific anyway... can you confirm whether this is still an issue for you?

@gchurchley
Copy link
Author

Are you saying that the issue has now been fixed? In which release version was it fixed?If you can provide that information, I will be able to test it.
Thanks!

Date: Thu, 13 Mar 2014 22:19:17 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [angular.js] $http.post crashes when request times out! (#4585)

@gchurchley I don't have access to IE9, but it sounds like it might not be IE9 specific anyway... can you confirm whether this is still an issue for you?


Reply to this email directly or view it on GitHub.

@linclark
Copy link
Contributor

cironunes suggested that it was fixed in the post directly above mine and referenced the commit. It looks like that commit has been in since 1.2.2.

@tbosch tbosch modified the milestones: 1.3.0-beta.3, 1.3.0-beta.2 Mar 14, 2014
@gchurchley
Copy link
Author

I have now tested timeouts on version 1.2.14 and I can confirm that it works as expected on IE9 as well as on the latest versions of Chrome and Firefox.Thanks very much! Not having the ability to set and report timeouts was causing us much strife, and I'm surprised more people weren't making a fuss about this issue. Cheers!
Date: Thu, 13 Mar 2014 23:03:14 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [angular.js] $http.post crashes when request times out! (#4585)

cironunes suggested that it was fixed in the post directly above mine and referenced the commit. It looks like that commit has been in since 1.2.2.


Reply to this email directly or view it on GitHub.

@linclark
Copy link
Contributor

Thanks for verifying!

Closing because OP confirmed that the issue is now fixed. If you run into a similar issue with 1.2.2 or higher, please open a new issue and reference this one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants