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.

App Crash - UIViewControllerHierarchyInconsistency

See original GitHub issue

Bug

When i open the app, it crashes sometimes ( %20 crash rate ) There is no log on console, Flipper can’t catch any error, Only Crashlytics catches the error.

  • Android is working very well.
  • There is no problem on version 3.3.0

Screen Shot 2020-05-05 at 17 21 56

react-native info output:

System:
    OS: macOS 10.15.3
    CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
    Memory: 162.63 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.11.1 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.14.5 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 11.3.1/11C505 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 4.0.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:58 (17 by maintainers)

github_iconTop GitHub Comments

9reactions
cjhinescommented, Jul 30, 2021

This seems to have to reappeared (5.4.0 + iOS).

Screenshot 2021-07-30 at 09 00 48
Exception thrown while executing UI block: A view can only be associated with at most one view controller at a time! View <RCTView: 0x7fe85544df90; reactTag: 7413; frame = (0 0; 0 0); layer = <CALayer: 0x6000002f6180>> is associated with <UIViewController: 0x7fe8550becb0>. Clear this association before associating this view with <UIViewController: 0x7fe854f78b50>.

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
    RCTUIManager.m:1193
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.493
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start
0x0
6reactions
joebochillcommented, Nov 30, 2020

I narrowed down the problem in my case to version 4.1.0.

4.0.1: works as expected 4.1.0: throws the ViewController error above and the app crashes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'UIViewControllerHierarchyInconsistency' thrown when using ...
I spent the day trying to figure out a crash on my app related with a textfield's inputView. I've tried making a test...
Read more >
IOS IMA sdk - Fatal Exception - Google Groups
Crash occurs when mid roll ads play in fullscreen and then when played in PIP. Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency ......
Read more >
a bug about [UINavigationControlle… | Apple Developer Forums
it will crash! crash log: Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<UIViewControllerC: ...
Read more >
iOS : App crashes on IOS 6 - UIViewControllerHierarchyInconsistency
iOS : App crashes on IOS 6 - UIViewControllerHierarchyInconsistency [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] iOS : App crashes ...
Read more >
[Solved]-UIViewControllerHierarchyInconsistency crashes app only ...
Coding example for the question UIViewControllerHierarchyInconsistency crashes app only in iOS 8 and Xcode 6.
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