Question

ATS failed system trust

  • 9 November 2022
  • 9 replies
  • 897 views

Badge +3

I occasionally get an error when fetching offerings. This doesn’t only occur in debug but on the production build as well:

2022-11-09 16:03:23.930001-0500 MyApp[39824:849629] [Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/$RCAnonymousID:841e99c6a78a4a14b3c78cfd9b256d73/offerings
2022-11-09 16:03:24.005633-0500 MyApp[39824:849650] ATS failed system trust
2022-11-09 16:03:24.005682-0500 MyApp[39824:849650] Connection 11: system TLS Trust evaluation failed(-9802)
2022-11-09 16:03:24.005738-0500 MyApp[39824:849650] Connection 11: TLS Trust encountered error 3:-9802
2022-11-09 16:03:24.005770-0500 MyApp[39824:849650] Connection 11: encountered error(3:-9802)
2022-11-09 16:03:24.006350-0500 MyApp[39824:849650] Task <CF90CCFF-F001-4DE9-BB4F-1ECE50D343C9>.<4> HTTP load failed, 0/0 bytes (error code: -1200 [3:-9802])
2022-11-09 16:03:24.006618-0500 MyApp[39824:849634] Task <CF90CCFF-F001-4DE9-BB4F-1ECE50D343C9>.<4> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 “An SSL error has occurred and a secure connection to the server cannot be established." UserInfo={NSLocalizedRecoverySuggestion=Do you want to connect to this server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
    "<cert(0x113a4ac00) s: *.us-east-1.es.amazonaws.com i: Amazon>",
    "<cert(0x113a4a400) s: Amazon i: Amazon Root CA 1>",
    "<cert(0x113a4b600) s: Amazon Root CA 1 i: Starfield Services Root Certificate Authority - G2>",
    "<cert(0x113a4be00) s: Starfield Services Root Certificate Authority - G2 i: Starfield Class 2 Certification Authority>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://api.revenuecat.com/v1/subscribers/$RCAnonymousID%3A841e99c6a78a4a14b3c78cfd9b256d73/offerings, NSErrorFailingURLStringKey=https://api.revenuecat.com/v1/subscribers/$RCAnonymousID%3A841e99c6a78a4a14b3c78cfd9b256d73/offerings, NSUnderlyingError=0x6000004e5e90 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x600003b0a940>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=(
    "<cert(0x113a4ac00) s: *.us-east-1.es.amazonaws.com i: Amazon>",
    "<cert(0x113a4a400) s: Amazon i: Amazon Root CA 1>",
    "<cert(0x113a4b600) s: Amazon Root CA 1 i: Starfield Services Root Certificate Authority - G2>",
    "<cert(0x113a4be00) s: Starfield Services Root Certificate Authority - G2 i: Starfield Class 2 Certification Authority>"
)}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <CF90CCFF-F001-4DE9-BB4F-1ECE50D343C9>.<4>"
), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <CF90CCFF-F001-4DE9-BB4F-1ECE50D343C9>.<4>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x600003b0a940>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be established.}
2022-11-09 16:03:24.009352-0500 MyApp[39824:849634] [Purchases] - ERROR: 🍎‼️ Error fetching offerings - L’opération n’a pas pu s’achever. (RevenueCat.OfferingsManager.Error erreur 0.)
Underlying error: L’opération n’a pas pu s’achever. (RevenueCat.NetworkError erreur 2.)
2022-11-09 16:03:24.009412-0500 MyApp[39824:849634] [Purchases] - DEBUG: ℹ️ GetOfferingsOperation: Finished
2022-11-09 16:03:24.009443-0500 MyApp[39824:849342] [Purchases] - ERROR: 😿‼️ Error performing request.
2022-11-09 16:03:24.009487-0500 MyApp[39824:849634] [Purchases] - DEBUG: ℹ️ Serial request done: GET subscribers/$RCAnonymousID%3A841e99c6a78a4a14b3c78cfd9b256d73/offerings, 0 requests left in the queue


9 replies

Userlevel 5
Badge +9

Hey LucV! Can you answer the following questions?

  1. Does this happen all the time or sometimes?
  2. What iOS version does this happen for?
  3. Can you provide some details about your internet connection? Are you connecting via WiFi?
  4. Can you connect to revenuecat.com via Safari on the same device experiencing this issue?
  5. Do you have issues with other requests?

Badge +3

Hi Sharif,

> Does this happen all the time or sometimes?

Sometimes, but it seems to occur often when installing the app or first launching. Killing the app and relaunching seems to fix the issue but this isn’t a great initial experience

> What iOS version does this happen for?

Occurs on iOS 16.1 and 16.2 beta but it’s been an issue that I’ve experienced for months now

> Can you provide some details about your internet connection? Are you connecting via WiFi?

Issue seems to occur mostly on WiFi but at different locations.

> Can you connect to revenuecat.com via Safari on the same device experiencing this issue?

Yes

> Do you have issues with other requests?

No

Badge +3

I’ve also seen this issue in apps downloaded on the App Store, such as Flighty which I believe uses RevenueCat. It's stuck at “Loading...”.

 

 

Badge +1

Hello. We are having the same problem. Also can't do anything inside our account

 

Badge +3

We also are unable to access the dashboard from time to time for some reason but clearing browser cache usually “fixes” the problem.

Badge +1

@LucV thanks for your answer, but unfortunately clearing cache and using of another browser does not help. Also some apps are still can't load offerings. I see Planned Maintenance notification till 16:00 UTC. I hope this is the reason.

Userlevel 5
Badge +9

Hi all,

Thanks for all of the information! And sorry for the delay, last week the company was on holiday.

@Yuri Bikovsky there was some downtime on November 23, that was likely the cause of you not being able to view the dashboard. If you have further issues here, please make a new community post so that someone can help out.

@LucV I’m not sure if Flighty is actually running into the same issue but also I think it’s irrelevant - you’re seeing the issue in your own app so we should try to fix it! I’ll tell an SDK engineer what you told me and I’ll get back to you soon.

Userlevel 5
Badge +9

Hey @LucV,

Are you still seeing issues here? We’ve looked into this but we’re not sure what else could be causing this other than an issue in the device’s network connection with RevenueCat.

Badge +1

@sharif we faced with the same issue in Japan. Our Flutter App using purchases_flutter: 5.1.0

Hey LucV! Can you answer the following questions?

  1. Does this happen all the time or sometimes?
  2. What iOS version does this happen for?
  3. Can you provide some details about your internet connection? Are you connecting via WiFi?
  4. Can you connect to revenuecat.com via Safari on the same device experiencing this issue?
  5. Do you have issues with other requests?

  1. Sometimes
  2. iOS version - 16.2
  3. Connected via WiFi
  4. I was able to connect to revenuecat.com via Safari on my iPhone
  5. It looks like all request failed

this is the logs in attachments

Reply