Skip to content

Issue where all requests timeout until the app is restarted #320

Kabal opened this Issue Apr 26, 2012 · 5 comments

3 participants

Kabal commented Apr 26, 2012

Has anyone else experienced an issue where all ASIHTTPRequests will start to time out constantly, until the app is restarted?

I'm not really doing anything fancy, really just:

__block ASIHTTPRequest request = [[[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:@""]] autorelease];
[request setRequestMethod:@"POST"];
[request addRequestHeader:@"User-Agent" value:[NSString stringWithFormat:@"NOW-iOS %@", [self appVersion]]];
[request addRequestHeader:@"Content-Type" value:@"application/json; charset=utf-8"];
[request addRequestHeader:@"Accept" value:@"application/json, text/javascript, */
[request setShouldContinueWhenAppEntersBackground:YES];

[request setFailedBlock:^(void) {
[request setCompletionBlock:^(void) {
[request startAsynchronous];

If i constantly force close and restart the app, maybe 1 in15-20 times it will be stuck in a state where ALL requests time out. The only way to get out of that state seems to be to quit the app and try again.

I can mostly only reproduce this on 3G, but I may have had it happen in Wifi before.

ghost commented May 10, 2012

I've had this problem before. Are you using the TestFlight SDK by any chance?

Kabal commented May 11, 2012

Yes! I had already narrowed this down to the test flight SDK being the cause. Glad it's not just me...


ah hit by this too. :/ anyone find fix or workaround?

Kabal commented Jun 13, 2012

I tried replacing ASI with AFNetworking - it suffers the same fate.

I ended up just removing the TestFlight SDK. It wasn't doing that much for me anyway except for the crash reports which I have since replaced with Crashlytics.

jdmunro commented Aug 3, 2012

I was suffering with this issue - resorted to removing the TestFlight SDK too. They still haven't fixed it after several months now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.