Application is unable to connect to internet on cellular network

And I have already checked all the simple gotchas such as https://www.imobie.com/support/how-to-fix-cellular-data-issue-on-iphone.htm


After getting some logs from the device, the following seems very suspicious:


Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: NSURLSessionTask finished with error - code: -1009

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I New CTServerConnection from pid 4515 (conn=0x1076efb80)

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I CTServerConnection from pid 4515[<private>] is named '<private>'.

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: HTTP load failed (error code: -1009 [1:50])

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: NSURLSessionTask finished with error - code: -1009

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I CTServerConnection from pid 4515 has closed (conn=0x1076efb80)

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Notice>: TIC TCP Conn Start [42:0x17019ce50]

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I Got denied callback for cellular when cellular is allowed

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I Ignoring access denied callback for bundle id: <private>

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Notice>: TIC TCP Conn Event [42:0x17019ce50]: 3 Err(50)

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: TIC TCP Conn Failed [42:0x17019ce50]: 1:50 Err(50)

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Notice>: TIC TCP Conn Cancel [42:0x17019ce50]

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Notice>: TIC TCP Conn Destroyed [42:0x17019ce50]

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Notice>: _CFNetworkIsConnectedToInternet returning 0, flagsValid: 1, flags: 0x40000

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I New CTServerConnection from pid 4515 (conn=0x1070789c0)

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I CTServerConnection from pid 4515[<private>] is named '<private>'.

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I CTServerConnection from pid 4515 has closed (conn=0x1070789c0)

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: HTTP load failed (error code: -1009 [1:50])

Jun 7 11:08:23 iPhone advomobo(CFNetwork)[4515] <Error>: NSURLSessionTask finished with error - code: -1009

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I Got denied callback for cellular when cellular is allowed

Jun 7 11:08:23 iPhone CommCenter[81] <Notice>: #I Ignoring access denied callback for bundle id: <private>


what could be the cause of this issue?

Replies

It’s hard to say what’s going on here without more context. Some questions:

  • Are the affected requests running in a background session? Or a standard session?

  • Are you seeing this all the time? Or intermittently?

  • Is this affecting all users? Or just some users?

Share and Enjoy

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

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

Thanks for your response:

  • Are the affected requests running in a background session? Or a standard session? standard
  • Are you seeing this all the time? Or intermittently? intermittently
  • Is this affecting all users? Or just some users? some users , but the incidences are going up

When you see this error what does

CTCellularData
say about the cellular data restriction state of your app?

Share and Enjoy

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

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

This is happening only to our produciton apps, we have never been able to reproduce it in a developer environment. So right now there is no way of determining the cellular data restricion state of the app, when this happens.

Im attaching the entire log from a device that we captured a while back. Can you please go through it and see if something sticks out?

https://gist.github.com/shamikagasc/c5a4aea59e73e208660da82a3699c727

This is happening only to our produciton apps, we have never been able to reproduce it in a developer environment. So right now there is no way of determining the cellular data restricion state of the app, when this happens.

Bummer. My recommendation would be that you add this to your next release and pick the investigation up from there.

Can you please go through it and see if something sticks out?

No, sorry, I just don’t have the time for that in the context of DevForums. If you’d like to pursue this formally, you should open a DTS tech support incident and we can pick this up from there.

Also, a system log from the device is interesting but it would be much better to get a sysdiagnose (see our Bug Reporting > Profiles and Logs). That includes the system log and a bunch of other stuff.

Share and Enjoy

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

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

Thanks, I will be doing that soon. In the meantime we have made another observation. When we test our application using TestFlight builds we never observe this #I Got denied callback for cellular when cellular is allowed issue but we do see it intermittently when the same TF build is finally published to the App Store.

Can you tell me why there would be a networking api difference between the same build on Testflight vs Appstore

Can you tell me why there would be a networking api difference between the same build on Testflight vs Appstore

No. I don’t even have any theories to explore on that front.

Share and Enjoy

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

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