Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant -1003 or -1005 network error #2806

Closed
kmhari opened this issue Jun 23, 2015 · 6 comments
Closed

Constant -1003 or -1005 network error #2806

kmhari opened this issue Jun 23, 2015 · 6 comments

Comments

@kmhari
Copy link

@kmhari kmhari commented Jun 23, 2015

All of a sudden all request returns -1003 or -1005 immediately within a split second. Its mostly happening for GET request, as that is being used more. But this happens out of the blue. Retrying it doesn't make any difference, after a 2-5 minute gap if you try again it works.

I'm using 2.5.0, here is the code below how is use, its pretty same as the example code.

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
[self setAcceptHeadersforManager:manager];
__block NSString *ep = endPoint;
[manager GET:url parameters:parameters  options:options success:^(AFHTTPRequestOperation *operation, id responseObject) {
        successBlock(responseObject);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            failureBlock(error);
}];

I've in one of the issues (forgot which one) someone said that calling it twice will solve it, i tried the same, not just twice, but like a 100 times, still fails. Not sure if the root cause if from AFNetworking or underlying Apple libraries. Any help will be appreciated.

@kcharwood

This comment has been minimized.

Copy link
Contributor

@kcharwood kcharwood commented Jun 26, 2015

All of our tests are currently passing, so I would assume there is something going on with your network and/or server.

If you can create a sample project/test that reproduces the problem, I'd be happy to look into it further.

Also, it might be time to look into to migrating to AFHTTPSessionManager. NSURLConnection is deprecated in iOS 9, and a future version of AF will be removing support for the NSURLConnection based API's.

@kcharwood kcharwood closed this Jun 26, 2015
@Senjor

This comment has been minimized.

Copy link

@Senjor Senjor commented Sep 17, 2015

well done

4 similar comments
@yoimhere

This comment has been minimized.

Copy link

@yoimhere yoimhere commented Oct 5, 2015

well done

@kims154

This comment has been minimized.

Copy link

@kims154 kims154 commented Oct 8, 2015

well done

@sea7reen

This comment has been minimized.

Copy link

@sea7reen sea7reen commented Oct 10, 2015

well done

@Dephaye

This comment has been minimized.

Copy link

@Dephaye Dephaye commented Jul 18, 2016

well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.