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.

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

See original GitHub issue

Bug

Environment info

Library Version
@gorhom/bottom-sheet 2.2.2
react-native 0.63.4
react-native-reanimated 1.13.2
react-native-gesture-handler 1.10.3

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.

Same as #292

Describe what you expected to happen:

  1. No crash

Reproducible sample code

<BottomSheetModal
  ref={ref}
  snapPoints={[500]}
  backgroundComponent={() => <View />}
  backdropComponent={BottomSheetBackdrop}
  handleComponent={() => <View />}
  index={0}
  onChange={() => {}}
  onDismiss={() => {}}
>
  // ...
</BottomSheetModal>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
braincorecommented, Mar 4, 2021

Just tried this library today and immediately ran into this issue as well. My setup is almost identical to yours. A simple reproduction is to simply have two modals mounted at the same time.

I’m guessing that there’s an issue with the StackBehavior logic which the docs say isn’t implemented for v2 (though what the v2 behavior should be is unclear).

0reactions
chintanbawacommented, Nov 19, 2021

Hi @Yonom, Did you fix this issue for iOS?

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Troubleshooting | React Navigation
These issues may or may not be related to React Navigation itself. ... I'm getting an error "null is not an object (evaluating...
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 >
Refs and the DOM - React
When the ref attribute is used on a custom class component, the ref object receives the mounted instance of the component as its...
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