Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] | Bottom Sheet does not open when Debug with Chrome is enabled #1447

Closed
kgtrey1 opened this issue Jul 17, 2023 · 4 comments
Closed

[v4] | Bottom Sheet does not open when Debug with Chrome is enabled #1447

kgtrey1 opened this issue Jul 17, 2023 · 4 comments
Labels
bug Something isn't working no-issue-activity

Comments

@kgtrey1
Copy link

kgtrey1 commented Jul 17, 2023

Bug

When turning on "debug with chrome", the bottom sheet doesn't open at all. When it's not turned on, everything is working as expected.

Environment info

Library Version
@gorhom/bottom-sheet 4.4.7
react-native 0.71.11
react-native-reanimated 3.3.0
react-native-gesture-handler 2.12.0

Steps To Reproduce

  1. Turn on debug with chrome option during development

Describe what you expected to happen:

When turning on debug with chrome, the bottom sheet should open

Reproducible sample code

`
const OngoingTripMapScreen: React.FC = (): JSX.Element => {
const mapRef = React.useRef(null)
const bottomSheetRef = React.useRef(null)

const styles = Style()

const snapPoints = React.useMemo(() => ['95%'], [])

const onPressSettings = React.useCallback(() => {
    bottomSheetNavigation({ name: MapBottomSheetScreens.SETTINGS_SCREEN })
    bottomSheetRef.current?.snapToIndex(0)
}, [])

const onPressPicture = React.useCallback(() => {
    bottomSheetNavigation({ name: MapBottomSheetScreens.PICTURE_SCREEN })
    bottomSheetRef.current?.snapToIndex(0)
}, [])

const onPressPublish = React.useCallback(() => {}, [])

const resetPosition = React.useCallback((position: LatLng) => {
    mapRef.current?.animateToRegion({
        latitude: position.latitude,
        longitude: position.longitude,
        latitudeDelta: 0.5,
        longitudeDelta: 0.5,
    })
}, [])

return (
    <View style={styles.container}>
        <MapView ref={mapRef} provider="google" style={styles.map} showsUserLocation={true} />
        <BackButton />
        <GpsButton onData={(position) => resetPosition(position)} />
        <Menu
            onPressPublish={onPressPublish}
            onPressPicture={onPressPicture}
            onPressSettings={onPressSettings}
        />
        <BottomSheet
            index={-1}
            ref={bottomSheetRef}
            snapPoints={snapPoints}
            enablePanDownToClose
        >
            <MapBottomSheetNavigator />
        </BottomSheet>
    </View>
)

}
`

@kgtrey1 kgtrey1 added the bug Something isn't working label Jul 17, 2023
@kgtrey1 kgtrey1 changed the title [v4] | [v2] Issue title [v4] | Bottom Sheet does not open when Debug with Chrome is enabled Jul 17, 2023
@github-actions
Copy link

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.

@hemant9793
Copy link

hemant9793 commented Aug 21, 2023

@kgtrey1 Bottom Sheet does not open when chrome debugging is enabled because this library relies on React Native Reanimated thus we have to add React Native Reanimated in our app and in v2 of React Native Reanimated it is clearly mentioned in Known problems and limitations that remote debugging is no longer possible in 2.x.
Screenshot 2023-08-21 at 2 00 25 PM
Link for the same - https://docs.swmansion.com/react-native-reanimated/docs/2.x/

This issue persist in RNReanimated 3.x as well but only upto 3.3.0

This issue has been resolved in RN-reanimated 3.x from v3.4.0 and above.

While adding RNReanimated during the installation of gorhom/BottomSheet add RNReanimated v3.4.0 and above in package.json and then rebuild.

@github-actions
Copy link

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
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

2 participants