Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad URL on ExperimentClient.start/fetch #57

Open
nebsta opened this issue Aug 13, 2024 · 5 comments
Open

Bad URL on ExperimentClient.start/fetch #57

nebsta opened this issue Aug 13, 2024 · 5 comments

Comments

@nebsta
Copy link

nebsta commented Aug 13, 2024

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

Screenshot 2024-08-13 at 11 14 36

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.

Screenshot 2024-08-13 at 11 11 39

@nebsta nebsta changed the title Bad URL on ExperimentClient.start Bad URL on ExperimentClient.start/fetch Aug 13, 2024
@bgiori
Copy link
Collaborator

bgiori commented Aug 27, 2024

Hi @nebsta sorry for the delay, and thanks for submitting this issue.

Not sure why this URL would return this error code...

  1. What is the frequency of these errors? Is it very common or very uncommon?
  2. Do you have any way to check where these users are located geographically?
  3. Do you have any way to reproduce locally?

@nebsta
Copy link
Author

nebsta commented Aug 28, 2024

@bgiori

  1. 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

  1. 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

  1. Do you have any way to reproduce locally?

Unfortunately not

@bgiori
Copy link
Collaborator

bgiori commented Sep 3, 2024

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?

@nebsta
Copy link
Author

nebsta commented Sep 4, 2024

@bgiori we do have some, but most of those we filter out due to them not being possible for us to resolve.

@bgiori
Copy link
Collaborator

bgiori commented Sep 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants