-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Crash - UIViewControllerHierarchyInconsistency #167
Comments
It is strange, that iOS fixes does not work for you. You can checkout changelog here: Could you provide reproducible example code ? @krystiansliwa have you got any ideas ? |
Extra info: |
+1 |
I have the same issue. |
@troZee I can't provide any reproducible example right now, i have to create a new project for this |
@Farad4y Now as workaround. You can fix it locally using patch-package.
No worries :D I am waiting for reproducible example |
This error happens for us with screens that have multiple carousels. The suggested patch fixed the issue. |
@genglei01 @Inexpressible Could you provide example project? My project that crashes is very big, so i can't simplified it |
We have the same issue, but not reproducible from our project too. I will try on @Farad4y solutions first. |
I had the same issue and @Farad4y patch fixed it. Here is the patch created using patch-package:
|
Is there any release schedule for this bug? |
I will merge and release it, once someone provides me an example to test it. |
In my case the crash occurred 10% of the times this component was mounted (stats from Firebase), so it's difficult to track and make an example that always crashes. |
There may be a race condition causing this crash.
In The @Farad4y 's patch fixes the issue because |
+1 on this issue, even on version |
It has been resolved here #189 in 4.1.0 version. |
Has this been really fixed? Making sure before I upgrade my library. @RodrigoSosa95 ? |
I'm facing the same problem. I'll try to upgrade the version and see if it's fixed. |
Also faced the same problem. omg i hope this fixes. Have upgraded to "@react-native-community/viewpager": "^4.1.3", and will monitor |
I reopening this issue, because bug still exist |
Yes i'm getting the same error. But this time, it's not (randomly) killing the app completely, just consistently throwing an error. My current unglamorous workaround to fix the race condition is to set a timeout on the setPage as i think its having a race condition on the list in the state that is referred in the viewpager:
My viewpager code
|
I narrowed down the problem in my case to version 4.1.0. 4.0.1: works as expected |
I confirm that 4.0.1 is also working on my end. Thank you! Saved me a lot of time figuring out a fix. |
This seems to have to reappeared (5.4.0 + iOS).
|
In addition to above reply, I also have the same error with IOS 13.7 |
I was trying to reproduce using below code:
and I was not able to do that |
this issue still persists in 5.4.0. Am using it as a dependency of Here is the error: Exception thrown while executing UI block: A view can only be associated with at most one view controller at a time! View <RCTView: 0x7fe9ef208a00; reactTag: 313; frame = (0 0; 0 0); clipsToBounds = YES; layer = <CALayer: 0x600001061760>> is associated with <UIViewController: 0x7fe9ed45ed30>. Clear this association before associating this view with <UIViewController: 0x7fe9ed656d70>. __44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke |
Downgrading to Something else that I notice, is that this bug seems to happen when the app is cold. I never had it randomly, only when I opened the app for the first time after a while. |
Seems so. For me, the apps runs well on first start, but the error shows when i restart the RN Bundler or when i close and reopen the app on the simulator. let me try downgrade to 4.2.4 |
I found workaround for that issue, delay rendering |
Downgrading works for me as well. |
Yes, i can confirm the same. either version 4.2.4 or 5.3.3 ... they both work, so i went with 5.3.3 |
Worked for me with a combination between delaying the render with 50ms and downgrade to 5.3.0 😿 |
Can anyone test this code ? #432 Instructions:
|
I tested. Looks no crash (it not 100% reproducable for me so tested 6 times without errors). But I can't change page by gesture with this code. |
Thank you for the replay. I am on it. |
@Bardiamist |
LGTM. Tested 5 times without crash. Gesture was fixed. |
Thank you for cooperation. Before the merge, I will wait for the other developers. |
This issue has been fixed here: https://github.com/callstack/react-native-pager-view/releases/tag/v5.4.1 |
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.
react-native info
output:Library version: 4.0.0
The text was updated successfully, but these errors were encountered: