Solved

"The certificate for this server is invalid." when attempting a purchase

  • 7 February 2023
  • 3 replies
  • 1152 views

Badge +2

I noticed an error logged for one of the iOS users:

"error.code": "0",
"error.domain": "RevenueCat.ErrorCode",
"error.message": "Unknown error.",
"error.nativeStackIOS": [
"0 MyApp 0x00000001042fa810 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254064",
"1 MyApp 0x00000001042d180c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 86124",
"2 MyApp 0x000000010425d280 _ZNK5folly3TryINS_4UnitEE16throwUnlessValueEv + 113116",
"3 MyApp 0x000000010425d3b8 _ZNK5folly3TryINS_4UnitEE16throwUnlessValueEv + 113428",
"4 MyApp 0x000000010421b280 MyApp + 176768",
"5 MyApp 0x0000000104218aa8 MyApp + 166568",
"6 MyApp 0x000000010421ca08 MyApp + 182792",
"7 MyApp 0x0000000104218298 MyApp + 164504"
],
"error.userCancelled": false,
"error.userInfo.NSLocalizedDescription": "Unknown error.",
"error.userInfo.NSUnderlyingError.code": "-1202",
"error.userInfo.NSUnderlyingError.domain": "NSURLErrorDomain",
"error.userInfo.NSUnderlyingError.message": "underlying error",
"error.userInfo.NSUnderlyingError.nativeStackIOS": [
"0 MyApp 0x00000001042fa810 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254064",
"1 MyApp 0x00000001042fa99c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254460",
"2 MyApp 0x00000001042d180c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 86124",
"3 MyApp 0x000000010425d280 _ZNK5folly3TryINS_4UnitEE16throwUnlessValueEv + 113116",
"4 MyApp 0x000000010425d3b8 _ZNK5folly3TryINS_4UnitEE16throwUnlessValueEv + 113428",
"5 MyApp 0x000000010421b280 MyApp + 176768"
],
"error.userInfo.NSUnderlyingError.userInfo.NSLocalizedDescription": "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “p55-buy.itunes.apple.com” which could put your confidential information at risk.",
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.code": "-1202",
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.domain": "kCFErrorDomainCFNetwork",
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.message": "underlying error",
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.nativeStackIOS": [
"0 MyApp 0x00000001042fa810 _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254064",
"1 MyApp 0x00000001042fa99c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254460",
"2 MyApp 0x00000001042fa99c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 254460",
"3 MyApp 0x00000001042d180c _ZN8facebook5react11JSIExecutor21defaultTimeoutInvokerERKNSt3__18functionIFvvEEENS3_IFNS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEvEEE + 86124",
"4 MyApp 0x000000010425d280 _ZNK5folly3TryINS_4UnitEE16throwUnlessValueEv + 113116"
],
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo._kCFNetworkCFStreamSSLErrorOriginalValue": -9807,
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo._kCFStreamErrorCodeKey": -9807,
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo._kCFStreamErrorDomainKey": 3,
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo._kCFStreamPropertySSLClientCertificateState": 0,
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo.kCFStreamPropertySSLPeerCertificates": [
"<cert(0xb97025000) s: p55-buy.itunes.apple.com i: NEPacket>"
],
"error.userInfo.NSUnderlyingError.userInfo.NSUnderlyingError.userInfo.kCFStreamPropertySSLPeerTrust_desc": "<SecTrustRef: 0xb96a14770>",
"error.userInfo.readableErrorCode": "UNKNOWN",
"error.userInfo.readable_error_code": "UNKNOWN",
"error.userInfo.source_file": "RevenueCat/PurchasesOrchestrator.swift:733",
"error.userInfo.source_function": "handleFailedTransaction(_:)"


The most interesting part is this:

“The certificate for this server is invalid. You might be connecting to a server that is pretending to be “p55-buy.itunes.apple.com” which could put your confidential information at risk.

The error happens when attempting to make a purchase in the live app. What does this error mean?

icon

Best answer by Yousef 8 February 2023, 17:00

View original

3 replies

Userlevel 1
Badge +3

i think this is general issue , me 2 its happiness suddenly wow

Badge +2

Today I saw the same user having a different purchase error:

The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.

 

Userlevel 3
Badge +7

Hi Rafi,

What you mentioned above, with the warning,

“The certificate for this server is invalid. You might be connecting to a server that is pretending to be “p55-buy.itunes.apple.com” which could put your confidential information at risk.”

It mostly just looks like a user trying to do a man in the middle attack by replacing apple’s servers, or maybe they have just set the date and time in their device manually and the connection doesn’t validate. In any case, that one doesn’t seem like anything to worry about at a glance.

Reply