question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENSCOCOAERRORDOMAIN3072 error being thrown when canceling the Save to File sheet on iOS 13

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
sohail-dragoncommented, Jun 22, 2020

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

1reaction
MateusAndradecommented, Jun 8, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENSCOCOAERRORDOMAIN3072 error being thrown when ...
on iOS version 13 Select Save to Files Hit cancel Expected behaviour No errors should be thrown Actual behaviour iOS error is being...
Read more >
Error Domain=NSCocoaErrorDomain Co… - Apple Developer
Error Domain=NSCocoaErrorDomain Code=518 "The file couldn't be saved because the specified URL type isn't supported." How can I fix this?
Read more >
Code=3072 "The operation was cancelled" when setting ...
I was getting this error because of two reasons,. First(and highly not because of), I didn't do "Add Files to 'ProjectNameFoo'" by adding ......
Read more >
How to Change iOS App Icon Programmatically (iOS 10.3)
Error Domain=NSCocoaErrorDomain Code=3072 “The operation was cancelled.” Pitfall: Code must be called in view controller. You must call ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found