null is not an object (evaluating 'sheetsQueueRef.current[sheetsQueueRef.current.length - 1].ref.current.minimize')
See original GitHub issueBug
I’m trying to use BottomSheetModal and it crashes with this error.
Environment info
Library | Version |
---|---|
@gorhom/bottom-sheet | 3.3.1 |
react-native | 0.63.4 |
react-native-reanimated | 2.0.0-rc0 |
react-native-gesture-handler | 1.10.0 |
typescript | 4.1.5 |
Steps To Reproduce
- Add BottomSheetModalProvider to the root App component.
- Use BottomSheetModal on some screen in the app.
- Go to that screen and present/dismiss BottomSheetModal a couple of times, then go back to previous screen and return back to screen with BottomSheetModal and it crashes.
Code
const SNAP_POINTS = [260];
<BottomSheetModal
ref={bottomSheetModalRef}
index={0}
snapPoints={SNAP_POINTS}
handleComponent={BottomSheetHandle}
backdropComponent={BottomSheetBackdrop}
backgroundComponent={BottomSheetBackground}
onDismiss={onDismiss}
>
...
</BottomSheetModal>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[v2] null is not an object (evaluating 'sheetsQueueRef.current ...
[v2] null is not an object (evaluating 'sheetsQueueRef.current[sheetsQueueRef.current.length - 1].ref.current.minimize') #323.
Read more >null is not an object (evaluating 'filed2.current.focus')] - Stack ...
I'm trying to focus on the next input field whenever the next button is pressed on the keyboard. From the react native documentation...
Read more >useRef "Object is possibly null" error in React [Solved]
TypeScript knows that the current property on the ref object does not store a null value once we enter the if block. Make...
Read more >RN: Android app crash - null is not an object (evaluating 'u ...
Introduced in 1.20. Reported in Sentry. Stack trace. TypeError: null is not an object (evaluating 'u.flatListRef.current.scrollToOffset')
Read more >React Native. undefined is not an object (evaluating '_this ...
My code is pretty simple and the trace obviously points to SectionList being the problem. Copy Code return ( <View style={{ flex:1, backgroundColor: ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this should be fixed with
v3.3.2
👍Still the same issue:
TypeError: null is not an object (evaluating 'orderModalRef.current.expand')
Any ideas, @gorhom? 😅