terminating with uncaught exception of type folly::json::parse_error: folly::toJson: JSON object value was a NaN or INF
See original GitHub issueBug
I updated to v3 and I am using BottomSheetSectionList. I experience crashes when scrolling to top position of the bottomSheet, and the error is
libc++abi.dylib: terminating with uncaught exception of type folly::json::parse_error: folly::toJson: JSON object value was a NaN or INF
terminating with uncaught exception of type folly::json::parse_error: folly::toJson: JSON object value was a NaN or INF
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 3.0.2-alpha.2 |
| react-native | 0.63.3 |
| react-native-reanimated | 2.0.0-rc.1 |
| react-native-gesture-handler | 1.9.0 |
Steps To Reproduce
<BottomSheet
// ref={sheetRef}
backgroundComponent={() => (
<View style={{ backgroundColor: COLORS.THEME.MODAL_DARK }} />
)}
handleComponent={() => (
<View style={{ backgroundColor: COLORS.THEME.TRANSPARENT, alignItems: 'center' }}>
<View
style={{
width: 40,
borderTopWidth: 5,
borderTopColor: '#979797',
borderRadius: 6,
marginBottom: 5,
backgroundColor: COLORS.THEME.MODAL_DARK,
}}
/>
</View>
)}
snapPoints={snapPoints}>
<BottomSheetSectionList
style={styles.scrollBottomSheet}
sections={
moments.length === 0 && closedMoments.length === 0 ? [] : (sections as any)
}
stickySectionHeadersEnabled
ref={ref}
keyExtractor={(item, index) => `${index} ${item}`}
renderSectionHeader={renderSectionHeader}
onEndReached={() => fetchNextClosedMoments()}
onEndReachedThreshold={1}
ListEmptyComponent={() => <EmptyState />}
renderItem={renderItem}
showsVerticalScrollIndicator={false}
ListHeaderComponent={cardOverlay}
ListFooterComponent={loadingFooter}
/>
</BottomSheet>
- Explain the steps we need to take to reproduce the issue: –>
- Scroll and go to top position of the bottom sheet
- Drag the bottom sheet several times, and try also to do it slowly, from the top position, scroll down and then up, and change snapPoint to the lowest one(default position of the bottom sheet).
- The application crashes with the exception described above. Does not happen always.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
No results found
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 Free
Top 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

Same issue here on
@gorhom/bottom-sheet 3.6.4andreanimated 2.1.0I have one bottom sheet that gets this crash pretty consistently when I wiggle it around
found it, it seems that it occurs out of this library implementation, however i’ll spend time to investigate it and have better answer and hopefully fix it 👍
thanks @gudberg again for spending the time to reproduce it.