question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BottomSheetModal crashes app when closed with Back Button

See original GitHub issue

Bug

Hello, I came across a Bug while working with the Backbutton and BottomSheetModal. When the BottomSheetModal ist open and extended, and the user navigates back to the previous screen with the Back Button, while the Modal is extended, the BottomSheetModal can not be opened again after navigation back to the second screen. In porduction mode, I get the error Cannot read property 'minimize' of null, and Maximum call stack size exceeded (native stack depth).h. Also, look here: https://github.com/gorhom/react-native-portal/issues/15#issuecomment-850577091

Environment info

Library Version
@gorhom/bottom-sheet ^3.6.5 && 4.0.0-alpha.11
react-native 0.63
react-native-reanimated ^2.1.0
react-native-gesture-handler ~1.10.2

Steps To Reproduce

Describe what you expected to happen:

  1. The Modal should be able to open itself again.
  2. No crashes

Reproducible sample code

I was able to reproduce the bug in Expo Snack. Here is the Link: Expo Snack Reproductible Sample Code

https://user-images.githubusercontent.com/61253912/120039688-9f9a6f80-c005-11eb-8ccd-82ed21c88ee5.mp4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
theMasixcommented, Jan 9, 2022

I have this issue on v2.4.1. Is there any solution to fix the issue in this version? @gorhom @alexco2

3reactions
alexco2commented, Jun 10, 2021

I was able to reproduce the error in dev mode with the latest version alpa 11. Most of the time, after using the back button when the Bottom Sheet modal is open, the Sheet can not be opened again. Sometimes I also get this error.

alpha 11 error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bottom Sheet doesn't close when navigating to different screen
There are few ways to do it. Here are two: Add useFocusEffect that runs when your screen with BottomSheetModal is unfocused:.
Read more >
How to Fix App Not Close When Press Back Button in Android
Some app will not close properly when you press back button in android devices, it will run in background and slow down your...
Read more >
Changelog | ArcGIS Hub
Once new content is uploaded, the three buttons that appear ("View Content," "Return to Content Library," and "Open in ArcGIS Online") now use...
Read more >
A React Native Bottom Sheet with Fully Configurable Options
A performant interactive bottom sheet with fully configurable options A React Native Bottom Sheet with Fully Configurable Options.
Read more >
August | 2018 | SAP Fiori for Android Design Guidelines
The filter dialog is triggered by tapping on the filter icon on the app bar. ... Replace the “close” icon with the “back”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found