react-native-bottom-sheet: [v4] | Bottom sheet doesn't show in release mode on android 8
Bug
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 4.5.1 |
react-native | 0.72.3 |
react-native-reanimated | ~3.3.0 |
react-native-gesture-handler | ~2.12.0 |
Steps To Reproduce
I use expo 49.
I implemented bottom sheet by code bellow.
I test in debug mode on android 8 and it work fine.
When I build app with --variant=release
bottom sheet doesn’t show up anymore and when I press action to open it I can’t press anything else on the screen any more.
Describe what you expected to happen: To work on android in release mode
Reproducible sample code
import { BottomSheetBackdrop, BottomSheetModal, BottomSheetModalProvider } from "@gorhom/bottom-sheet";
const ProfileSpaceScreen: React.FC<Props> = ({ route }) => {
const bottomSheetRef = useRef<BottomSheetModal>(null);
const snapPoints = useMemo(() => ["80%"], []);
return (
<BottomSheetModalProvider>
<AppHeader />
<View style={[styles.container, styles.content]}>{renderContent()}</View>
<BottomSheetModal
backdropComponent={(props) => <BottomSheetBackdrop {...props} appearsOnIndex={0} disappearsOnIndex={-1} />}
ref={bottomSheetRef}
index={0}
snapPoints={snapPoints}
>
<View>
<UserReviews />
</View>
</BottomSheetModal>
</BottomSheetModalProvider>
);
}
export default ProfileSpaceScreen;
About this issue
- Original URL
- State: open
- Created 9 months ago
- Reactions: 7
- Comments: 19
This worked for me
const reducedMotion = useReducedMotion();
animateOnMount={!reducedMotion}
Facing the same issue, except I did not enable reduce animation on my device 😢
I also encountered such a problem at react native expo after updating to version 49, and only on Android and only in pro mode (everything works fine in dev via Expo Go). On ios, everything works out as it should
not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Same issue here
I have the same problem on Android 13 with reduced animation setting.
“react-native-reanimated”: “3.5.4” “@gorhom/bottom-sheet”: “4.5.1”
Fixed with this solution: https://github.com/gorhom/react-native-bottom-sheet/issues/1560#issuecomment-1750466864
Also observed on a device running Android 10, I think it’s related to https://github.com/gorhom/react-native-bottom-sheet/issues/1560
not stale
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Same issue. Very inconsistent behaviour of the bottom-sheet showing only one time out of 5.