react / react/react-native

Getting production crash on 0.83,Fatal Exception: java.lang.IllegalStateException addViewAt: failed to insert view [288] into parent [290] at index 0

Đang mở
#57,017 14 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Needs: Attention Needs: Repro Needs: Version Info
Ngôn ngữ chính
C++
Star
127k
Fork
25.3k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
4

Mô tả

Description

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [288] into parent [290] at index 0

Steps to reproduce

crash on everywhere on production app

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [288] into parent [290] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [9134] into parent [9136] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [7394] into parent [7396] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [8126] into parent [8128] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [8528] into parent [8530] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [288] into parent [290] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [9636] into parent [9638] at index 0

Fatal Exception: java.lang.IllegalStateException
addViewAt: failed to insert view [21668] into parent [21670] at index 0

React Native Version

0.83

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 26.4.1
  CPU: (8) arm64 Apple M1 Pro
  Memory: 96.55 MB / 16.00 GB
  Shell:
    version: 3.2.57
    path: /bin/bash
Binaries:
  Node:
    version: 24.6.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 11.5.1
    path: /opt/homebrew/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.4
      - iOS 26.4
      - macOS 26.4
      - tvOS 26.4
      - visionOS 26.4
      - watchOS 26.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.1 AI-251.27812.49.2514.14217341
  Xcode:
    version: 26.4.1/17E202
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 18.0.1
    wanted: ^18.0.0
  react:
    installed: 19.2.0
    wanted: 19.2.0
  react-native:
    installed: 0.83.9
    wanted: ^0.83.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
# Crashlytics - 
# Application: com.medikabazaar.app
# Platform: android
# Version: 4.4.8 (40081)
# Issue: 9d403b57a0c545d05b17ace7c6a5ede5
# Session: 6A1CF19E030A000172B37ED8F9123701_DNE_0_v2
# Date: Mon Jun 01 2026 15:29:16 GMT+0530 (India Standard Time)

Fatal Exception: java.lang.IllegalStateException: addViewAt: failed to insert view [288] into parent [290] at index 0
       at com.facebook.react.fabric.mounting.SurfaceMountingManager.addViewAt(SurfaceMountingManager.java:426)
       at com.facebook.react.fabric.mounting.mountitems.IntBufferBatchMountItem.execute(IntBufferBatchMountItem.kt:122)
       at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.kt:340)
       at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.kt:246)
       at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.kt:93)
       at
MANDATORY Reproducer

https://github.com/mksmanish

Screenshots and Videos

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu từ điểm vào của Android stack trace trong com.facebook.react.fabric.mounting.SurfaceMountingManager.java, sau đó đọc IntBufferBatchMountItem.kt và MountItemDispatcher.kt. Sử dụng lỗi Crashlytics được cung cấp và tìm một kịch bản ứng dụng có thể tái hiện; được xem là hoàn tất khi crash trên production được tái hiện, nguyên nhân được xác định và lỗi không còn xảy ra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, react-native
Lĩnh vực
mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.