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

HTTP load failed, 0/0 bytes (error code: -1009 [1:50]) #57

Closed
3a4oT opened this issue May 10, 2024 · 7 comments · Fixed by #58
Closed

HTTP load failed, 0/0 bytes (error code: -1009 [1:50]) #57

3a4oT opened this issue May 10, 2024 · 7 comments · Fixed by #58

Comments

@3a4oT
Copy link
Contributor

3a4oT commented May 10, 2024

We tried to use the latest release but discovered issues with URLSession loading on iOS. Considering that my internal fork (with strict concurrency changes) works well, I suspect something went wrong with other commits (maybe Privacy manifest??). I haven't had time to research so far.

Issue reported on the console when pointing to the 3.6.0 release:

nw_endpoint_handler_path_change [C6 edge.api.flagsmith.com:443 waiting parent-flow (satisfied (Path is satisfied), interface: en0[802.11], uses wifi)] blocked tracker
Connection 6: received failure notification
Connection 6: failed to connect 1:50, reason -1
Connection 6: encountered error(1:50)
Task <BAD4587C-xxx-xxxxx-xx-xxxxx>.<3> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
Task <BAD4587C-xx-xxx-xxxx-xx>.<3> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x600000c9b420 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorBlockedTrackerFailureKey=true, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], uses wifi}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <xxxxxxx>.<3>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <xxxxxxxxxx>.<3>"
), NSLocalizedDescription=The internet connection appears to be offline., NSErrorFailingURLStringKey=https://edge.api.flagsmith.com/api/v1/identities/?identifier=xxxxxxxxx, NSErrorFailingURLKey=https://edge.api.flagsmith.com/api/v1/identities/?identifier=xxxxxxxx, _kCFStreamErrorDomainKey=1}

cc. @dabeeeenster , @gazreese

@matthewelwell
Copy link
Contributor

Thanks @3a4oT, we will look into this. Could you update the title of the issue to better describe the issues that you're facing? Also, are you able to provide any further information about how to replicate this issue?

@3a4oT 3a4oT changed the title Something went wrong on latest release (3.6.0) HTTP load failed, 0/0 bytes (error code: -1009 [1:50]) May 10, 2024
@3a4oT
Copy link
Contributor Author

3a4oT commented May 10, 2024

Thanks @3a4oT, we will look into this. Could you update the title of the issue to better describe the problems that you're facing? Also, are you able to provide any further information about how to replicate this issue?

Just try to get flags, nothing special. It fails when loading from an iOS app (consuming from SPM), so I guess it may be related to NSAppTransportSecurity (again not sure how and why, yet :)))

@gazreese
Copy link
Contributor

Hi @3a4oT do you have the tracking switch switched off for the app that you have Flagsmith integrated into?

If you go to Privacy and Security then Tracking in settings you should see a list of apps. Could you please try with and without for your app and let us know the outcome?

@EmilSveaSolar
Copy link

Hi, we're seeing exactly the same issue. No changes made to how we're using the Flagsmith SDK, but pointing to 3.6.0 release results in us seeing the same error.

@3a4oT
Copy link
Contributor Author

3a4oT commented May 22, 2024

Hi @3a4oT do you have the tracking switch switched off for the app that you have Flagsmith integrated into?

If you go to Privacy and Security then Tracking in settings you should see a list of apps. Could you please try with and without for your app and let us know the outcome?

My app is not on that list, but I guess you're digging in the right direction. It seems like the root cause of it is this change . Per Apple documentation seems like a network error is expected if the user doesn't allow tracking.


NSPrivacyTrackingDomains
An array of strings that lists the internet domains your app or third-party SDK connects to that engage in tracking. 
If the user has not granted tracking permission through the App Tracking Transparency framework, network requests to these domains fail and your app receives an error.

The issue is that SDK should continue to work no matter what the user chooses in terms of tracking.

@3a4oT
Copy link
Contributor Author

3a4oT commented May 22, 2024

ahh, just saw your PR, so it seems like you come to the same conclusion. I will try to test your branch and see whether it helps.

@3a4oT
Copy link
Contributor Author

3a4oT commented May 22, 2024

I can confirm that linked PR fixed the issue with network error.

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

Successfully merging a pull request may close this issue.

4 participants