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

Timeout Error with Branch SDK (NSURLErrorDomain, code -1001) #1455

Open
Byrontoo opened this issue Dec 4, 2024 · 0 comments
Open

Timeout Error with Branch SDK (NSURLErrorDomain, code -1001) #1455

Byrontoo opened this issue Dec 4, 2024 · 0 comments

Comments

@Byrontoo
Copy link

Byrontoo commented Dec 4, 2024

Describe the bug

Hi there @echo-branch @nsingh-branch @NidhiDixit09,

I am encountering a timeout issue while initializing the Branch SDK in my iOS app. The error message I’m receiving is:

{"error": {"msg": "The request timed out.", "domain": "NSURLErrorDomain", "code": -1001}
This happens on the following iOS versions:

iOS 17.6.1
iOS 16.7.10
iOS 17.5.1
iOS 18.1.0
iOS 18.1.1
I am using Branch SDK version 3.6.5 and the following code to initialize the Branch session:

Branch.setUseTestBranchKey(true) let branch: Branch = Branch.getInstance() branch.initSession(launchOptions: launchOptions, andRegisterDeepLinkHandler: { params, error in if error == nil { // Handle success } else if let error { // Handle error } })
Could you please help in identifying the cause of this timeout issue and suggest possible solutions?
The number of this error is currently the highest in our production environment.

Thanks in advance!

Steps to reproduce

  1. Turn off the network (disconnect Wi-Fi or disable cellular data).
  2. Tap the app icon to launch the app.
  3. Turn on the network immediately
  4. The app will call branch.initSession(), which attempts to initialize the Branch session.
  5. The request will accidental time out, and the error message "The request timed out." will be triggered, resulting in the NSURLErrorDomain error code -1001.

Expected behavior

The Branch session should initialize without any timeout errors, even when the network is initially off, by waiting for the network to become available.

SDK Version

3.6.5

XCode Version

15.2

Device

iphone X

OS

17.6.1, 16.7.10, 17.5.1, 18.1.0, 18.1.1.

Additional Information/Context

No response

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

No branches or pull requests

1 participant