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.

IOS Application tried to present modal view controller on itself. Presenting controller is <RCTModalHostViewController: 0x1576fa2b0>

See original GitHub issue

App crash on IOS devices on click modal. After update the react-native 0.66.0 version.

Platforms

Crash on IOS platform

Versions

  • react-native-modal:13.0.0
  • react-native:0.66.0
  • react:17.0.2

Description

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x11b928 __exceptionPreprocess 1 libobjc.A.dylib 0x26480 objc_exception_throw 2 UIKitCore 0x47cd4c -[UIViewController popoverPresentationController:] 3 UIKitCore 0x47d7c0 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke_2 4 UIKitCore 0x102329c +[UIView(Animation) performWithoutAnimation:] 5 UIKitCore 0x47d720 __63-[UIViewController _presentViewController:animated:completion:]_block_invoke 6 UIKitCore 0x496754 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] 7 UIKitCore 0x492ff0 -[_UIViewControllerTransitionContext _runAlongsideCompletions] 8 UIKitCore 0x492d1c -[_UIViewControllerTransitionContext completeTransition:] 9 UIKitCore 0xfcfee4 -[_UIAfterCACommitBlock run] 10 UIKitCore 0xb3f9c4 _runAfterCACommitDeferredBlocks 11 UIKitCore 0xb2ee90 _cleanUpAfterCAFlushAndRunDeferredBlocks 12 UIKitCore 0xb601e0 _afterCACommitHandler 13 CoreFoundation 0x99c40 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 14 CoreFoundation 0x94270 __CFRunLoopDoObservers 15 CoreFoundation 0x9480c __CFRunLoopRun 16 CoreFoundation 0x93ed0 CFRunLoopRunSpecific 17 GraphicsServices 0x3570 GSEventRunModal 18 UIKitCore 0xb302d0 -[UIApplication _run] 19 UIKitCore 0xb3584c UIApplicationMain 21 libdyld.dylib 0x1140 start

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

2reactions
Mlobaievskyicommented, Nov 15, 2021

I resolved this issue by downgrading react-native-reanimated "^2.3.0-beta.3" -> "^2.2.4"

1reaction
randomBrainstormercommented, Nov 30, 2021

@chris-cornell my issue was fixed by downgrading react-native-reanimated to ^2.2.4. Currently I’m using wix/react-native-navigation version ^7.23.1 and so far I’ve seen this issue only when upgrading react-native-reanimated to its latest version.

Evidently something is breaking modal presentation in certain conditions, coming either from react-native or wix’s react-native-navigation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application tried to present modal view controller on itself
Presenting controller is .' I need to navigate to a page after Authenticating application with firebase to do so I use the above...
Read more >
Tracking down a "Application tried… | Apple Developer Forums
I do have scenarios where a view controller is presented modally, and it could present a UIAlertController, so I thought there might be...
Read more >
App keeps crashing after an alert is presented, not sure what I ...
I'm trying to add an action alert with a Restart and Quit button, ... 'Application tried to present modally an active controller" but...
Read more >
iOS UISearchController crash: Application tried to ... - YouTube
iOS : iOS UISearchController crash: Application tried to present modal view controller on itself [ Beautify Your Computer ...
Read more >
View Controller Presentation Changes in iOS 13
Modal Presentations on iPhone. A form sheet, page sheet or popover presentation on iPhone is adapted to full screen unless a ...
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