react-native-bottom-sheet icon indicating copy to clipboard operation
react-native-bottom-sheet copied to clipboard

[v4] | Bottom sheet doesn't show in release mode on android 8

Open vladimir-vucetic opened this issue 1 year ago • 31 comments

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;

vladimir-vucetic avatar Oct 11 '23 20:10 vladimir-vucetic

I'm facing this issue too. But the first time installing and launching the app. The bottom sheet will disappear, often happens on Android devices.

trungledangAxonActive avatar Oct 13 '23 10:10 trungledangAxonActive

same here

joacub avatar Oct 16 '23 22:10 joacub

Facing the same issue here

Risina avatar Oct 18 '23 07:10 Risina

Also observed on a device running Android 10, I think it's related to https://github.com/gorhom/react-native-bottom-sheet/issues/1560

nihilenz avatar Oct 18 '23 12:10 nihilenz

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

sommcz avatar Oct 24 '23 07:10 sommcz

Anyone solve this yet? We are facing the same thing.

codeSupreme avatar Nov 10 '23 21:11 codeSupreme

Facing the same issue, except I did not enable reduce animation on my device 😢

    "@gorhom/bottom-sheet": "^4.5.1",
    "expo": "~49.0.8",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-reanimated": "~3.3.0",

tcdw avatar Nov 26 '23 09:11 tcdw

I'm facing the same issue.

mmkhmk avatar Dec 05 '23 08:12 mmkhmk

Same issue. Very inconsistent behaviour of the bottom-sheet showing only one time out of 5.

Marcados avatar Dec 12 '23 10:12 Marcados

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.

github-actions[bot] avatar Jan 12 '24 09:01 github-actions[bot]

not stale

nihilenz avatar Jan 12 '24 13:01 nihilenz

Same issue here

emanusantos avatar Jan 25 '24 12:01 emanusantos

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

Andrey123815 avatar Feb 17 '24 07:02 Andrey123815

Same issue here

anastasesg avatar Mar 04 '24 13:03 anastasesg

This worked for me

const reducedMotion = useReducedMotion();

animateOnMount={!reducedMotion}

iusama46 avatar Mar 08 '24 06:03 iusama46

Facing the same issue, except I did not enable reduce animation on my device 😢

    "@gorhom/bottom-sheet": "^4.5.1",
    "expo": "~49.0.8",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-reanimated": "~3.3.0",

Same for me on Android. No expo. No reduced motion enabled.

snicro avatar Mar 09 '24 14:03 snicro

same also

next6leo avatar Mar 19 '24 07:03 next6leo

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.

github-actions[bot] avatar Apr 18 '24 09:04 github-actions[bot]

not stale

nihilenz avatar Apr 18 '24 09:04 nihilenz

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.

github-actions[bot] avatar May 19 '24 09:05 github-actions[bot]

not stale

nihilenz avatar May 20 '24 22:05 nihilenz

facing same issue on Android, on IOS all works good. RN - 0.73.4, expo - 50.0.11

geikobogdan avatar Jun 01 '24 07:06 geikobogdan

I'm having the same issue on android, the bottom sheet won't show at all, works perfectly on ios.

"expo": "~51.0.14",
"react-native-gesture-handler": "^2.16.2",
"@gorhom/bottom-sheet": "^4.6.3",
"react-native-reanimated": "~3.10.1",

The4star avatar Jun 16 '24 03:06 The4star

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.

github-actions[bot] avatar Jul 16 '24 09:07 github-actions[bot]

not stale

nihilenz avatar Jul 16 '24 09:07 nihilenz

anyone have a solution ?

imraann00 avatar Aug 01 '24 13:08 imraann00

My solution was to use the bottom sheet on ios and go with a seperate custom modal on android.

The4star avatar Aug 02 '24 01:08 The4star