[v4] | BottomSheetModal is not working on some Android phones
Bug
As mentioned in this automatically closed issue: https://github.com/gorhom/react-native-bottom-sheet/issues/1819. On some Android phones bottom sheet modal is not visible. For now, 3 users reported that issue. List of their devices:
- Xiaomi Mi 9T (Android 13)
- Xiaomi Mi 9T Pro
- Samsung A72
We have tried to reproduce this issue on Browserstack (using Xiaomi Note 8 Android 9), but everything worked correctly.
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 4.5.1 |
| react-native | 0.74.2 |
| react-native-reanimated | 3.10.1 |
| react-native-gesture-handler | 2.16.2 |
Steps To Reproduce
- Create the basic bottom sheet modal with visible variable (initial value false)
- Change the value to "true"
- Modal is not visible - nothing changes in the app
Describe what you expected to happen:
The bottom sheet modal is visible on all Android phones.
Reproducible sample code
Code for the Bottom sheet modal that we are using:
<BottomSheetModal
ref={bottomSheetModalRef}
handleComponent={null}
onDismiss={onClose}
onChange={handleSheetPositionChange}
backdropComponent={props => (
<BottomSheetBackdrop {...props} opacity={0.2} disappearsOnIndex={-1} appearsOnIndex={0} />
)}
backgroundStyle={{ borderRadius: 24 }}
visible={visible}
onClose={onClose}
snapPoints={[410]}
/>
same problem with me. I have Xiaomi red mi note 10 5G (Android 13). And bottomsheets was working after i got apk build, bottomsheets does not working on my device too. So i change the package i am using react-native-actions-sheet its working but now its not working too in release(apk) mode (issue). Also react-native-modals package not working on release (apk) mode too.
I have already enabled android > gradle.properties
newArchEnabled=true. I tihnk this is causing the packages problems. It can be general problem i think.
Hi @OFD16, I fixed my issue using the solution mentioned in this comment: https://github.com/gorhom/react-native-bottom-sheet/issues/807#issuecomment-1160423008, maybe it will help in your case as well
@MarchewkaMatthew I'm not having luck with that patch. Are you on the latest 4.x? or what version are you on? Isn't that only about the backdrop? Seems like it only makes sure that the backdrop isn't blocking when it shouldn't. I'm having an issue on Android where the BackDropModal just never shows up on pixel devices.
@MarchewkaMatthew I'm not having luck with that patch. Are you on the latest 4.x? or what version are you on? Isn't that only about the backdrop? Seems like it only makes sure that the backdrop isn't blocking when it shouldn't. I'm having an issue on Android where the BackDropModal just never shows up on pixel devices.
Did you enabled newArch for android @tslater ?
@tslater here are my versions:
"@gorhom/bottom-sheet": "^4.6.3",
"expo": "~51.0.19",
"react-native": "0.74.3",
"react-native-reanimated": "~3.10.1",
I don't have new architecture enabled. It indeed only changes the behavior of the backdrop component, not the whole modal - in my case, the backdrop was blocking the whole modal from rendering (the first step in my investigation was removing the backdrop which resulted in working modal on all Android phones).
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.
This issue was closed because it has been stalled for 5 days with no activity.