react-native icon indicating copy to clipboard operation
react-native copied to clipboard

ListMetricsAggregator must be notified of list content layout before resolving offsets

Open egealpay opened this issue 1 year ago • 22 comments

Description

We are receiving this crash on Android devices, observed it on Firebase Crashlytics but It does not contain any logs. We could not reproduced this crash and would not find any similar bug.

Steps to reproduce

React Native Version

0.74.5

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.3.1
  CPU: (8) arm64 Apple M3
  Memory: 49.61 MB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 18.19.1
    path: ~/.nvm/versions/node/v18.19.1/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.19.1/bin/yarn
  npm:
    version: 10.2.4
    path: ~/.nvm/versions/node/v18.19.1/bin/npm
  Watchman:
    version: 2024.07.29.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/alpaye/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11330709
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.8
    path: /Users/alpaye/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

Fatal Exception: com.facebook.react.common.JavascriptException: Invariant Violation: ListMetricsAggregator must be notified of list content layout before resolving offsets, js engine: hermes, stack:
invariant@1:139225
flowRelativeOffset@1:605334
notifyCellLayout@1:604441
anonymous@1:587750
anonymous@1:611095
invokeGuardedCallbackImpl@1:409136
invokeGuardedCallback@1:409193
invokeGuardedCallbackAndCatchFirstError@1:409225
executeDispatch@1:409354
executeDispatchesAndReleaseTopLevel@1:412758
forEachAccumulated@1:410830
anonymous@1:413121
batchedUpdatesImpl@1:481191
batchedUpdates$1@1:412674
_receiveRootNodeIDEvent@1:412959
receiveEvent@1:475781
__callFunction@1:134915
anonymous@1:133217
__guard@1:134175
callFunctionReturnFlushedQueue@1:133175

       at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:65)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
       at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:146)
       at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
       at android.os.Handler.handleCallback(Handler.java:958)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
       at android.os.Looper.loopOnce(Looper.java:230)
       at android.os.Looper.loop(Looper.java:319)
       at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:233)
       at java.lang.Thread.run(Thread.java:1012)

Reproducer

Screenshots and Videos

No response

egealpay avatar Oct 22 '24 08:10 egealpay

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.74.6. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

react-native-bot avatar Oct 22 '24 08:10 react-native-bot

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

react-native-bot avatar Oct 22 '24 08:10 react-native-bot

:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

react-native-bot avatar Oct 22 '24 08:10 react-native-bot

:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:

react-native-bot avatar Oct 22 '24 08:10 react-native-bot

anyone?

egealpay avatar Oct 24 '24 06:10 egealpay

anyone ???

hazemmuuhammed avatar Oct 29 '24 12:10 hazemmuuhammed

We could not reproduced this crash and would not find any similar bug.

@egealpay we can't help you without a way to reproduce this crash

cortinico avatar Oct 29 '24 15:10 cortinico

I have the same problem as well. please help

MrKarimi9425 avatar Oct 30 '24 08:10 MrKarimi9425

I’m experiencing the same issue. Could you please assist?

UnicodeTech-PVT avatar Nov 01 '24 14:11 UnicodeTech-PVT

I know this isn’t the best solution, but for now, I added comments to the following in node_modules > @react-native > virtualized-lists > Lists > ListMetricsAggregator.

Specifically, I looked for the flowRelativeOffset function at line 247 and commented out the three lines below it. This allowed the code to run without any crashes.

image

iYahya avatar Nov 07 '24 08:11 iYahya

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Dec 02 '24 05:12 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Dec 26 '24 05:12 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Jan 19 '25 05:01 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Jan 19 '25 05:01 react-native-bot

Did any one fix it?

nmiz1987 avatar Feb 02 '25 12:02 nmiz1987

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Feb 27 '25 05:02 react-native-bot

Hi! We also experienced this issue. Encountered on Android 12, 13, and 14. Is there already a fix for this? Thank you!

louie-pangan avatar Mar 17 '25 05:03 louie-pangan

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Apr 10 '25 05:04 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Apr 10 '25 05:04 react-native-bot

i'm facing same issue,

it happen when the app is RTL and we render FlatList inside FlatList

react-native: 0.74.2

mhsfh avatar Apr 27 '25 17:04 mhsfh

same with RTL app

Thomaskhalil avatar Apr 28 '25 23:04 Thomaskhalil

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar May 23 '25 05:05 react-native-bot

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.

react-native-bot avatar Jun 16 '25 05:06 react-native-bot

This issue was closed because the author hasn't provided the requested feedback after 7 days.

react-native-bot avatar Jun 23 '25 05:06 react-native-bot

same issue , anyone able to solve this ?

Nader-CS avatar Jul 21 '25 13:07 Nader-CS

Same issue happening in android devices, any update?

sarahhhanafy avatar Jul 27 '25 10:07 sarahhhanafy

any update on this workaround?

zymawy avatar Nov 29 '25 03:11 zymawy