You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently upgraded a React Native app to Expo 56, and as part of that refactoring we switched from react-native-pager-view to PagerView from @expo/ui. This new component behaves differently than the prior component, and we quickly noticed that after the change our screens that contained a <Channel> on one of the pages required triggering back on Android twice before the screen would return to the previous screen.
After several hours of debugging we isolated the problem to AttachmentPicker. It contains a back handler that seemingly always intercepts the first back request, (at least when used on a PagerView, I'm not sure yet if that is related or not).
From a machine configured to build and debug React Native on Android, EXPO_PUBLIC_STREAM_API_KEY=your_stream_key yarn android
Tap the Open Pager button
Initiate a back gesture
Observe that the system does not pop your navigation stack and return you to the apps home screen
Expected behavior
When a <Channel> is included anywhere in the view hierarchy and the AttachmentPicker's bottom sheet is not open the back event should never be consumed by Stream's SDK but instead be allowed to propagate up the stack to the parent handler.
Project Related Information
Customization
Click To Expand
Nothing was customized, using purely out-of-the-box components
Offline support
I have enabled offline support. - [ ] The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)
stream-chat-react-native version you're using that has this issue:
9.3.0
Device/Emulator info:
I am using a physical device
OS version: Android 16 and Android 17
Device/Emulator: Pixel 10 Pro Fold
Additional context
The @expo/ui is fully built on top of Jetpack Compose and there have been other issues with event propagation such as expo/expo#46623 so I can't entirely rule out it being something weird there. But I left several breadcrumbs on the repro's README that seem to indicate an actual logic bug in AttachmentPickerhttps://github.com/vanstinator/expo-ui-pagerview-back-bug/blob/main/README.md
Issue
Describe your issue here
I recently upgraded a React Native app to Expo 56, and as part of that refactoring we switched from
react-native-pager-viewtoPagerViewfrom@expo/ui. This new component behaves differently than the prior component, and we quickly noticed that after the change our screens that contained a<Channel>on one of the pages required triggeringbackon Android twice before the screen would return to the previous screen.After several hours of debugging we isolated the problem to
AttachmentPicker. It contains a back handler that seemingly always intercepts the first back request, (at least when used on aPagerView, I'm not sure yet if that is related or not).Steps to reproduce
Steps to reproduce the behavior:
EXPO_PUBLIC_STREAM_API_KEY=your_stream_key yarn androidOpen PagerbuttonbackgestureExpected behavior
When a
<Channel>is included anywhere in the view hierarchy and theAttachmentPicker's bottom sheet is not open the back event should never be consumed by Stream's SDK but instead be allowed to propagate up the stack to the parent handler.Project Related Information
Customization
Click To Expand
Nothing was customized, using purely out-of-the-box components
Offline support
- [ ] The feature I'm having does not occur when offline support is disabled. (stripe out if not applicable)Environment
Click To Expand
I've included a full working reproduction at https://github.com/vanstinator/expo-ui-pagerview-back-bug
package.json:# N/Areact-native infooutput:stream-chat-react-nativeversion you're using that has this issue:9.3.0Android 16 and Android 17Pixel 10 Pro FoldAdditional context
The
@expo/uiis fully built on top of Jetpack Compose and there have been other issues with event propagation such as expo/expo#46623 so I can't entirely rule out it being something weird there. But I left several breadcrumbs on the repro's README that seem to indicate an actual logic bug inAttachmentPickerhttps://github.com/vanstinator/expo-ui-pagerview-back-bug/blob/main/README.mdThere's also this block that is suspect 😅 https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/components/AttachmentPicker/AttachmentPicker.tsx#L133-L137
Screenshots
screen-20260609-134848-1781027312907.mp4.2.mp4
Click To Expand