Ошибка 1001 на айфоне

I’m investigating some reported connectivity issues from users of our iOS app. The app is failing to load/refresh data for multiple minutes at a time, despite other apps, Safari, etc. working fine. We are investigating this at various layers in the pipeline (i.e. server-side, network), but I’m taking a look at what we know or can find out on the client.

I’m sure a lot of these kinds of issues get posted which end up being caused by transient network issues but I have a few specific questions about how I can find out more, and some questions around the behaviour of URLSession, so hopefully there are some people qualified to answer (BatEskimo-signal activated).

packet trace or gtfo 🙂

Unfortunately we’ve been unable to get a network/packet trace as this requires reproducing the issue locally which we haven’t been able to do.

Device logs show what look like typical timeout errors, occurring 60 seconds after initiating the requests:

Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» UserInfo={NSUnderlyingError=0x280764ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 «(null)» UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://REDACTED, NSErrorFailingURLKey=https://REDACTED, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.})

The app is trying to send multiple requests over the minutes things are not working, and they are all failing with the same timeout error after 60 seconds. We’ve had users give up after 5 minutes because nothing is working. This is despite them having a good cellular or wifi connection and with other apps and Safari working. The users who have reported this so far are on iOS 12.

We are using a single URLSession for all our requests, created when the app starts. It’s pretty vanilla: the config is a

URLSessionConfiguration.default

but with a custom User-Agent to override the default one, added via

httpAdditionalHeaders

. All our requests hit the same https hostname, and they are all POSTs.

Now the interesting part is that we have a separate health check request we send occasionally which sends a POST to exactly the same end point as normal requests, and we are seeing this succeed during the periods when regular requests are timing out. One difference with the ping check is that we use a different URLSession instance on the client. This URLSession is also created on startup, and uses the same configuration. The only difference is a delegate that we use to do some cert pinning and report any certificate mismatch from what we expect.

We do have DNS load balancing on our end point, so different connections can end up hitting a different IP.

So there are a few initial thoughts and questions I have:

  • The failing requests could be going to a different IP than the successful health check ones, and a specific server could be bad in some way. Is there a way to log the resolved IP address that a particular URLSession task used, at the point of receiving the error? Googling and looking in the docs doesn’t show an obvious way to get this information. I imagine since URLSession can maintain a pool of connections to the same host, and there can be redirects during a request, that this is difficult to expose «nicely» via the API. We can obviously do this with local profiling but we would like to add telemetry to gather this data in the wild if possible.
  • Is it possible the «bad» URLSession is reusing a stale/dead persistent (keep-alive) connection, and everything on that socket is just timing out? What is the behaviour of connection reuse in these situations and under what circumstances will URLSession open a new connection? How long will it reuse a connection for? Will it continue reusing a connection even when requests are failing with timeout errors, even for multiple minutes?
  • Is there a way to log exactly where in the lifetime of the request the URLSession task got to before it timed out? i.e. did it even resolve DNS? Did it connect at all? Did it finish the TLS handshake? Did it send headers? Did it receive anything at all? There is the NSURLSessionTaskMetrics API but it doesn’t look like there’s an easy way to correlate an event from
    urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)

    to a particular data task / request, so we’d have to log everything (maybe checking if response is null to detect an incomplete load) and correlate later.

  • Some docs (e.g. «Technical Q&A QA1941» which I won’t link because this post will be put in a moderator queue) talk about some retry behaviour in URLSession for idempotent (e.g. GET) vs. non-idempotent (e.g. POST) requests, at least for «The network connection was lost» errors. Is there a similar or related behaviour for timeouts, or when a connection looks dead? If this is some transient network issue, would GET requests behave better in such situations when stuff is timing out? There are reasons we are using POST but it would be interesting to know more about how differently idempotent requests are treated

Thanks in advance

Replies

In situations like this, where users are reporting issues from the field but you can’t reproduce them, the weapon of choice is a sysdiagnose log. This includes a bunch of information from both CFNetwork and the underlying libnetcore (this is the internal name for the core implementation of the now-public Network framework).

You can learn more about sysdiagnose logs on our Bug Reporting > Profiles and Logs page.

Device logs show what look like typical timeout errors, occurring 60 seconds after initiating the requests:

FYI, error -2102 is an internal error

kCFStreamErrorRequestTimeout

, which isn’t any more informative.

Is there a way to log the resolved IP address that a particular URLSession task used, at the point of receiving the error?

No. IMO this would make a great addition to

NSURLSessionTaskTransactionMetrics

and if you agree I encourage you to file an
enhancement request explaining your rationale.

Please post your bug number, just for the record.

I think you’ll be able to get this information out of a sysdiagnose log, but I’d have to look at the log in depth to be sure.

Is it possible the «bad»

URLSession

is reusing a stale/dead persistent (keep-alive) connection, and everything on that socket is just timing out? What is the behaviour of connection reuse in these situations and under what circumstances will

URLSession

open a new connection?

Is this HTTP/1.1 or HTTP 2?

For HTTP 1.1 a timeout error on a specific request will close the connection used by that request because the nature of HTTP 1.1 means that it’s impossible to continue using that connection.

Is there a way to log exactly where in the lifetime of the request the

URLSession

task got to before it timed out?

I would’ve thought the task and transaction metrics would help here.

There is the

NSURLSessionTaskMetrics

API but it doesn’t look like there’s an easy way to correlate an event from

urlSession(_:task:didFinishCollecting:)

to a particular data task / request, so we’d have to log everything (maybe checking if response is null to detect an incomplete load) and correlate later.

I don’t understand this problem. That delegate callback gets the task via the

task

parameter. What more do you need for correlation purposes?

Is there a similar or related behaviour for timeouts, or when a connection looks dead?

I’m not sure. I will say that whatever retry logic available won’t kick in for POST requests. However, I don’t think that switching to GET makes sense. Something is blocking your entire session, so that completely new requests are also failing. In that situation it’s unlikely that an automatic retry would fair any better than the other requests you issue to your session.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

No. IMO this would make a great addition to

NSURLSessionTaskTransactionMetrics

and if you agree I encourage you to file an
enhancement request explaining your rationale.

Will do

Is this HTTP/1.1 or HTTP 2?

HTTP 2

I don’t understand this problem. That delegate callback gets the task via the

task

parameter. What more do you need for correlation purposes?

Sorry, disregard my previous comments, it looks like it has everything we need.

HTTP 2

OK, that opens up a bunch of possibilities, in that the HTTP 2 connection might be open but there’s something broken with its internal state machine (either on the client or the server). A CFNetwork diagnostic log is definitely the right next step here.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks.

45304558 for enhancements to NSURLSessionTaskMetrics / NSURLSessionTaskTransactionMetrics

A couple more followup questions:

To get CFNetwork diagnostics information from devices in the wild, am I correct in thinking we need to first setenv(«CFNETWORK_DIAGNOSTICS», «3», 1); in main() as per https://developer.apple.com/library/archive/qa/qa1887/_index.html (and probably put this behind some kind of remote flag or Settings.app setting to avoid doing it for all our users), then have the appropriate users install the profile etc. from https://developer.apple.com/bug-reporting/profiles-and-logs/?name=sysdiagnose&platform=ios and capture a sysdiagnose and send it to us?

Without setting the env var will there be anything useful in a sysdiagnose, or is the CFNETWORK_DIAGNOSTICS where all/most of the interesting stuff comes from?

Also, is there a way to capture the CFNetwork diagnostic os_log output from within our app/process, so we could include it directly into our application logs which we can upload automatically? Or can it only be accessed via Analytics->… / Console.app?

Also, is there a way to capture the CFNetwork diagnostic os_log output from within our app/process …

No. There are numerous difficulties in making that work [1] but I realise that it’d be a super-useful feature so don’t let that stop you from filing an enhancement request describing your requirements

Please post your bug number, just for the record.

To get CFNetwork diagnostics information from devices in the wild, am I correct in thinking we need to first

setenv("CFNETWORK_DIAGNOSTICS", "3", 1);

in

main()

Correct.

and probably put this behind some kind of remote flag or Settings.app setting to avoid doing it for all our users

If you put this in a production build, make sure that the UI informs the user of the privacy risks involved in enabling it.

then have the appropriate users install the profile

That step is not necessary.

capture a sysdiagnose and send it to us?

Yes.

Without setting the env var will there be anything useful in a sysdiagnose … ?

Yes, although it’s hard to say whether that will help you debug this question. This environment variable enables CFNetwork diagnostics, which lets you see what’s going on internal to CFNetwork. If you don’t set it then you still get a bunch of logging. On the networking front that includes extensive DNS logging from

mDNSResponder

and a bunch of lower-level network logging from

libnetcore

(the private library used by CFNetwork for its on-the-wire activities; this is the same library that backs the new Network framework). That might help you understand this problem, or it might not. It kinda depends on what the actual problem is, and we don’t know that yet.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] One major problem is that we can’t give you all log messages on the system because of privacy concerns, but a lot of the value in OSLog is that it lets you track activity as it crosses processes. For an example close to your heart, much of the internals of CFNetwork are implemented in separate daemons (DNS is done via

mDNSResponder

, authentication UI via

CFNetworkAgent

, cookies and caches via

nsurlstoraged

, background sessions via

nsurlsessiond

, and so on).

I have similar strange periodic timeouts in my app as Userbla

But what is different:

— I use NSURLSession’s shared instance which means no custom delegate code is involved.

— HTTP/1.1

— Timeout happens for a specific domain/ip address

— App restart fixes the issue

— I am able to reproduce the issue locally. Although it is hard and may take up to 1-2 hours sometimes

— Captured packet trace and network logs and opened a bug 48359240

— Requests are sent OK using the same code but if I create a new instance of NSURLSession

— The issue happens when the app was in the background for more than 10-15 minutes(?)
— Can’t reproduce the issue in a separate sample project, so not sure what exactly causes the issue

Hi sergeyne,

We’ve faced with a similar issue, had your bug is closed with some resolution?

Use case:

  • Make a switch between wifi and 3G/4G;
  • Moving to the background and foreground;

At some point, the user sees time out error for all requests. Only restart of the app helps.

eskimo,

Using «setenv(«CFNETWORK_DIAGNOSTICS», «3», 1);»

I’ve gathered the following.

default 19:54:56.119246 +0300 **** CFNetwork Diagnostics [3:37959] 18:54:56.116 {
 Protocol Enqueue: request GET https://***** HTTP/1.1
          Request:  {url = https://****, cs = 0x0}
          Message: GET https://**** HTTP/1.1
           Accept: application/json
     Content-Type: application/json
      X-Client-Id: 2.3.41 (18460)||Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
  header: ***
  Accept-Language: en-us
header: ***
  Accept-Encoding: br, gzip, deflate
     header: ***
} [3:37959]
default 19:54:56.274545 +0300 bluetoothd Matched UUID *** for device ""
default 19:54:56.392140 +0300 *** TIC TCP Conn Cancel [518:0x282f57780]
default 19:54:56.392264 +0300 *** [C518 ***:443 tcp, url hash: e37a5a66, tls] cancel
default 19:54:56.392425 +0300 *** [C518 ***:443 tcp, url hash: e37a5a66, tls] cancelled

And then.

default 19:55:06.535110 +0300 *** CFNetwork Diagnostics [3:37960] 18:55:06.533 {
        Did Timeout: (null)
             Loader:  {url = https://***, cs = 0x0}
   Timeout Interval: 60.000 seconds
init to origin load: 0.000351071s
         total time: 60.1877s
        total bytes: 0
} [3:37960]

Do you have any clues about what we should look for do understand the reason for such behavior?
Thanks in advance.

Ok, I lost a lot of time investigeting similar issue.

In my case the problem was strange (bad?) firewall on the server. It was banning device when there was many (not so many) requests in short period of time.

I believe you can do easy test if you are facing similar issue.

1. Send a lot of (depends of firewall settings) requests in loop (let’s say 50 in 1 second).

2. Close/Kill app (this will close connections to server)

3. (OPTIONAL) Wait a while (lets say 60 seconds)

4. Start app again and try send request

If you now got timeout for all next requests, you probably have same issue and you should talk with sever guys.

PS: if you don’t have access to server you can give user info that he should restart wifi on device to quit that timeout loop. It could be last resort in some cases.

I see this issue in 14.4 devices.

Hello,

Did you manage to solve this issue?

I am getting the following error only from Apple Review, never while testing on real devices myself (iOS 14.6)

Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» UserInfo={_kCFStreamErrorCodeKey=60, NSUnderlyingError=0x282a3b600 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 «(null)» UserInfo={_kCFStreamErrorCodeKey=60, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask

When tried to access a URL link in iPhone 13( iOS 15.0 ) browser, getting “Error loading page, Domain NSURLErrorDomain, Error Code 1001, Description: The request timed out”. We are loading the same URL in webview in our iOS app. It is not working in the app also. Giving the same error

Using high speed Wifi and Cellular data. No connectivity issues. Verified speed of connectivity in this phone. Not getting this issue in any other iPhones/ iPads & Android mobiles. There the URL is loading fine within seconds

Same URL is accessible in Laptop and desktop computers in same network connectivity

Will there be any settings to edit or device specific issues that cause this?

Posting in case this helps anyone else. We were getting a lot of these timeouts after loading a bunch of image URLs. Our app would load ~100 images and then all future image requests would time out.

After lots of digging the fix was server side: we disabled the HTTP/3 (with QUIC) setting on our Cloudflare instance.

My issue causing -1001 timeout error was URLSessionConfiguration custom configuration. Once I set a default URL session configuration -1001 timeout errors disappeared.

**Notice, it did not cause the issue on a real device, only on iOS simulator. **

I’m investigating some reported connectivity issues from users of our iOS app. The app is failing to load/refresh data for multiple minutes at a time, despite other apps, Safari, etc. working fine. We are investigating this at various layers in the pipeline (i.e. server-side, network), but I’m taking a look at what we know or can find out on the client.

I’m sure a lot of these kinds of issues get posted which end up being caused by transient network issues but I have a few specific questions about how I can find out more, and some questions around the behaviour of URLSession, so hopefully there are some people qualified to answer (BatEskimo-signal activated).

packet trace or gtfo 🙂

Unfortunately we’ve been unable to get a network/packet trace as this requires reproducing the issue locally which we haven’t been able to do.

Device logs show what look like typical timeout errors, occurring 60 seconds after initiating the requests:

Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» UserInfo={NSUnderlyingError=0x280764ae0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 «(null)» UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://REDACTED, NSErrorFailingURLKey=https://REDACTED, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.})

The app is trying to send multiple requests over the minutes things are not working, and they are all failing with the same timeout error after 60 seconds. We’ve had users give up after 5 minutes because nothing is working. This is despite them having a good cellular or wifi connection and with other apps and Safari working. The users who have reported this so far are on iOS 12.

We are using a single URLSession for all our requests, created when the app starts. It’s pretty vanilla: the config is a

URLSessionConfiguration.default

but with a custom User-Agent to override the default one, added via

httpAdditionalHeaders

. All our requests hit the same https hostname, and they are all POSTs.

Now the interesting part is that we have a separate health check request we send occasionally which sends a POST to exactly the same end point as normal requests, and we are seeing this succeed during the periods when regular requests are timing out. One difference with the ping check is that we use a different URLSession instance on the client. This URLSession is also created on startup, and uses the same configuration. The only difference is a delegate that we use to do some cert pinning and report any certificate mismatch from what we expect.

We do have DNS load balancing on our end point, so different connections can end up hitting a different IP.

So there are a few initial thoughts and questions I have:

  • The failing requests could be going to a different IP than the successful health check ones, and a specific server could be bad in some way. Is there a way to log the resolved IP address that a particular URLSession task used, at the point of receiving the error? Googling and looking in the docs doesn’t show an obvious way to get this information. I imagine since URLSession can maintain a pool of connections to the same host, and there can be redirects during a request, that this is difficult to expose «nicely» via the API. We can obviously do this with local profiling but we would like to add telemetry to gather this data in the wild if possible.
  • Is it possible the «bad» URLSession is reusing a stale/dead persistent (keep-alive) connection, and everything on that socket is just timing out? What is the behaviour of connection reuse in these situations and under what circumstances will URLSession open a new connection? How long will it reuse a connection for? Will it continue reusing a connection even when requests are failing with timeout errors, even for multiple minutes?
  • Is there a way to log exactly where in the lifetime of the request the URLSession task got to before it timed out? i.e. did it even resolve DNS? Did it connect at all? Did it finish the TLS handshake? Did it send headers? Did it receive anything at all? There is the NSURLSessionTaskMetrics API but it doesn’t look like there’s an easy way to correlate an event from
    urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)

    to a particular data task / request, so we’d have to log everything (maybe checking if response is null to detect an incomplete load) and correlate later.

  • Some docs (e.g. «Technical Q&A QA1941» which I won’t link because this post will be put in a moderator queue) talk about some retry behaviour in URLSession for idempotent (e.g. GET) vs. non-idempotent (e.g. POST) requests, at least for «The network connection was lost» errors. Is there a similar or related behaviour for timeouts, or when a connection looks dead? If this is some transient network issue, would GET requests behave better in such situations when stuff is timing out? There are reasons we are using POST but it would be interesting to know more about how differently idempotent requests are treated

Thanks in advance

Replies

In situations like this, where users are reporting issues from the field but you can’t reproduce them, the weapon of choice is a sysdiagnose log. This includes a bunch of information from both CFNetwork and the underlying libnetcore (this is the internal name for the core implementation of the now-public Network framework).

You can learn more about sysdiagnose logs on our Bug Reporting > Profiles and Logs page.

Device logs show what look like typical timeout errors, occurring 60 seconds after initiating the requests:

FYI, error -2102 is an internal error

kCFStreamErrorRequestTimeout

, which isn’t any more informative.

Is there a way to log the resolved IP address that a particular URLSession task used, at the point of receiving the error?

No. IMO this would make a great addition to

NSURLSessionTaskTransactionMetrics

and if you agree I encourage you to file an
enhancement request explaining your rationale.

Please post your bug number, just for the record.

I think you’ll be able to get this information out of a sysdiagnose log, but I’d have to look at the log in depth to be sure.

Is it possible the «bad»

URLSession

is reusing a stale/dead persistent (keep-alive) connection, and everything on that socket is just timing out? What is the behaviour of connection reuse in these situations and under what circumstances will

URLSession

open a new connection?

Is this HTTP/1.1 or HTTP 2?

For HTTP 1.1 a timeout error on a specific request will close the connection used by that request because the nature of HTTP 1.1 means that it’s impossible to continue using that connection.

Is there a way to log exactly where in the lifetime of the request the

URLSession

task got to before it timed out?

I would’ve thought the task and transaction metrics would help here.

There is the

NSURLSessionTaskMetrics

API but it doesn’t look like there’s an easy way to correlate an event from

urlSession(_:task:didFinishCollecting:)

to a particular data task / request, so we’d have to log everything (maybe checking if response is null to detect an incomplete load) and correlate later.

I don’t understand this problem. That delegate callback gets the task via the

task

parameter. What more do you need for correlation purposes?

Is there a similar or related behaviour for timeouts, or when a connection looks dead?

I’m not sure. I will say that whatever retry logic available won’t kick in for POST requests. However, I don’t think that switching to GET makes sense. Something is blocking your entire session, so that completely new requests are also failing. In that situation it’s unlikely that an automatic retry would fair any better than the other requests you issue to your session.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

No. IMO this would make a great addition to

NSURLSessionTaskTransactionMetrics

and if you agree I encourage you to file an
enhancement request explaining your rationale.

Will do

Is this HTTP/1.1 or HTTP 2?

HTTP 2

I don’t understand this problem. That delegate callback gets the task via the

task

parameter. What more do you need for correlation purposes?

Sorry, disregard my previous comments, it looks like it has everything we need.

HTTP 2

OK, that opens up a bunch of possibilities, in that the HTTP 2 connection might be open but there’s something broken with its internal state machine (either on the client or the server). A CFNetwork diagnostic log is definitely the right next step here.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks.

45304558 for enhancements to NSURLSessionTaskMetrics / NSURLSessionTaskTransactionMetrics

A couple more followup questions:

To get CFNetwork diagnostics information from devices in the wild, am I correct in thinking we need to first setenv(«CFNETWORK_DIAGNOSTICS», «3», 1); in main() as per https://developer.apple.com/library/archive/qa/qa1887/_index.html (and probably put this behind some kind of remote flag or Settings.app setting to avoid doing it for all our users), then have the appropriate users install the profile etc. from https://developer.apple.com/bug-reporting/profiles-and-logs/?name=sysdiagnose&platform=ios and capture a sysdiagnose and send it to us?

Without setting the env var will there be anything useful in a sysdiagnose, or is the CFNETWORK_DIAGNOSTICS where all/most of the interesting stuff comes from?

Also, is there a way to capture the CFNetwork diagnostic os_log output from within our app/process, so we could include it directly into our application logs which we can upload automatically? Or can it only be accessed via Analytics->… / Console.app?

Also, is there a way to capture the CFNetwork diagnostic os_log output from within our app/process …

No. There are numerous difficulties in making that work [1] but I realise that it’d be a super-useful feature so don’t let that stop you from filing an enhancement request describing your requirements

Please post your bug number, just for the record.

To get CFNetwork diagnostics information from devices in the wild, am I correct in thinking we need to first

setenv("CFNETWORK_DIAGNOSTICS", "3", 1);

in

main()

Correct.

and probably put this behind some kind of remote flag or Settings.app setting to avoid doing it for all our users

If you put this in a production build, make sure that the UI informs the user of the privacy risks involved in enabling it.

then have the appropriate users install the profile

That step is not necessary.

capture a sysdiagnose and send it to us?

Yes.

Without setting the env var will there be anything useful in a sysdiagnose … ?

Yes, although it’s hard to say whether that will help you debug this question. This environment variable enables CFNetwork diagnostics, which lets you see what’s going on internal to CFNetwork. If you don’t set it then you still get a bunch of logging. On the networking front that includes extensive DNS logging from

mDNSResponder

and a bunch of lower-level network logging from

libnetcore

(the private library used by CFNetwork for its on-the-wire activities; this is the same library that backs the new Network framework). That might help you understand this problem, or it might not. It kinda depends on what the actual problem is, and we don’t know that yet.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] One major problem is that we can’t give you all log messages on the system because of privacy concerns, but a lot of the value in OSLog is that it lets you track activity as it crosses processes. For an example close to your heart, much of the internals of CFNetwork are implemented in separate daemons (DNS is done via

mDNSResponder

, authentication UI via

CFNetworkAgent

, cookies and caches via

nsurlstoraged

, background sessions via

nsurlsessiond

, and so on).

I have similar strange periodic timeouts in my app as Userbla

But what is different:

— I use NSURLSession’s shared instance which means no custom delegate code is involved.

— HTTP/1.1

— Timeout happens for a specific domain/ip address

— App restart fixes the issue

— I am able to reproduce the issue locally. Although it is hard and may take up to 1-2 hours sometimes

— Captured packet trace and network logs and opened a bug 48359240

— Requests are sent OK using the same code but if I create a new instance of NSURLSession

— The issue happens when the app was in the background for more than 10-15 minutes(?)
— Can’t reproduce the issue in a separate sample project, so not sure what exactly causes the issue

Hi sergeyne,

We’ve faced with a similar issue, had your bug is closed with some resolution?

Use case:

  • Make a switch between wifi and 3G/4G;
  • Moving to the background and foreground;

At some point, the user sees time out error for all requests. Only restart of the app helps.

eskimo,

Using «setenv(«CFNETWORK_DIAGNOSTICS», «3», 1);»

I’ve gathered the following.

default 19:54:56.119246 +0300 **** CFNetwork Diagnostics [3:37959] 18:54:56.116 {
 Protocol Enqueue: request GET https://***** HTTP/1.1
          Request:  {url = https://****, cs = 0x0}
          Message: GET https://**** HTTP/1.1
           Accept: application/json
     Content-Type: application/json
      X-Client-Id: 2.3.41 (18460)||Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
  header: ***
  Accept-Language: en-us
header: ***
  Accept-Encoding: br, gzip, deflate
     header: ***
} [3:37959]
default 19:54:56.274545 +0300 bluetoothd Matched UUID *** for device ""
default 19:54:56.392140 +0300 *** TIC TCP Conn Cancel [518:0x282f57780]
default 19:54:56.392264 +0300 *** [C518 ***:443 tcp, url hash: e37a5a66, tls] cancel
default 19:54:56.392425 +0300 *** [C518 ***:443 tcp, url hash: e37a5a66, tls] cancelled

And then.

default 19:55:06.535110 +0300 *** CFNetwork Diagnostics [3:37960] 18:55:06.533 {
        Did Timeout: (null)
             Loader:  {url = https://***, cs = 0x0}
   Timeout Interval: 60.000 seconds
init to origin load: 0.000351071s
         total time: 60.1877s
        total bytes: 0
} [3:37960]

Do you have any clues about what we should look for do understand the reason for such behavior?
Thanks in advance.

Ok, I lost a lot of time investigeting similar issue.

In my case the problem was strange (bad?) firewall on the server. It was banning device when there was many (not so many) requests in short period of time.

I believe you can do easy test if you are facing similar issue.

1. Send a lot of (depends of firewall settings) requests in loop (let’s say 50 in 1 second).

2. Close/Kill app (this will close connections to server)

3. (OPTIONAL) Wait a while (lets say 60 seconds)

4. Start app again and try send request

If you now got timeout for all next requests, you probably have same issue and you should talk with sever guys.

PS: if you don’t have access to server you can give user info that he should restart wifi on device to quit that timeout loop. It could be last resort in some cases.

I see this issue in 14.4 devices.

Hello,

Did you manage to solve this issue?

I am getting the following error only from Apple Review, never while testing on real devices myself (iOS 14.6)

Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» UserInfo={_kCFStreamErrorCodeKey=60, NSUnderlyingError=0x282a3b600 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 «(null)» UserInfo={_kCFStreamErrorCodeKey=60, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask

When tried to access a URL link in iPhone 13( iOS 15.0 ) browser, getting “Error loading page, Domain NSURLErrorDomain, Error Code 1001, Description: The request timed out”. We are loading the same URL in webview in our iOS app. It is not working in the app also. Giving the same error

Using high speed Wifi and Cellular data. No connectivity issues. Verified speed of connectivity in this phone. Not getting this issue in any other iPhones/ iPads & Android mobiles. There the URL is loading fine within seconds

Same URL is accessible in Laptop and desktop computers in same network connectivity

Will there be any settings to edit or device specific issues that cause this?

Posting in case this helps anyone else. We were getting a lot of these timeouts after loading a bunch of image URLs. Our app would load ~100 images and then all future image requests would time out.

After lots of digging the fix was server side: we disabled the HTTP/3 (with QUIC) setting on our Cloudflare instance.

My issue causing -1001 timeout error was URLSessionConfiguration custom configuration. Once I set a default URL session configuration -1001 timeout errors disappeared.

**Notice, it did not cause the issue on a real device, only on iOS simulator. **

Почти каждый пользователь iTunes сталкивался с тем, что программа отказывалась выполнять какое-либо действия и показывала всплывающее окно с номером возникшей ошибки…

Что означают эти ошибки iTunes и как решать возникшие проблемы – об этом ниже…

  • Ошибка iTunes 1
  • Ошибка iTunes 2
  • Ошибка iTunes 3
  • Ошибка iTunes 5
  • Ошибка iTunes 6
  • Ошибка iTunes 8
  • Ошибка iTunes 9
  • Ошибка iTunes 10
  • Ошибка iTunes 11
  • Ошибка iTunes 13
  • Ошибка iTunes 14
  • Ошибка iTunes 17
  • Ошибка iTunes 20
  • Ошибка iTunes 26
  • Ошибка iTunes 27 и 29
  • Ошибка iTunes 28
  • Ошибка iTunes 34
  • Ошибка iTunes 35
  • Ошибка iTunes 39
  • Ошибка iTunes 40, 306, 10054
  • Ошибка iTunes 54
  • Ошибка iTunes 414
  • Ошибка iTunes 1004
  • Ошибка iTunes 1008
  • Ошибка iTunes 1011, 1012
  • Ошибка iTunes 1013, 1014, 1015
  • Ошибка iTunes 1050
  • Ошибка iTunes 1394
  • Ошибка iTunes 14**
  • Ошибка iTunes 1600, 1611
  • Ошибка iTunes 1609
  • Ошибка iTunes 1619
  • Ошибка iTunes 1644
  • Ошибка iTunes 2001
  • Ошибка iTunes 2002
  • Ошибка iTunes 2003
  • Ошибка iTunes 2005
  • Ошибка iTunes 2502 и 2503
  • Ошибка iTunes 3000, 3004, 3999
  • Ошибка iTunes 3001, 5103, -42110
  • Ошибка iTunes 3002, 3194
  • Ошибка iTunes 3123
  • Ошибка iTunes 3195
  • Ошибка iTunes 5002
  • Ошибка iTunes 8008, -50, -5000, -42023
  • Ошибка iTunes 8248
  • Ошибка iTunes 9006
  • Ошибка iTunes 9807
  • Ошибка iTunes 11222
  • Ошибка iTunes 13014, 13136, 13213
  • Ошибка iTunes 13001
  • Ошибка iTunes 20000
  • Ошибка iTunes -39
  • Ошибка iTunes -50
  • Ошибка iTunes -3259
  • Ошибка iTunes -9800, -9812, -9815, -9814
  • Ошибка iTunes 0xE8000022
  • Ошибка iTunes 0xE8000001, 0xE8000050
  • Ошибка iTunes 0xE8008001
  • Ошибка iTunes 0xE8000013
  • Ошибка iTunes 0xE8000065
Ошибка iTunes 1

Причина ошибки 1: Версия iTunes слишком старая или прошивка не соответсвует устройству.

Решение ошибки 1: Обновите iTunes до последней версии, скачайте прошивку заново (убедитесь, что скачиваете версию ПО для нужного устройства).

Ошибка iTunes 2

Причина ошибки 2: Загруженная прошивка запакована неправильно.

Решение ошибки 2: Скорей всего, Вы пытаетесь установить custom прошивку (не оригинальной сборки). Просто скачайте оригинальную прошивку, либо используйте сторонний софт для установки custom прошивок.

Ошибка iTunes 3

Причина ошибки 3: Данную ошибку пользователь может наблюдать по завершению прошивки iPhone, iPad, что может свидетельствовать о неисправном модеме внутри девайса.

Решение ошибки 3: По сути, ошибка является аналогичной ошибке -1 и если последняя исправляться режимом восстановления, то решить ошибку №3 могут только в сервисном центре путем замены модема.

Ошибка iTunes 5

Причина ошибки 5: Прошивка устанавливается не в том режиме, для которого она предназначена. (DFU Mode/Recovery Mode).

Решение ошибки 5: Скачайте оригинальную прошивку, или попробуйте установить в разных режимах (DFU Mode/Recovery Mode).

Ошибка iTunes 6

Причина ошибки 6: Ошибка установки прошивки из-за поврежденного Boot/Recovery logo (возникает при установки custom прошивок).
Решение ошибки 6: Скачайте оригинальную прошивку, или попробуйте установить в разных режимах (DFU Mode/Recovery Mode).

Ошибка iTunes 8

Причина ошибки 8: iTunes не может установить прошивку, из-за того, что она неподходит к данному устройства (например устанавливаете прошивку от iPod Touch на iPhone).

Решение ошибки 8: Скачайте оригинальную прошивку для Вашей модели устройства.

Ошибка iTunes 9

Причина ошибки 9: Kernel Panic. Критическая ошибка ядра. Аналог синего экрана Windows. Может возникнуть при обрыве передачи данных по кабелю в момент установки. Или при использовании плохо собранной custom прошивки.

Решение ошибки 9: Проверьте USB порт и разъем на iPhone/iPad/iPod Touch. Пересоберите custom прошивку или используйте оригинальную.

Ошибка iTunes 10

Причина ошибки 10: В прошивке не обнаружено LLB (Low Level Bootloader), установка невозможна.

Решение ошибки 10: Пересоберите custom прошивку или используйте оригинальную.

Ошибка iTunes 11

Причина ошибки 11: В прошивке не обнаружены часть файлов.

Решение ошибки 11: Пересоберите custom прошивку или используйте оригинальную.

Ошибка iTunes 13

Причина ошибки 13: Кабель или USB порт поврежден. Либо beta версию iOS пытаетесь установить из под Windows.

Решение ошибки 13: Поменяйте USB и кабель. Так же может помочь отключение USB 2.0 в BIOS.

Ошибка iTunes 14

Причина ошибки 14: Нарушен файл прошивки. Либо проблема кабеля или USB-порта.

Решение ошибки 14: Отключите антивирус. Поменяйте USB и кабель. Попробуйте оригинальную прошивку.

Ошибка iTunes 17

Причина ошибки 17: Попытка обновить не оригинальную прошивку (custom).

Решение ошибки 17: В таком случае необходимо восстановить девайс из DFU или Recovery Mode.

Ошибка iTunes 20

Причина ошибки 20: Девайс находится в Recoveru Mode.

Решение ошибки 20: В этом случае необходимо войти в DFU Mode.

Ошибка iTunes 26

Причина ошибки 26: Ошибки при сборки прошивки.

Решение ошибки 26: Загрузить другую прошивку.

Ошибка iTunes 27 и 29

Причина ошибки 27 и 29: Ошибка iTunes, которая встречается в старых версиях программы.

Решение ошибки 27 и 29: Обновить iTunes до последней версии.

Ошибка iTunes 28

Причина ошибки 28: Неисправность 30-pin/Lightning-кабеля или разъема в устройстве.

Решение ошибки 28: Ремонт в сервисном центре или заменя 30-pin/Lightning-кабеля.

Ошибка iTunes 34

Причина ошибки 34: Недостаточно места для установки ПО (на жестком диске).

Решение ошибки 34: Освободите немного места для установки ПО (на диске, где установлен iTunes).

Ошибка iTunes 35

Причина ошибки 35: Некорректные права доступа к папке (проблема встречается на Mac OS).

Решение ошибки 35: В terminal.app вводим:
sudo chmod -R 700 /Users/[username]/Music/iTunes/iTunes Media
, где [username] — имя пользователя.

Ошибка iTunes 39

Причина ошибки 39: Ошибка возникает при синхронизации фотографий.

Решение ошибки 39: Несколько ваших фотографий вызывают эту ошибку, нужно найти их методом исключения из синхронизации.

Ошибка iTunes 40, 306, 10054

Причина ошибки 40, 306, 10054: Проблемы с соединением с сервером.

Решение ошибки 40, 306, 10054: Необходимо отключить антивирусное ПО, прокси, почистить кэш браузера.

Ошибка iTunes 54

Причина ошибки 54: Возникает при переносе покупок с устройства в iTunes.

Решение ошибки 54: Можно попробовать ряд действий:

  • iTunes > магазин > Авторизировать этот компьютер
  • Удалить C:Documents and SettingsAll UsersApplication DataApple ComputeriTunesSC Info
  • Исключить из синхронизации музыку путем удаления папки (потом можно вернуть папку на место)
Ошибка iTunes 414

Причина ошибки 414: Контент предназначен для лиц старше 17 лет.

Решение ошибки 414: Согласиться с такими правилами или изменить дату рождения в настройках аккаунта.

Ошибка iTunes 1004

Причина ошибки 1004: Временные проблемы сервера Apple.

Решение ошибки 1004: Прошиться позже.

Ошибка iTunes 1008

Причина ошибки 1008: Apple ID имеет недопустимые символы.

Решение ошибки 1008: Чтобы такая ошибка не возникала, необходимо использовать в Apple ID только латинские буквы и цифры.

Ошибка iTunes 1011, 1012

Причина ошибки 1011, 1012: Проблема модема iPhone/iPad.

Решение ошибки 1011, 1012: Аппаратная проблема, требует ремонта.

Ошибка iTunes 1013, 1014, 1015

Причина ошибки 1013, 1014, 1015: При проверки прошивки, после обновления, возникла ошибка несоответствия.

Решение ошибки 1013, 1014, 1015: Нужно скачать утилиту TinyUmbrella. В ней использовать функцию Kick Device Out of Recovery.

Ошибка iTunes 1050

Причина ошибки 1050: Серверы активации Apple временно недоступны.

Решение ошибки 1050: Активировать устройство через некоторое время.

Ошибка iTunes 1394

Причина ошибки 1394: Файлы операционной системы устройства повреждены.

Решение ошибки 1394: Восстановить устройство или попробовать сделать jailbreak повторно, если ошибка появилась после него.

Ошибка iTunes 14**

Причина ошибки 14**: Ошибка передачи данных по кабелю.

Решение ошибки 14**: Либо нарушен файл прошивки (нужно скачать другую), либо сломался usb кабель.

Ошибка iTunes 1600, 1611

Причина ошибки 1600, 1611: Ошибка встречается при установки custom прошивок через DFU mode.

Решение ошибки 1600, 1611: Попробуйте установить через Recovery Mode.

Ошибка iTunes 1609

Причина ошибки 1609: iTunes слишком старый для Вашего устройства.

Решение ошибки 1609: Обновите iTunes до последней версии.

Ошибка iTunes 1619

Причина ошибки 1619: iTunes слишком старый для Вашего устройства.

Решение ошибки 1619: Обновите iTunes до последней версии.

Ошибка iTunes 1644

Причина ошибки 1644: К файлу прошивки обращаются сторонние программы.

Решение ошибки 1644: Перезагрузите компьютер, выключите антивирусы, если Вы не сами работаете с файлом прошивки.

Ошибка iTunes 2001

Причина ошибки 2001: Ошибка встречается на Mac OS. Проблема с драйверами.

Решение ошибки 2001: Обновить Mac OS.

Ошибка iTunes 2002

Причина ошибки 2002: Сторонние процессы работают с iTunes, тем самым блокирует доступ.

Решение ошибки 2002: Если это не антивирус, то перезагрузите компьютер.

Ошибка iTunes 2003

Причина ошибки 2003: Проблемы с USB портом.

Решение ошибки 2003: Используйте другой USB порт.

Ошибка iTunes 2005

Причина ошибки 2005: Проблемы с data-кабелем.

Решение ошибки 2005: Используйте другой data-кабель.

Ошибка iTunes 2502 и 2503.

Причина ошибки 2502 и 2503: Ошибки установщика из за ограниченного доступа к временным файлам. Встречается на Windows 8.

Решение ошибки 2502 и 2503: Проблема решается добавлением полного доступа пользователю к папке C:WindowsTemp. Делается это следующим образом:

  • нажимаем правой кнопкой мыши по папке C:WindowsTemp;
  • идем по пути «Свойства – Безопасность – Изменить» и выбираем своего пользователя;
  • ставим галочку напротив «Полный доступ», после необходимо сохранить изменения.
Ошибка iTunes 3000, 3004, 3999

Причина ошибки 3000, 3004, 3999: Ошибка доступа к серверу Apple.

Решение ошибки 3000, 3004, 3999: Доступ блокирован какой-либо программой. Например антивирусной. Отключите их, перезагрузитесь.

Ошибка iTunes 3001, 5103, -42110

Причина ошибки 3001, 5103, -42110: iTunes не может загрузить видео из-за ошибок хеширования.

Решение ошибки 3001, 5103, -42110: Обновите iTunes
Удалите папку SC Info:

  • Win7 – C:Documents and SettingsAll UsersApplication DataApple ComputeriTunes
  • Vista – C:Program DataApple ComputeriTunes
  • Mac OS – /users/Shared/SC Info
Ошибка iTunes 3002, 3194

Причина ошибки 3002, 3194: Нет сохраненных хешей на сервере. (Apple или Саурика).

Решение ошибки 3002, 3194: Обновитесь на стабильную версию прошивки. Удалить строку: 74.208.105.171 gs.apple.com из файла hosts в:

  • Win – C:WindowsSystem32driversetchosts
  • Mac OS – /etc/hosts

Выключите антивирусы, пробуйте восстанавливать через shift. Также ошибка может возникнуть при попытке отката на предыдущую версию iOS. В последнее время даунгрейд невозможен, спокойно обновляйтесь на последнюю версию iOS.
Сложная ошибка, разъяснения по которой были выделены в отдельную статью – Как исправить ошибку 3194.

Ошибка iTunes 3123

Причина ошибки 3123: Проблемы с авторизацией компьютера в iTunes.

Решение ошибки 3123: ДеавторизуйтеАвторизуйте компьютер.

Ошибка iTunes 3195

Причина ошибки 3195: Ошибка при получении SHSH.

Решение ошибки 3195: Повторите попытку обновления прошивки.

Ошибка iTunes 5002

Причина ошибки 5002: Отказ платежа.

Решение ошибки 5002: Ищите ошибки в заполненных данных банковской карты.

Ошибка iTunes 8008, -50, -5000, -42023

Причина ошибки 8008, -50, -5000, -42023: Истекло время сессии закачки прошивки.

Решение ошибки 8008, -50, -5000, -42023: Удалите папку Downloads в Вашей папки iTunes Media.

Ошибка iTunes 8248

Причина ошибки 8248: Проблема возникает если установлены плагины для iTunes, которые несовместимы с новыми версиями программы.

Решение ошибки 8248: Удалите плагины iTunes. Часто случается, что проблема в процессе Memonitor.exe, закройте его.

Ошибка iTunes 9006

Причина ошибки 9006: Что-то блокирует закачку прошивки.

Решение ошибки 9006: Скачайте прошивку из другого места, либо решите проблему с антивирусами.

Ошибка iTunes 9807

Причина ошибки 9807: Что-то блокирует проверку подписей и сертификатов.

Решение ошибки 9807: Решите проблему с антивирусами.

Ошибка iTunes 11222

Причина ошибки 11222: Блокирован доступ.

Решение ошибки 11222: Отключите брандмауэр и антивирус.

Ошибка iTunes 13014, 13136, 13213

Причина ошибки 13014, 13136, 13213: Что-то мешает работе iTunes.

Решение ошибки 13014, 13136, 13213: Обновите iTunes, перезагрузите компьютер, выключите антивирусное ПО. Проблема должна исчезнуть.

Ошибка iTunes 13001

Причина ошибки 13001: Файл медиатеки поврежден.

Решение ошибки 13001: Удалите файлы медиатеки iTunes.

Ошибка iTunes 20000

Причина ошибки 20000: Ошибка может возникнуть при использовании нестандартной темы Windows.

Решение ошибки 20000: Установите стандартную тему Windows.

Ошибка iTunes -39

Причина ошибки -39: iTunes не может загрузить музыку из iTunes Store.

Решение ошибки -39: Обновите iTunes. Сделайте релогин аккаунта. Выключите антивирусное ПО.

Ошибка iTunes -50

Причина ошибки -50: Возникли проблемы при соединении с сервером itunes.apple.com.

Решение ошибки -50: Обновите iTunes. Сделайте релогин аккаунта. Выключите антивирусное ПО.

Ошибка iTunes -3259

Причина ошибки -3259: Превышено время ожидания, отведенного на подключение.

Решение ошибки -3259: Обновите iTunes. Проверьте наличие соединения с интернетом. Удалите незавершенные загрузки, может помочь выход/вход в аккаунт iTunes. Если не помогло, пробуйте перезагрузить компьютер.

Ошибка iTunes -9800, -9812, -9815, -9814

Причина ошибки -9800, -9812, -9815, -9814: Не правильно выставлено время и дата в системе.

Решение ошибки -9800, -9812, -9815, -9814: Выставите, в настройках системы, правильные дату и время.

Ошибка iTunes 0xE8000022

Причина ошибки 0xE8000022: Повреждены файлы iOS.

Решение ошибки 0xE8000022: Восстановите прошивку.

Ошибка iTunes 0xE8000001, 0xE8000050

Причина ошибки 0xE8000001, 0xE8000050: Проблема возникает при установке приложений на джейлбрейкнутом устройстве.

Решение ошибки 0xE8000001, 0xE8000050: Переустановите твик AppSync из Cydia.

Ошибка iTunes 0xE8008001

Причина ошибки 0xE8008001: Проблема возникает при установке приложений на джейлбрейкнутом устройстве.

Решение ошибки 0xE8008001: Установите твик AppSync из Cydia.

Ошибка iTunes 0xE8000013

Причина ошибки 0xE8000013: Ошибка синхронизации.

Решение ошибки 0xE8000013: Синхронизируйте устройство повторно.

Ошибка iTunes 0xE8000065

Причина ошибки 0xE8000065: Ошибка в операционной системе.

Решение ошибки 0xE8000065: Перезагрузите компьютер, используйте другой USB-порт. Если не помогло, значит проблема в iTunes и потребуется восстановление прошивки.

Порядок вывода комментариев:

Амаяк

0

+
-

24.01.2013 в 18:19

при подключении iphona к компу кабелем и запуске itunes, всплывает окно «ошибка» с текстом «новая медиатека itunes»

Дмитрий

Ошибка -50

Не знаю, что это за глюк iTunes — надо писать в apple!!! Я поборол его так: Магазин-Деактевировать этот компьютер-Проверить наличие доступных загрузок(грузит только по одному приложению)-После каждого загруженного приложения опять делаем-Деактевировать этот компьютер-скачиваем следующее!!! Подключаем телефон после всего и — Синхронизация, при запросе актевизировать этот компьютер-соглашаемся и Актевизируем!!! Всё норм работает у меня iphone 4s прошивка 6.1 Удачи)))

Лера

0

+
-

25.02.2013 в 21:57

Не синхронизирует приложения и всякие игры…пишет что «установлено отключите устройство», отключаю, и игр НЕТ! Как быть???

Anna

0

+
-

06.04.2013 в 06:30

Help ,help,help!! Чистила файлы и удалила какой то нужный , и корзину тоже очистила (( теперь iTunes не запускаеться , пишет , что у меня нет прав ! И название библиотеки файла меняла +OLD подписывала, новую качала устанавливала , один раз грузит , а потом после пере загрузки слетает , права адм меняла .. На чтение и запись , тоже не помогает ((((( подскажите , что делать ?и дисковой улитлой пыталась восстановить права доступа … Пишет .. Восстанавливаю…, потом …не удалось ( … Файл , а сейчас…. Файл ) я же новую установила версию блин !!

Anna, переустановите ITunes… У вас размыто все написано, непонятно

Грейс

0

+
-

27.04.2013 в 13:24

Спасибо за полезную статью!

По ошибке 9 прям ппц помогли. Нельзя было побольше описать и поподробнее????

Acht
3

0

+
-

24.05.2013 в 15:26

опишите проблему, постараемся помочь

Гость

0

+
-

23.07.2013 в 03:15

Уже неделю пытаюсь поставить прошивку 6.3.1 пишит что сервер обновлений времянно недоступен у меня стоит 4.3.3 iphone 4 прошивку качал через itunes с соединением интернет все впорядке!!! Помогите кто может!!!

При входе в iTunes выскакивает окно с заголовком «Ошибка» и в самом окне написанно «Новая медиатека», что это? Не разу не пользовался им на этом компе, только на старом… Помогите, версия новая 11ая. Что делать ребята :((?

Imba

0

+
-

19.09.2013 в 10:56

Проблэма вселенского масштаба, после установки беты иос 7 (3) мне заблокировали доступ — ошибка авторизации, восстановить и обновить не могу — пишет что нужно отключить функцию найти айпад, но парадокс, зайти в настройки нельзя, что делать??

Гость

0

+
-

11.10.2013 в 12:43

1669 что за лшибка

Гость

0

+
-

11.10.2013 в 12:44

1669 что за ошибка

Дима

0

+
-

06.11.2013 в 22:16

У меня выскакивает ошибка error 2 помогите мне

Гость

0

+
-

08.11.2013 в 11:15

У меня ошибка -206, что за чушь? :

Гость

0

+
-

08.11.2013 в 11:47

ошибка iTunes 206 — незарегестрированая версия itunes и app store. Ошибка запрещает рабоатть с данной версией ПО. Обновите itunes, лучше установите с нуля и обновите iOS

Должна помочь

Гость

0

+
-

26.11.2013 в 13:29

Ошибка 1600 в рикавери и в дфу режимах. может кто нибудь подскажет совета!

Гость

0

+
-

28.11.2013 в 02:52

При запуске тунца выскакивает «неизвестная ошибка (310)», переустанавливал, выключал антивирус и брандмауэр, не помогает. Что делать, помогите.

Гость

0

+
-

25.12.2013 в 08:48

«неизвестная ошибка (310)» как исправить

Гость

0

+
-

22.01.2014 в 22:34

у меня тоже неизвестная ошибка (310)…. что делать?

помогите пожалуйста ошибка 8008 при загрузке приложении удалил папку как написано не помогает

Acht
3

0

+
-

28.01.2014 в 22:23

Недавно сталкивался с проблемой ошибки 8008.
Оказывается еще две причины могут быть:

1. Слетела авторизация, надо проверить в iTunes.
2. Буйствовал антивирус, отключите его как следует.

Мой случай был вторым.
Только для начала попробуете
Правка -> Настройки -> Дополнительно делал Сброс предупреждений и Сброс кэша

Acht, слетела авторизация это в каком смысле? и второе вы имеете ввиду полтостью вырубить агтивирус?

ошибка 8008 при скачке программ более 1 гига мелкие же качаются нормально в чем проблема помогите

Гость

0

+
-

22.03.2014 в 01:03

при обновление по пишет неизвестная ошибка (3).йпад 3 .помогитеееееее

Гость

0

+
-

02.04.2014 в 09:58

возникла ошибка 310 что делать подскажите!?

Гость

0

+
-

06.04.2014 в 20:46

Что за ошибка 3 как исправить?????

Павел

+1
+
-

26.05.2014 в 21:05

Вообщем ошибка 310 решается так..

Win 7
Свойства интернет -Подключения -Настройка параметров локальной сети-снять галочку с «использовать прокси-сервер».

И будет Вам счастье..

Гость

0

+
-

08.06.2014 в 18:37

всем привет ошибка 9006

Гость

0

+
-

08.06.2014 в 18:41

как решается

Related Article:

iOS update and restore errors

Looks like no one’s replied in a while. To start the conversation again, simply

ask a new question.

Windows,

Windows 10

Posted on Oct 11, 2021 8:47 AM


Question marked as

Best answer

Fixed: had to log in on another device, in this case an iPhone, then accept the terms and conditions on the phone. Then the error 1001 on iTunes disappeared.

Posted on Oct 12, 2021 6:07 PM

2 replies

Oct 12, 2021 9:46 AM in response to WebmanX99

Hello WebmanX99,

Welcome to the Apple Support Communities, and from your post it seems iTunes is showing an error 1001. We’ll do what we can to help.

If this is happening when you update or restore a device using iTunes, try he steps here: If you see an error when you update or restore your iPhone, iPad, or iPod

This might be related to hardware, so make sure to follow the steps in the link you posted from under «Check your hardware»: iOS update and restore errors

If you’re still having issues, let us know exactly when this error occurs.

Enjoy.


Question marked as

Best answer

Oct 12, 2021 6:07 PM in response to WebmanX99

Fixed: had to log in on another device, in this case an iPhone, then accept the terms and conditions on the phone. Then the error 1001 on iTunes disappeared.

error 1001

Do you want to play music via the Apple iTunes app, but are you getting the error message ‘1001’?

Apple iTunes is a media player and a media library application that is used to organize and play digital music, videos, TV shows, podcasts, radio, apps and ebooks. It was released on January 9, 2001.

The latest version of Apple iTunes is known for its compatibility with various devices such as iPhones, iPads and iPods. It can be used to download movies and music from the internet or from your computer to your device. It can also be used to manage your downloaded music and videos on your device or on your computer.

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

On this page, you will find more information about the most common causes and most relevant solutions for the Apple iTunes error ‘1001’. Do you need help straight away? Visit our support page.

Error information

How to solve Apple iTunes error 1001

We’ve created a list of solutions which you can follow if you want to solve this Apple iTunes problem yourself. Do you need more help? Visit our support page if you need professional support with Apple iTunes right away.

Tech Support 24/7

Ask a Tech Specialist Online

Connect with the Expert via email, text or phone. Include photos, documents, and more. Get step-by-step instructions from verified Tech Support Specialists.

Ask a Tech Specialist Online

Verified solution

There are many errors that can occur when you try to use Apple iTunes on your computer or when you try to access the program’s features. One of the most common errors is Apple iTunes Error 1001 which occurs when you try to access the program’s features such as playlists or add songs to your library. This error can be annoying and frustrating because you cannot access the program properly or because you cannot add songs properly to your library.

The problem can be caused by an issue with the program itself or it can be caused by a network error or a server error. You might also encounter this error if your computer is infected with malware. To fix this error, you need to try a few solutions.

First of all, updating your Mac or PC can resolve the issue for many users. Sometimes, the iTunes updates are necessary to fix security problems, which makes it a good idea to update the software periodically. You can find all the iTunes updates on Apple’s website.

When the error occurs, you can also perform a system check to find out if there is any problem with your Mac or PC. Put your iOS device into your computer’s USB port. Do not put it in a USB hub or USB keyboard. If you still see the error alert, try switching out the cable that you are using. You can also try to run an antivirus software on your computer and see if it finds any problems. You can also run a disk utility to check the disk space and see if there is any problem with your hard drive.

Lastly, another solution you can try is to contact the Customer Service to solve this error. You can try contacting them through their customer support number or their website. The customer support will usually ask you to send them the error code that is appearing on your screen. They will tell you what to do next for your problem and give another solution.

Check the server status of Apple

Before you restart everything, check the server status of Apple iTunes first. It may well be that Apple iTunes is struggling with a temporary outage.

Check the status of Apple iTunes

Have you found a solution yourself, but it is not in the list? Share your solution in the comments below.

Need more help?

Do you need more help?

Tech experts are ready to answer your questions.

Ask a question

II’ve been working on adding in-app purchases and was able to create and test in-app purchases using Store Kit.

Now I am unable to successfully complete any transactions and instead am getting only transactions with transactionState SKPaymentTransactionStateFailed.

The transaction.error.code is -1001 and the transaction.error.localizedDescription is «Cannot connect to iTunes Store»!

I have tried removing all products from iTunesConnect, and rebuilt them using different identifiers but that did not help. I have also tried using the App Store app to really connect to the real App Store and download some apps so I do have connectivity. Finally, I have visited the Settings:Store app to make sure I am signed out of my normal app store account.

asked Jan 18, 2012 at 10:49

Shoaib Raza's user avatar

you probably solved it by now but for others,
sometimes it takes time for apple to process new in app purchases. this is what the message -1001 actually saying

so, cross your fingers and wait for 24-48hours, dont change anything and you will probably be fine,
it will automatically start to work when they finish processing what is needed.

answered Apr 13, 2012 at 6:22

user513790's user avatar

user513790user513790

1,2251 gold badge13 silver badges22 bronze badges

The Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» is a common issue faced by iOS developers while making network requests. This error occurs when the request takes too long to complete and the server fails to respond within the specified time limit. There could be various reasons behind this error, including slow network speed, server issues, or large data transfer. In this article, we will look at some of the methods to fix this error and successfully complete network requests in iOS applications.

Method 1: Increasing the timeout interval

To fix the «Error Domain=NSURLErrorDomain Code=-1001» error in iOS that is caused by a request timing out, you can increase the timeout interval. Here’s how to do it in Swift:

  1. Create a URL request with the timeout interval you want:
let url = URL(string: "https://example.com")
var request = URLRequest(url: url!, timeoutInterval: 30)

In this example, the timeout interval is set to 30 seconds.

  1. Use URLSession to make the request:
let session = URLSession.shared
let task = session.dataTask(with: request) { data, response, error in
    // Handle the response or error here
}
task.resume()
  1. If you’re using a third-party library to make the request, check the documentation to see if there’s a way to set the timeout interval. For example, with Alamofire:
AF.request("https://example.com", timeoutInterval: 30).response { response in
    // Handle the response or error here
}

That’s it! By increasing the timeout interval, you’ve given the request more time to complete before timing out.

Method 2: Checking network connectivity

To fix the «Error Domain=NSURLErrorDomain Code=-1001» in iOS, you can check network connectivity before making the request. Here’s how you can do it in Swift:

  1. Import the SystemConfiguration framework:
import SystemConfiguration
  1. Define a function to check for network connectivity:
func isConnectedToNetwork() -> Bool {
    var zeroAddress = sockaddr_in()
    zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
    zeroAddress.sin_family = sa_family_t(AF_INET)
    guard let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, {
        $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {
            SCNetworkReachabilityCreateWithAddress(nil, $0)
        }
    }) else {
        return false
    }
    var flags: SCNetworkReachabilityFlags = []
    if !SCNetworkReachabilityGetFlags(defaultRouteReachability, &flags) {
        return false
    }
    let isReachable = flags.contains(.reachable)
    let needsConnection = flags.contains(.connectionRequired)
    return (isReachable && !needsConnection)
}
  1. Use the function to check for network connectivity before making the request:
if isConnectedToNetwork() {
    // Make your request
} else {
    // Handle the case where there's no network connectivity
}

By checking for network connectivity before making the request, you can avoid the «Error Domain=NSURLErrorDomain Code=-1001» error.

Method 3: Debugging server issues

When you encounter the error «Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.»» in iOS, it usually means that the request to the server has taken too long and has timed out. This can be caused by various factors such as slow network connection, server overload, or server maintenance.

To fix this error, you can try debugging server issues by following these steps:

  1. Check the server status and logs to see if there are any issues or errors that could cause the request to time out. You can use tools like curl or telnet to test the server connection and response time.
curl -I https://example.com
  1. Increase the timeout interval for the request by setting the timeoutInterval property of the URLRequest object. This will give the server more time to respond before the request times out.
let url = URL(string: "https://example.com")
var request = URLRequest(url: url!, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 60.0)
  1. Use a background thread to perform the request and handle the response asynchronously to avoid blocking the main thread.
let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
    if let error = error {
        print("Error: \(error.localizedDescription)")
        return
    }
    
    guard let data = data else {
        print("Data is nil")
        return
    }
    
    // Handle response data
}

task.resume()
  1. Implement retry logic to resend the request if it times out. You can use a recursive function to retry the request with a progressively longer timeout interval until it succeeds or reaches a maximum number of attempts.
func sendRequest(with request: URLRequest, retryCount: Int) {
    let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
        if let error = error {
            if retryCount > 0 {
                let newRequest = request
                newRequest.timeoutInterval *= 2
                sendRequest(with: newRequest, retryCount: retryCount - 1)
            } else {
                print("Error: \(error.localizedDescription)")
            }
            return
        }
        
        guard let data = data else {
            print("Data is nil")
            return
        }
        
        // Handle response data
    }
    
    task.resume()
}

let url = URL(string: "https://example.com")
var request = URLRequest(url: url!, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 30.0)
sendRequest(with: request, retryCount: 3)

By following these steps, you can effectively debug server issues and fix the NSURLErrorDomain error caused by request timeout.

Method 4: Using AFNetworking library

If you are encountering the error «Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.» while making a request in your iOS app, you can use the AFNetworking library to handle this error. Here are the steps to do it:

  1. Import the AFNetworking library in your code:
  1. Create an instance of AFHTTPSessionManager:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
  1. Set the timeout interval for the manager:
manager.requestSerializer.timeoutInterval = 60;
  1. Make the request using the manager:
[manager GET:@"http://example.com/resources.json" parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
    NSLog(@"Success: %@", responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
    NSLog(@"Error: %@", error);
}];

In the above code, we are making a GET request to «http://example.com/resources.json» with no parameters. The success block will be called if the request is successful, and the failure block will be called if there is an error.

By setting the timeout interval to 60 seconds, we are giving the request enough time to complete before timing out.

That’s it! By following these steps, you can handle the «Error Domain=NSURLErrorDomain Code=-1001 «The request timed out.»» error using the AFNetworking library in your iOS app.

Понравилась статья? Поделить с друзьями:
  • Ошибка 1001 лада веста
  • Ошибка 1001 касса
  • Ошибка 1001 escape from tarkov
  • Ошибка 1001 инфинити
  • Ошибка 1000062 unionpay