SSL connection only fails in Xcode Cloud workflow

Hello,

I have a unit test that uses URLSession to verify that a file from a firebase storage bucket can be downloaded. It passes 100% of the time locally, both in simulators and on an actual device. When running the test through Xcode Cloud, it fails every time with this error:


NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, 
_kCFStreamErrorDomainKey=3, 
_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <151C7B2D-1565-47D7-A753-DAB851722510>.<1>, 
NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <151C7B2D-1565-47D7-A753-DAB851722510>.<1>" ), 
NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., 
NSErrorFailingURLKey=https://firebasestorage.googleapis.com/(full url hidden).wav, 
NSUnderlyingError=0x600001c01a40 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" 
UserInfo={_kCFStreamPropertySSLClientCertificateState=0, 
_kCFNetworkCFStreamSSLErrorOriginalValue=-9816, 
_kCFStreamErrorDomainKey=3, 
_kCFStreamErrorCodeKey=-9816, 
_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: utun3}}, 
_kCFStreamErrorCodeKey=-9816}

I've inspected the url with openssl and it all seems fine, also did an nscurl -ats and everything passed. Trying a url from another server also works in the cloud, it just seems to have a problem with the firebase one. I haven't ruled out it being an issue with Firebase, but since I can't really debug what's happening on the cloud simulators, I don't have much to work with.

Could be that Apple is intercepting or proxying certain outbout connections from Xcode Cloud to make sure no deails are leaking out? I’d not be surprised.

SSL connection only fails in Xcode Cloud workflow
 
 
Q