[v4] | BottomSheet not showing when canceling native permissions
Bug
Video: https://github.com/gorhom/react-native-bottom-sheet/assets/35360048/cf5f59c7-a4ae-4ddc-8987-d350d1bb3c4f
https://github.com/gorhom/react-native-bottom-sheet/assets/35360048/ad729fad-3098-41b7-920d-8b87b5b31bc7
The error is that when you cancel the permissions of Location.requestForegroundPermissionsAsync() before the bottom sheet is displayed for the first time, it is not displayed. The problem is that once it fails it is never reset again no matter how many times you re-enter the screen. As shown in the video, it took me a few tries on my Android Samung Galaxy A10.
Environment info
"expo-location": "~16.1.0", "expo-status-bar": "~1.6.0", "@gorhom/bottom-sheet": "^4.6.1", "react-native-screens": "~3.22.0", "react-native-reanimated": "~3.3.0", "@react-navigation/native": "^6.1.14", "react-native-gesture-handler": "~2.12.0", "@react-navigation/native-stack": "^6.9.22", "react-native-safe-area-context": "4.6.3"
Tested on Android Samsung A10
Steps To Reproduce
- Press button to navigate test screen
- Cancel permissions quickly
- Exit screen and repeat until failure, the list is to make performance slower and increase the possibility of failure
Reproducible sample code
https://snack.expo.dev/@martinjaime/bottom-sheet-v4-reproducible-issue-template
@martinj-jaime Because the UI thread is stopped when the permission modal is displayed. You should wait until the gorhom's modal is shown and request permission.
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.
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.
This issue was closed because it has been stalled for 5 days with no activity.