Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does NSURLConnection fail to reach the backend?

I'm developing an app, with a custom communications layer. My helper classes rely on NSURLConnection to handle communications with the backend.

I'm experiencing a random bug, in which requests get sent, but the app gets no response back from our server. Plus, the timeout of NSURLConnection never gets triggered.

Furthermore, when the app gets into this state, Mixpanel (a tracker framework) logs a connectivity error, as well as TestFlight.

If you kill the app, and launch Safari, you're still able to reach google.com.

For the time being, our app doesn't support Multitasking. Yet, we have discovered that TestFlight is forcing the app 'not-to-get-terminated'.

Would it be possible that, due to this side effect of TF library, the app gets into an inconsistent state... in which any outgoing connection fails?.

Did anyone get a problem like this?

Thanks in advance!!

...

As a side note, i'd like to add that the backend has been checked already (hosted on amazon) and everything seems to be just OK.

=======

EDIT:

TestFlight fellows have just confirmed that this bug is caused by their library (i'm having it with TF 1.0 beta release).

like image 543
Jorge Leandro Perez Avatar asked Apr 14 '12 00:04

Jorge Leandro Perez


1 Answers

There is a confirmed bug with the TestFlight SDK (1.0 and older) that results in NSURLConnection never returning any of its asynchronous callbacks (success/timeout error).

like image 145
erik Avatar answered Nov 15 '22 23:11

erik