purchases-ios: Error: A server with the specified hostname could not be found
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
We’re receiving a random error on some devices ErrorCode Code=10 "Error performing request.", please see more in additional context.
The thing is the error says that the path is satisfied. It’s a little bit strange, I mean if the path is satisfied the host should be found. the source function is init(_:dnsChecker:) . Could be an error inside this function that makes it fail?
Thanks in advance. I really appreciate your hard work.
- Environment
- Platform: iOS
- SDK version: 4.13.3
- StoreKit 2 (disabled with
useStoreKit2IfEnabled(false)) (Y/N): useStoreKit2IfEnabled(false) - OS version: iOS 15.X
- Xcode version: 13.4.1
- How widespread is the issue. Percentage of devices affected. -
- Debug logs that reproduce the issue -
- Steps to reproduce, with a description of expected vs. actual behavior -
- Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
Additional context
readable_error_code: NETWORK_ERROR
Error Code: 10
source_function: init(_:dnsChecker:)
RevenueCat.ErrorCode.Error Domain=RevenueCat.ErrorCode Code=10 "Error performing request."
UserInfo={NSLocalizedDescription=Error performing request., source_file=RevenueCat/HTTPClient.swift:363,
NSUnderlyingError=0x2805cea60
{Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found."
UserInfo={_kCFStreamErrorCodeKey=8,
NSUnderlyingError=0x2805cf840 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "
NSUnderlyingError
Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found."
UserInfo={_kCFStreamErrorCodeKey=8,
NSUnderlyingError=0x2805cf840 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)"
UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0, ipv4, dns, proxy, _kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}},
_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <ID>.<35>,
_NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask < ID >.<35>" ),
NSLocalizedDescription=A server with the specified hostname could not be found.,
NSErrorFailingURLStringKey=https://api.revenuecat.com/v1/subscribers/{SubscriberID},
NSErrorFailingURLKey=https://api.revenuecat.com/v1/subscribers/{SubscriberID}, _kCFStreamErrorDomainKey=12}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (13 by maintainers)
I found the issue - I didn’t check the checkbox in the Signing & Capabilities -> App Sandbox -> Network -> Outgoing Connections (Client) 🙃 Sorry to bother you with that unrelated issue, I haven’t implemented any mac apps before so I also haven’t used any networking yet on mac - thank you for your help! Now everything works as expected!
Thanks for the extra information! We’ll let you know what we find out.
In the mean time, I just added a new log that will provide a bit more insight from the SDK perspective: #2167.