react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

[Workaround available] TabController.TabBar crashes on press on iOS w/ RN-Gesture-Handler 2.15.0

Open allynsweet opened this issue 1 year ago • 1 comments

Description

When using a TabController.TabBar on iOS, pressing the tab item results in the app crashing with the following error in XCode:

Thread 1: "-[UITouchesEvent locationInView:]: unrecognized selector sent to instance 0x60000390a7d0"

Related to

  • [X] Components
  • [ ] Demo
  • [ ] Docs
  • [ ] Typings

Steps to reproduce

const [tabItems, setTabItems] = React.useState<TabControllerItemProps[]>([
  { label: "Home" },
]);
  
return (
<TabController items={tabItems} asCarousel={true}>
          <TabController.PageCarousel>
              <TabController.TabPage index={0}>
                <HomeScreen />
              </TabController.TabPage>
            </TabController.PageCarousel>
             <TabController.TabBar />
</TabController>
);

Press on the item in the TabController.TabBar

Expected behavior

TabController should navigate to the pressed tab item.

Actual behavior

App crashes with iOS error:

Thread 1: "-[UITouchesEvent locationInView:]: unrecognized selector sent to instance 0x60000390a7d0"

More Info

Issue does not happen on Android, tested it on iPhone 15 simulator and iPhone 11 physical device.

Environment

  • React Native version: 0.73.6
  • React Native UI Lib version: 7.17.2
  • react-native-gesture-handler: 2.15.0
  • react-native-reanimated: 3.8.0

Affected platforms

  • [ ] Android
  • [X] iOS
  • [ ] Web

allynsweet avatar Mar 12 '24 22:03 allynsweet

Update: This issue only happens when using the latest react-native-gesture-handler 2.15.0 released last month.

Downgrading RN Gesture Handler to 2.14.1 is a workaround

allynsweet avatar Mar 13 '24 14:03 allynsweet

Hi @allynsweet, Currently we aren't working with react-native-gesture-handler 12.15.0, instead we are using version 2.9.0. We are working on upgrading the version to 12.14.1, we will have an update soon follow our release notes.

adids1221 avatar Aug 15 '24 11:08 adids1221