callstack / callstack/react-native-pager-view

NSInternalInconsistencyException - Duplicate states in queue

Open
#1,061 4 comments 8 reactions 0 assignees View on GitHub
Resolution: Needs Repro
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

## Environment

react native : 0.81.6
react-native-pager-view : ^6.9.1
react-native-tab-view : 4.2.2

## Platform
ios

## Description

App with react native tab view crash in ios only

```
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0xc5964 __exceptionPreprocess
1 libobjc.A.dylib 0x31814 objc_exception_throw
2 Foundation 0x906b08 _userInfoForFileAndLine
3 UIKitCore 0xc09fb8 -[_UIQueuingScrollView _enqueueCompletionState:]
4 UIKitCore 0xc0a28c -[_UIQueuingScrollView _enqueueAnimatedScrollInDirection:withView:completion:]
5 UIKitCore 0xc0b148 -[_UIQueuingScrollView setView:direction:animated:completion:]
6 UIKitCore 0xbfde90 -[UIPageViewController _setViewControllers:withScrollInDirection:animated:completion:]
7 UIKitCore 0xbfe044 -[UIPageViewController setViewControllers:direction:animated:completion:]
8 TimHortons 0x117636c -[RNCPagerViewComponentView setPagerViewControllers:direction:animated:] + 230 (RNCPagerViewComponentView.mm:230)
9 TimHortons 0x1175f90 RCTRNCViewPagerHandleCommand + 43 (RCTComponentViewHelpers.h:43)
10 TimHortons 0x957e64 -[RCTMountingManager synchronouslyDispatchCommandOnUIThread:commandName:args:] + 335 (RCTMountingManager.mm:335)
11 libdispatch.dylib 0x1adc _dispatch_call_block_and_release
12 libdispatch.dylib 0x1b7fc _dispatch_client_callout
13 libdispatch.dylib 0x38b10 _dispatch_main_queue_drain.cold.5
14 libdispatch.dylib 0x10ec8 _dispatch_main_queue_drain
15 libdispatch.dylib 0x10e04 _dispatch_main_queue_callback_4CF
16 CoreFoundation 0x6a2b4 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
17 CoreFoundation 0x1db3c __CFRunLoopRun
18 CoreFoundation 0x1ca6c _CFRunLoopRunSpecificWithOptions
19 GraphicsServices 0x1498 GSEventRunModal
20 UIKitCore 0x9ddf8 -[UIApplication _run]
21 UIKitCore 0x46e54 UIApplicationMain
22 UIKitCore 0x172820 -[UIScrollView contentInset]
23 TimHortons 0x4f64 main (AppDelegate.swift)
24 ??? 0x1941d6e28 (Missing)
```

Image

## Reproducible Demo

```

const renderTabBar = props => (

);

const renderTabBarLabel = ({_route, labelText, focused}) => (

{labelText}

);




```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.