Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash cause:com.facebook.react.bridge.RetryableMountingLayerException: Unable to find viewState for tag #38743

Closed
LiuLeiThreestone opened this issue Aug 2, 2023 · 8 comments
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@LiuLeiThreestone
Copy link

Description

app crash while starting:
com.facebook.react.fabric.mounting.SurfaceMountingManager.getViewState (SurfaceMountingManager.java:968)
com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt (SurfaceMountingManager.java:310)
com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute (IntBufferBatchMountItem.java:153)
com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue (MountItemDispatcher.java:352)
com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems (MountItemDispatcher.java:275)
com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems (MountItemDispatcher.java:120)
com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded (FabricUIManager.java:1163)
com.facebook.react.fabric.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:31)
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:175)
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:85)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1386)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1396)
android.view.Choreographer.doCallbacks (Choreographer.java:1033)
android.view.ChoreographerExtImpl.checkScrollOptSceneEnable (ChoreographerExtImpl.java:411)
android.view.Choreographer.doFrame (Choreographer.java:900)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1371)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:240)
android.os.Looper.loop (Looper.java:351)
android.app.ActivityThread.main (ActivityThread.java:8381)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

React Native Version

0.72.0

Output of npx react-native info

System:
OS: macOS 12.3
CPU: (10) arm64 Apple M1 Pro
Memory: 103.38 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.21.3 - /opt/homebrew/opt/node@14/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 6.14.18 - /opt/homebrew/opt/node@14/bin/npm
Watchman: 2023.05.08.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 13.4/13F17a - /usr/bin/xcodebuild
Languages:
Java: 11.0.17 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.72.0 => 0.72.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Steps to reproduce

start app

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

app crash while starting:
com.facebook.react.fabric.mounting.SurfaceMountingManager.getViewState (SurfaceMountingManager.java:968)
com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt (SurfaceMountingManager.java:310)
com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute (IntBufferBatchMountItem.java:153)
com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue (MountItemDispatcher.java:352)
com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems (MountItemDispatcher.java:275)
com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems (MountItemDispatcher.java:120)
com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded (FabricUIManager.java:1163)
com.facebook.react.fabric.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:31)
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:175)
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:85)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1386)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1396)
android.view.Choreographer.doCallbacks (Choreographer.java:1033)
android.view.ChoreographerExtImpl.checkScrollOptSceneEnable (ChoreographerExtImpl.java:411)
android.view.Choreographer.doFrame (Choreographer.java:900)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1371)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:240)
android.os.Looper.loop (Looper.java:351)
android.app.ActivityThread.main (ActivityThread.java:8381)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

@LiuLeiThreestone LiuLeiThreestone added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Aug 2, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

⚠️ Newer Version of React Native is Available!
ℹ️ You are on a supported minor version, but it looks like there's a newer patch available - 0.72.3. 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.

@github-actions github-actions bot added the Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. label Aug 2, 2023
@github-actions
Copy link

github-actions bot commented Aug 2, 2023

⚠️ Missing Reproducible Example
ℹ️ 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.

@cortinico
Copy link
Contributor

Can you share:

  1. the full crash log. What you have here is truncated
  2. a reproducer for the crash

@LiuLeiThreestone
Copy link
Author

1、the crash log are all above
2、the crash are occasional
3、i wonder know,in what case, the source code of "SurfaceMountingManager.addViewAt "and "SurfaceMountingManager.getViewState"may cause throw new RetryableMountingLayerException("Unable to find viewState for tag " + tag);
app crash while starting:
com.facebook.react.fabric.mounting.SurfaceMountingManager.getViewState (SurfaceMountingManager.java:968)
com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt (SurfaceMountingManager.java:310)
com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute (IntBufferBatchMountItem.java:153)
com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue (MountItemDispatcher.java:352)
com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems (MountItemDispatcher.java:275)
com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems (MountItemDispatcher.java:120)
com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded (FabricUIManager.java:1163)
com.facebook.react.fabric.GuardedFrameCallback.doFrame (GuardedFrameCallback.java:31)
com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:175)
com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:85)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1386)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:1396)
android.view.Choreographer.doCallbacks (Choreographer.java:1033)
android.view.ChoreographerExtImpl.checkScrollOptSceneEnable (ChoreographerExtImpl.java:411)
android.view.Choreographer.doFrame (Choreographer.java:900)
android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:1371)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:240)
android.os.Looper.loop (Looper.java:351)
android.app.ActivityThread.main (ActivityThread.java:8381)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Aug 2, 2023
@cortinico cortinico removed the Needs: Attention Issues where the author has responded to feedback. label Aug 2, 2023
@cortinico
Copy link
Contributor

Without a stable reproducer, this is practically impossible to fix

@cortinico
Copy link
Contributor

Closing as the author provided no reproducer

@hosseinmd
Copy link

I faced will this error in react-native 0.75.2. is there any update.

@cortinico
Copy link
Contributor

I faced will this error in react-native 0.75.2. is there any update.

Please create a new issue + provide a valid reproducer and we can look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

3 participants