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.

null is not an object (evaluating 'sheetsQueueRef.current[sheetsQueueRef.current.length - 1].ref.current.minimize')

See original GitHub issue

Bug

I’m trying to use BottomSheetModal and it crashes with this error. image

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

  1. Add BottomSheetModalProvider to the root App component.
  2. Use BottomSheetModal on some screen in the app.
  3. 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:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
gorhomcommented, Mar 4, 2021

this should be fixed with v3.3.2 👍

0reactions
BerkeArascommented, Feb 25, 2022

Still the same issue: TypeError: null is not an object (evaluating 'orderModalRef.current.expand') Any ideas, @gorhom? 😅

Read more comments on GitHub >

github_iconTop 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 >

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