Open nebsta opened 3 months ago
Hi @nebsta sorry for the delay, and thanks for submitting this issue.
Not sure why this URL would return this error code...
@bgiori
- What is the frequency of these errors? Is it very common or very uncommon?
In total we've seen about 860 instances of this happening across 311 users. We're seeing about 20 instances of this exception occurring per day
- Do you have any way to check where these users are located geographically?
I did a check and could see that the locale isn't consistent. Just doing a general check I saw users from Australia, Britain and Germany
- Do you have any way to reproduce locally?
Unfortunately not
Based on the screenshots provided, the URLs look valid. Is it possible the users just have poor network connectivity, and this error is a red herring? Do you get other errors for connection timouts/DNS resolution errors?
@bgiori we do have some, but most of those we filter out due to them not being possible for us to resolve.
Sorry for the delay. Unfortunately I am unable to reproduce this error. Is it possible to get more info from the error passed in the completion?
For example, when I turn of my network connectivity and run a test on my mac, I get the following error:
Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x60000336e9a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 1ms using unknown from cache, _NSURLErrorNWPathKey=unsatisfied (No network route)}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <B64B86B1-5327-484B-875C-713F6620215C>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <B64B86B1-5327-484B-875C-713F6620215C>.<1>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://api.lab.amplitude.com/sdk/v2/vardata?v=0, NSErrorFailingURLKey=https://api.lab.amplitude.com/sdk/v2/vardata?v=0, _kCFStreamErrorDomainKey=1}
The error returned in your stack trace seems terse: -1000:NSURLErrorDomain: Code: 9301
We've noticed that we seem to be getting a fair few errors whenever we call the
ExperimentClient.start
/ExperimentClient.fetch
methods.We use Sentry for our error reporting, and we have set it up so that we send most errors through to Sentry whenever we get an error from the start call. You can see the exact details/numbers here via our Sentry reporting:
Note that the error name contains the error code/domain
Based on the error code we're getting in the callbacks, it seems like the error is due to a bad URL (see NSURLErrorDomain codes), though based on the breadcrumbs in Sentry, the url seems to be fine.