Skip to content

FlashList crashes with TypeError on Android 14 when using sticky headers #2289

Description

@subchat

Bug Report

Version: 1.7.3
Platform: Android 14 (API 34)
React Native: 0.74.1

Description

FlashList throws TypeError: Cannot read property "height" of undefined when stickyHeaderIndices is used alongside estimatedItemSize on Android 14. Works fine on Android 13 and iOS.

Steps to Reproduce

  1. Set stickyHeaderIndices={[0]}
  2. Set estimatedItemSize={80}
  3. Scroll rapidly to bottom on Android 14 emulator
  4. Observe crash

Crash Log

TypeError: Cannot read properties of undefined (reading "height")
  at RecyclerView.updateLayout (RecyclerView.tsx:234)
  at FlashList._onLayout (FlashList.tsx:412)

Expected

Smooth scroll with sticky header pinned at top.

Actual

Crash on first scroll gesture.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions