wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.46k stars 707 forks source link

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

Closed allynsweet closed 1 month ago

allynsweet commented 6 months ago

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

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

Affected platforms

allynsweet commented 6 months ago

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

adids1221 commented 1 month ago

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.