Skip to content

Crash during initialisation - processServerOperation -> setSavedURLPatternListΒ #1482

@marceloadsj

Description

@marceloadsj

Describe the bug

We just released our Flutter App after integrating with Branch SDK (via flutter pkg v8.3.2: https://pub.dev/packages/flutter_branch_sdk, iOS SDK v3.7.0) and today we noticed some crashes in iOS with the log below.

For some users, it looks like Branch is having a hard time trying to save url pattern (regex) during the initialisation of the SDK.

Steps to reproduce

I could not reproduce it myself, nor our QA during our internal testing period, but we've seen the following log in our Crashlytics after having the app published for few days.

Log:

Crashed: io.branch.sdk.network.queue (QOS: USER_INTERACTIVE)
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000736d215e0

0  libobjc.A.dylib                0x2370 objc_release + 16
1  libobjc.A.dylib                0x2370 objc_release_x0 + 16
2  BranchSDK                      0x10c1c -[BNCPreferenceHelper writeObjectToDefaults:value:] + 925 (BNCPreferenceHelper.m:925)
3  BranchSDK                      0xf8b8 -[BNCPreferenceHelper setSavedURLPatternList:] + 606 (BNCPreferenceHelper.m:606)
4  BranchSDK                      0x1fe00 -[BNCURLFilter processServerOperation:] + 186 (BNCURLFilter.m:186)
5  BranchSDK                      0x1f884 __58-[BNCURLFilter updatePatternListFromServerWithCompletion:]_block_invoke + 115 (BNCURLFilter.m:115)
6  BranchSDK                      0xd91c __36-[BNCNetworkService startOperation:]_block_invoke + 193 (BNCNetworkService.m:193)
7  CFNetwork                      0x6b9c4 __40-[__NSURLSessionLocal taskForClassInfo:]_block_invoke + 508
8  CFNetwork                      0x6b780 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke_2 + 160
9  Foundation                     0x1ccdc __NSINDEXSET_IS_CALLING_OUT_TO_A_BOOL_BLOCK__ + 24
10 Foundation                     0x1cb9c -[NSBlockOperation main] + 104

Expected behavior

The app to not Crash, even if there is a problem on Branch's SDK initialisation side.

SDK Version

3.7.0

XCode Version

16.0

Device

iPhone 13, 14 Plus, 11, 12 Mini

OS

18.1.1, 18.3.1, 16.1.1

Additional Information/Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions