ReactNative 0.43-rc.2 FlatList -- Tried to get frame for out of range index 0

tried to get frame for out of range index nan sectionlist
invariant violation index out of range 0
react native flatlist
react-native flatlist scroll to index
react-native flatlist onscroll
react native flatlist onpress
flatlist getitemlayout
tried to remove non existent frame callback

I have a question specific to 0.43-rc.2 I migrated a ListView to a FlatList, and I now get the following error:

TaskQueue: Error with task: Tried to get frame for out of range index 0

which originates form the VirtualizedList class.

If I ignore the error, the list seems to work fine, so I'm really at a loss as to what is wrong.

I can't seem to find any information on why this would happen. Any suggestions?


It looks like this only happens when the array passed to FlatList is empty. I was able to get around this by replacing the list with a View in the case that the data was empty.

Invariant Violation: Tried to get frame for out of range index , Hello I'm getting error in FlatList after update in Real Time (Socket.io) from server message, it was working but no Could be the version of React Native? ▽​Invariant Violation: Tried to get frame for out of range index Na Projects 0 +​1 29 smile 2 tada 6 heart 4. @GuoYingxu. Copy link. Quote reply  Tried to get frame for out of range index Infinity [iOS] More over, this bug only happens during production or debugger is off, so can't reproduce it with the debugger making it so much harder to guess. I tried all the related solutions, with no luck.


This happened to me when I had debug={true}. Removing that fixed it for me.

Flatlist gives error first time · Issue #18641 · facebook/react-native , Hi there, I have a weird error when trying to view the flatlist for the first time. Let me explain. Error with task : Invariant Violation: Tried to get frame for out of range index NaN. But when I react: ^16.3.0-rc.0 => 16.3.0-rc.0 react-native: react-native-bot added the Ran Commands label on Apr 2, 2018. 17 ReactNative 0.43-rc.2 FlatList — Tried to get frame for out of range index 0 Mar 17 '17 10 ReactNative 0.43-rc.2 FlatList — Tried to get frame for out of range index 0 Mar 17 '17 8 Using NODE_ENV with multiple environments in JavaScript projects Mar 1 '17


Just make sure you are always passing an array to flatlist

This error will come when you are not passing an array in data property of flatlist. Just pass an empty array to flatlist when there's no data rather than empty object or null.

invariant violation: tried to get frame for out of range index , invariant violation: tried to get frame for out of range index NaN ( This error is const [items, setItems] = useState([ {id:1, text:'Milk'}, {id:2, text:'MilkyBar'}, {id:3, Some people have had this error when the data prop passed to the flatlist is not an The Youtube Iframe API for react native (recently updated with expo support​!!) [ Natty] jenkins Using an enum loaded from another Groovy file (Jenkins Pipeline issue) By: Marcelo Salazar 3.0; [ Natty ] pdf How to create CMYK color seperation combinations using GhostScript By: Julian Antonucci 5.5


This could also happen if you pass in numColumns < 1.

Write React-Native apps in 2017 style with MobX, This time I wanted to show the usage of MobX, which is pretty simple to develop. Getting started. Init React-Native app with -rc version which includes FlatList: 1. react-native init —-version=”0.43.0-rc.1” MobXApp I like to use one index.js file for both platforms, so we can remove all code from  Q&A for computer enthusiasts and power users. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.


Invariant Violation tried to get frame out of range index NaN, Invariant Violation tried to get frame out of range index NaN - firebase. I am running an react-native chat app example from Even Bacon and run into frame out of range NaN error: Here is package.json: "firebase": "^5.8.0", "react": "16.6.3", mainContainer}> <FlatList data={recetteData} keyExtractor={(item) => item.id. This release fixes shadow issues that were happening on Android as well as improves StatusBar API to better support iOS 13 dark mode. Unfortunately, it re-introduces an issue with