flutter_branch_sdk icon indicating copy to clipboard operation
flutter_branch_sdk copied to clipboard

Calling the getLastAttributedTouchData() exit with exeption on IOS 15.7

Open jasonliuspark123 opened this issue 3 years ago • 6 comments

Describe the bug When

To Reproduce Steps to reproduce the behavior:

  1. Call await FlutterBranchSdk.getLastAttributedTouchData(); in code: BranchResponse response = await FlutterBranchSdk.getLastAttributedTouchData(attributionWindow: 20); if (response.success) { controllerData.sink.add(response.result.toString()); showSnackBar(message: 'Last Attributed TouchData recovered'); } else { showSnackBar( message: 'showShareSheet Error: ${response.errorCode} - ${response.errorMessage}', duration: 5); } This is actually from the examp app.

  2. trigger the method by button in example app

  3. App exited with an exception:

Unsupported value: <BranchLastAttributedTouchData: 0x2825c11e0> of type BranchLastAttributedTouchData 2022-10-14 13:39:29.075425+0800 Runner[11926:477756] *** Assertion failure in -[FlutterStandardWriter writeValue:], FlutterStandardCodec.mm:338 2022-10-14 13:39:29.077082+0800 Runner[11926:477756] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported value for standard codec' *** First throw call stack: (0x18116fd1c 0x198994ee4 0x182915c80 0x107bc80e0 0x107bc80e0 0x107bc8668 0x107bc56e0 0x104de7590 0x104df2020 0x104de2958 0x104f54700 0x104f55fc8 0x104f648ac 0x104f644fc 0x18112b0d4 0x1810e85f8 0x1810fb250 0x1a1c36988 0x1838fda88 0x183696fc8 0x104b93d40 0x104cdc4d0) libc++abi: terminating with uncaught exception of type NSException dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported value for standard codec' terminating with uncaught exception of type NSException

Expected behavior Expect to see the last attributed data received.

Screenshots Actually I can see the API returned latd data in log, seems the error occurs in the parsing phase. image

Smartphone (Please complete the following information. remove session if not platform):

  • Flutter: version: 3.3.4 & 2.10.3
  • Package version: 6.1.0 & 5.1.0
  • Device: [ iPhone7 plus]
  • OS: [e.g. iOS 15.7]

jasonliuspark123 avatar Oct 14 '22 05:10 jasonliuspark123

I will check

RodrigoSMarques avatar Oct 15 '22 03:10 RodrigoSMarques

I found the bug, I will prepare a new version.

RodrigoSMarques avatar Oct 15 '22 13:10 RodrigoSMarques

I found the bug, I will prepare a new version.

Thanks! Client is using 5.1.0 branch SDK wrapper, is it possible to also apply fix on 5.1.0? They are not able to upgrade higer flutter version due to some wigets incompatibility.

jasonliuspark123 avatar Oct 17 '22 02:10 jasonliuspark123

I found the bug, I will prepare a new version.

Thanks! Client is using 5.1.0 branch SDK wrapper, is it possible to also apply fix on 5.1.0? They are not able to upgrade higer flutter version due to some wigets incompatibility.

I will fix it in version 6.2.0 and publish it in pub.dev at 6.2.1

As you are using an old version, I can publish version 5.1.2 and you use this version from git and not through pub.dev.

If you've never done it, I explain how you should do it in pubspec.yaml

RodrigoSMarques avatar Oct 17 '22 04:10 RodrigoSMarques

I found the bug, I will prepare a new version.

Thanks! Client is using 5.1.0 branch SDK wrapper, is it possible to also apply fix on 5.1.0? They are not able to upgrade higer flutter version due to some wigets incompatibility.

I will fix it in version 6.2.0 and publish it in pub.dev at 6.2.1

As you are using an old version, I can publish version 5.1.2 and you use this version from git and not through pub.dev.

If you've never done it, I explain how you should do it in pubspec.yaml

Hi Rodrigo, An instruction of using 5.1.2 in pubspec would be very helpful! Can you tell me how to do it?

Thanks

jasonliuspark123 avatar Oct 17 '22 08:10 jasonliuspark123

Fix completed - Version 6.2.1 released.

I created a branch with version 5.1.2 for you to use in your project.

Update pubspec.yaml, as in the example below:

#flutter_branch_sdk:
flutter_branch_sdk:
    git:
      url: https://github.com/RodrigoSMarques/flutter_branch_sdk.git
      ref: bugfix-5.1.2

RodrigoSMarques avatar Oct 19 '22 00:10 RodrigoSMarques