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.

[Android] VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.

See original GitHub issue

Description

After upgrading from expo SDK 39 (react native 0.63.3) to expo SDK 43 (react native 0.64.3), my nested flatList is not showing.

I have a parent vertical flatlist with an horizontal tab view child (using react-native-tab-view), and each tab view has a vertical flatlist but they are not displayed and error “VirtualizedList: Encountered an error while measuring a list’s offset from its containing VirtualizedList.” is shown. Worked fine before upgrade

Before upgrade : react-native 0.63.3, react-native-tab-view : 2.15.3 After upgrade : react-native 0.64.3, react-native-tab-view : 3.1.1

Version

0.64.3

Output of react-native info

System: OS: Windows 10 10.0.19042 CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor Memory: 6.69 GB / 15.95 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 26, 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.3, 32.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom Android NDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7784292 Visual Studio: Not Found Languages: Java: 1.8.0_312 - C:\Program Files\OpenJDK\openjdk-8u312-b07\bin\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. Create parent vertical FlatList
  2. Add horizontal ViewPagerAndroid (for tabs) using react-native-tab-view
  3. Each tab has a vertical FlatList

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
qhoaraucommented, Jan 19, 2022

Apparently it comes from react-native-tab-view migrating to ViewPager library (previously using react-native-reanimated and react-native-gesture-handler) since version 3.0.0

The only workaround I’ve found is to just downgrade react-native-tab-view to version 2.16.0

0reactions
emekaokolicommented, Nov 14, 2022

I have this issue and I am not using react-native-tab-view

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested Flat List Invariant Violation: A VirtualizedList contains a ...
Error: Invariant Violation: A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as ...
Read more >
React Native Flatlist Render Error VirtualizedList - Expo Forums
SDK Version:40.0.0 Platforms(Android/iOS/web/all): Android I am using flatlist to render post having video and text and i am getting ...
Read more >
VirtualizedList - React Native
Used to handle failures when scrolling to an index that has not been measured yet. Recommended action is to either compute your own...
Read more >
How to Fix 'VirtualizedLists should never be nested inside ...
In this article, we will explore the reasons behind this warning and provide solutions for fixing it. Virtualized lists, such as SectionList and...
Read more >
VirtualizedList-63-64 - Diff Checker
This source code is licensed under the MIT license found in the ... @platform android ... 'A VirtualizedList contains a cell which itself...
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