NSInternalInconsistencyException crashes in 5.4.15
Environment
"react-native-pager-view": "5.4.15", "react-native": "0.66.4",
Description
I saw that https://github.com/callstack/react-native-pager-view/releases/tag/v5.4.15 contained a fix for NSInternalInconsistencyException however I'm still getting production crash reports.
Looks like another user here https://github.com/callstack/react-native-pager-view/pull/530#issuecomment-1096189299 is reporting the same issue.
NSInternalInconsistencyException: Unexpected view controller
Hardware Model: iPhone14,5
Role: Foreground
OS Version: iOS 15.3.1
NSInternalInconsistencyException: Unexpected view controller: <UIViewController: 0x104e25a30>
0 CoreFoundation ___exceptionPreprocess
1 libobjc.A.dylib _objc_exception_throw
2 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
3 UIKitCore -[UIPageViewController queuingScrollView:willManuallyScroll:toRevealView:concealView:animated:]
4 UIKitCore -[_UIQueuingScrollView _notifyDelegateWillManuallyScroll:toRevealView:concealingView:animated:]
5 UIKitCore ___54-[_UIQueuingScrollView _didScrollWithAnimation:force:]_block_invoke
6 UIKitCore -[_UIQueuingScrollView _didScrollWithAnimation:force:]
7 UIKitCore -[_UIQueuingScrollView layoutSubviews]
8 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
9 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
10 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*)
11 QuartzCore CA::Context::commit_transaction(CA::Transaction*, double, double*)
12 QuartzCore CA::Transaction::commit()
13 QuartzCore CA::Transaction::flush_as_runloop_observer(bool)
14 UIKitCore __UIApplicationFlushCATransaction
15 UIKitCore __UIUpdateSequenceRun
16 UIKitCore _schedulerStepScheduledMainSection
17 UIKitCore _runloopSourceCallback
18 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
19 CoreFoundation ___CFRunLoopDoSource0
20 CoreFoundation ___CFRunLoopDoSources0
21 CoreFoundation ___CFRunLoopRun
22 CoreFoundation _CFRunLoopRunSpecific
23 GraphicsServices _GSEventRunModal
24 UIKitCore -[UIApplication _run]
25 UIKitCore _UIApplicationMain
NSInternalInconsistencyException: Don't know about flushed view
https://stackoverflow.com/questions/42833765/assertion-failure-in-uipageviewcontroller https://github.com/iospro/AMPageViewController
Hardware Model: iPhone9,3
Role: Foreground
OS Version: iOS 15.2.1
NSInternalInconsistencyException: Don't know about flushed view <RCTView: 0x10d472760; reactTag: 3113; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x2804a47c0>>
0 CoreFoundation ___exceptionPreprocess
1 libobjc.A.dylib _objc_exception_throw
2 Foundation -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
3 UIKitCore -[UIPageViewController _flushViewController:animated:]
4 UIKitCore -[UIPageViewController queuingScrollView:didFlushView:animated:]
5 UIKitCore -[_UIQueuingScrollView _flushView:animated:]
6 UIKitCore -[_UIQueuingScrollView _replaceViews:updatingContents:adjustContentInsets:animated:]
7 UIKitCore -[_UIQueuingScrollView _didScrollWithAnimation:force:]
8 UIKitCore -[_UIQueuingScrollView layoutSubviews]
9 UIKitCore -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
10 QuartzCore CA::Layer::layout_if_needed(CA::Transaction*)
11 QuartzCore CA::Layer::layout_and_display_if_needed(CA::Transaction*)
12 QuartzCore CA::Context::commit_transaction(CA::Transaction*, double, double*)
13 QuartzCore CA::Transaction::commit()
14 QuartzCore CA::Transaction::flush_as_runloop_observer(bool)
15 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
16 CoreFoundation ___CFRunLoopDoObservers
17 CoreFoundation ___CFRunLoopRun
18 CoreFoundation _CFRunLoopRunSpecific
19 GraphicsServices _GSEventRunModal
20 UIKitCore -[UIApplication _run]
21 UIKitCore _UIApplicationMain
same here
running into same issue, on 5.4.9. Going to try and upgrade to 5.4.10 to see if that resolves it.
Issue still occurs on v6.0.1.
Seems to still occur on v6.2.1
Same here:
"react-native-pager-view": "6.1.2", "react": "18.2.0", "react-native": "0.71.1",
NSInternalInconsistencyException No view controller managing visible view <RCTView: 0x115cfbd60; reactTag: 30859; frame = (0 0; 363.667 1320); autoresize = W+H; layer = <CALayer: 0x2821007a0>>
Seem to existe when I have pager view into a scroll view but not sur, complex to log anything no crash in emulator
Any advise for debugging / fixing this?
Still an issue on 6.2.2