TIC TCP Conn Failed [1:0x1c817bd80]: 1:54 Err(54)

Hi,


I have a problem with URLSession not working as expected on a cellular connection and fails with:

TIC TCP Conn Failed [1:0x1c817bd80]: 1:54 Err(54)


Twice and then reports the following error message:

Task <94BCEDF8-A46D-401A-B84B-01213E88EE6F>.<1> finished with error - code: -1005


When I try to run the code over a Wifi connection it runs fine, just as expected!


Any hints what I might be missing?


Thanks!

Blessings,

—Mark


PS I am really new at coding, so very likely I am missing something obvious.

Replies

In this context error 54 is

ECONNRESET
, indicating that the remote peer has reset the connection. This “reset” is in the TCP sense, that is, the remote peer has sent a response packet with the RST flag set.

As to why that’s happening, it’s hard to say. In my experience problems that only show up on WWAN are commonly caused by WWAN provider shenanigans, like so-called transparent proxies. The best way to avoid them is to adopt HTTPS. If you’re using HTTP, my recommendation is that you switch to HTTPS. That’s a good idea anyway.

If you can’t do that then you should try reproducing the problem on a different WWAN provider. The scope of the problem will then inform your next debugging steps.

Share and Enjoy

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

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

Thanks so much for the reply.


I am indeed using HTTPS to get the JSON file. I will need to look into and learn more about the scope for debugging.

Since it only happens on a cellular connection, I am baffled!


Thanks for the help. Lots to learn now that I know what error 54 is!

Blessing,

--Mark

I am indeed using HTTPS to get the JSON file.

OK. The next step then is to see if the problem reproduces when you use a different WWAN provider.

Share and Enjoy

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

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