React-native-share: ENSCOCOAERRORDOMAIN3072 error being thrown when canceling the Save to File sheet on iOS 13

Created on 4 Jun 2020  路  3Comments  路  Source: react-native-share/react-native-share

Steps to reproduce

  1. Call Share.open({...}) on iOS version 13
  2. Select Save to Files
  3. Hit cancel

Expected behaviour

No errors should be thrown

Actual behaviour

iOS error is being thrown:

{
   "error":{
      "code":"ENSCOCOAERRORDOMAIN3072",
      "message":"The operation was cancelled.",
      "domain":"NSCocoaErrorDomain",
      "userInfo":{

      },
      "nativeStackIOS":[
         "0   TestApp                        0x00000001021b2b37 RCTJSErrorFromCodeMessageAndNSError + 135",
         "1   TestApp                        0x00000001021b2a63 RCTJSErrorFromNSError + 275",
         "2   TestApp                        0x000000010212d071 __41-[RCTModuleMethod processMethodSignature]_block_invoke_4.110 + 161",
         "3   TestApp                        0x00000001021eb512 __89-[RCTActionSheetManager showShareActionSheetWithOptions:failureCallback:successCallback:]_block_invoke + 162",
         "4   ShareSheet                          0x00007fff43af7f67 __68-[UIActivityViewController _cleanupActivityWithSuccess:items:error:]_block_invoke + 207",
         "5   UIKitCore                           0x00007fff4792013c -[UIPresentationController transitionDidFinish:] + 978",
         "6   UIKitCore                           0x00007fff47924c78 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.503 + 199",
         "7   UIKitCore                           0x00007fff47a3df47 -[_UIViewControllerTransitionContext completeTransition:] + 88",
         "8   UIKitCore                           0x00007fff485316a4 -[UITransitionView notifyDidCompleteTransition:] + 247",
         "9   UIKitCore                           0x00007fff48531327 -[UITransitionView _didCompleteTransition:] + 1423",
         "10  UIKitCore                           0x00007fff4856b908 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 671",
         "11  UIKitCore                           0x00007fff4853bf31 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 268",
         "12  UIKitCore                           0x00007fff4853c4a3 -[UIViewAnimationState animationDidStop:finished:] + 259",
         "13  UIKitCore                           0x00007fff4853c62a -[UIViewAnimationState animationDidStop:finished:] + 650",
         "14  QuartzCore                          0x00007fff2b14496c _ZN2CA5Layer23run_animation_callbacksEPv + 306",
         "15  libdispatch.dylib                   0x00000001042aed48 _dispatch_client_callout + 8",
         "16  libdispatch.dylib                   0x00000001042bcde6 _dispatch_main_queue_callback_4CF + 1500",
         "17  CoreFoundation                      0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9",
         "18  CoreFoundation                      0x00007fff23bceca9 __CFRunLoopRun + 2329",
         "19  CoreFoundation                      0x00007fff23bce066 CFRunLoopRunSpecific + 438",
         "20  GraphicsServices                    0x00007fff384c0bb0 GSEventRunModal + 65",
         "21  UIKitCore                           0x00007fff48092d4d UIApplicationMain + 1621",
         "22  TestApp                        0x0000000101e93fa0 main + 112",
         "23  libdyld.dylib                       0x00007fff5227ec25 start + 1"
      ]
   }
}

Environment

  • React Native version: 0.61.5
  • React Native platform + platform version: iOS 13

react-native-share

Version: 3.2.2

bug help wanted ios

All 3 comments

I experienced the same issue, probably the cause of this is here: https://github.com/react-native-community/react-native-share/blob/10c72e4a6a54042fc98c16d69a773fad4034b246/ios/RNShare.m#L163-L271.

I will try reproducing that here using the example app, to see exactly which method is throwing this error.

Hey guys, we have the same issue. Any tips on how to get around it?

Hey guys, we have the same issue. Any tips on how to get around it?

Probably It's a missing catch or something similar on iOS. Unfortunately, I didn't have time to see this. Would you mind helping us debug this with our example app?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rohitgoyal picture rohitgoyal  路  3Comments

Rickkorsten picture Rickkorsten  路  3Comments

byk04712 picture byk04712  路  3Comments

monkingame picture monkingame  路  3Comments

desis123 picture desis123  路  3Comments