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
как решается
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.
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.
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
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 с Apple ID, который вы использовали, чтобы сделать покупку.
Отключение контроля учетных записей
Удаление папки SC Инфо
Удаление папки SC Info в макосе высокая Сьерра или раньше
Удаление папки SC Info в окнах
Получить помощь в вопросах биллинга
Информация о продуктах, произведенных не компанией Apple, или о независимых веб-сайтах, неподконтрольных и не тестируемых компанией Apple, не носит рекомендательного характера и не рекламируются компанией. Компания Apple не несет никакой ответственности за выбор, функциональность и использование веб-сайтов или продукции. Apple не делает никаких заявлений относительно стороннего точность сайт или надежность. Риски, связанные с использованием Интернета. Обратитесь к поставщику за дополнительной информацией. Другие названия компаний и продуктов могут быть товарными знаками их соответствующих владельцев.
Дата Публикации: 13 Мая 2019