facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.17k stars 24.32k forks source link

Android: assertion "isHostObject<T>(runtime)" failed on nightly #42244

Closed tido64 closed 9 months ago

tido64 commented 10 months ago

Description

Nightly build of Android + New Arch fails with assertion "isHostObject<T>(runtime)" failed on startup.

Steps to reproduce

git clone https://github.com/microsoft/react-native-test-app.git
cd react-native-test-app
git checkout tido/android-new-arch-repro
yarn
cd example
yarn android

# In a separate terminal
yarn start

When the app is launched, tap on "App".

React Native Version

0.74.0-nightly-20240110-822bf52c2

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (10) arm64 Apple M1 Max
  Memory: 1.50 GB / 64.00 GB
  Shell:
    version: 3.7.0
    path: /opt/homebrew/bin/fish
Binaries:
  Node:
    version: 20.10.0
    path: ~/.local/bin/node
  Yarn:
    version: 4.0.2
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.2.3
    path: ~/.local/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.2
    path: /Users/tido/.gem/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.0
      - iOS 17.0
      - macOS 14.0
      - tvOS 17.0
      - watchOS 10.0
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
    Build Tools:
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.0.1/15A507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.9
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 13.0.0
    wanted: 13.0.0
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.0-nightly-20240110-822bf52c2
    wanted: 0.74.0-nightly-20240110-822bf52c2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

2024-01-11 15:10:42.118  4836-4836  System.out              com.microsoft.reacttestapp           I  Debugger has connected
2024-01-11 15:10:42.118  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:42.320  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:42.521  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:42.725  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:42.925  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:43.127  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:43.331  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:43.534  4836-4836  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-11 15:10:43.736  4836-4836  System.out              com.microsoft.reacttestapp           I  debugger has settled (1452)
2024-01-11 15:10:43.752  4836-4836  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/app/~~NAugeUqHzuBqQ56kamTx_g==/com.microsoft.reacttestapp-hnUcqKJ6vSr-U7F04Dzv4w==/base.dm': No such file or directory
2024-01-11 15:10:43.752  4836-4836  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/app/~~NAugeUqHzuBqQ56kamTx_g==/com.microsoft.reacttestapp-hnUcqKJ6vSr-U7F04Dzv4w==/base.dm': No such file or directory
2024-01-11 15:10:43.884  4836-4836  nativeloader            com.microsoft.reacttestapp           D  Configuring classloader-namespace for other apk /data/app/~~NAugeUqHzuBqQ56kamTx_g==/com.microsoft.reacttestapp-hnUcqKJ6vSr-U7F04Dzv4w==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~NAugeUqHzuBqQ56kamTx_g==/com.microsoft.reacttestapp-hnUcqKJ6vSr-U7F04Dzv4w==/lib/arm64:/data/app/~~NAugeUqHzuBqQ56kamTx_g==/com.microsoft.reacttestapp-hnUcqKJ6vSr-U7F04Dzv4w==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.microsoft.reacttestapp
2024-01-11 15:10:43.929  4836-4836  GraphicsEnvironment     com.microsoft.reacttestapp           V  ANGLE Developer option for 'com.microsoft.reacttestapp' set to: 'default'
2024-01-11 15:10:43.929  4836-4836  GraphicsEnvironment     com.microsoft.reacttestapp           V  ANGLE GameManagerService for com.microsoft.reacttestapp: false
2024-01-11 15:10:43.929  4836-4836  GraphicsEnvironment     com.microsoft.reacttestapp           V  Neither updatable production driver nor prerelease driver is supported.
2024-01-11 15:10:43.931  4836-4836  NetworkSecurityConfig   com.microsoft.reacttestapp           D  No Network Security Config specified, using platform default
2024-01-11 15:10:43.931  4836-4836  NetworkSecurityConfig   com.microsoft.reacttestapp           D  No Network Security Config specified, using platform default
2024-01-11 15:10:43.945  4836-4836  SoLoader                com.microsoft.reacttestapp           V  Init System Loader delegate
2024-01-11 15:10:44.349  4836-4932  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libEGL_emulation.so
2024-01-11 15:10:44.385  4836-4932  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2024-01-11 15:10:44.401  4836-4927  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(79) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:10:44.401  4836-4928  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(82) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:10:44.401  4836-4931  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(86) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:10:44.425  4836-4932  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libGLESv2_emulation.so
2024-01-11 15:10:44.436  4836-4836  AppCompatDelegate       com.microsoft.reacttestapp           D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2024-01-11 15:10:44.460  4836-4836  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2024-01-11 15:10:44.460  4836-4836  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2024-01-11 15:10:44.489  4836-4836  Compatibil...geReporter com.microsoft.reacttestapp           D  Compat change id reported: 210923482; UID 10172; state: ENABLED
2024-01-11 15:10:44.529  4836-4836  unknown:ReactNative     com.microsoft.reacttestapp           W  Packager connection already open, nooping.
2024-01-11 15:10:44.540  4836-4929  HostConnection          com.microsoft.reacttestapp           D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-01-11 15:10:44.542  4836-4836  ThemeUtils              com.microsoft.reacttestapp           E  View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2024-01-11 15:10:44.542  4836-4929  OpenGLRenderer          com.microsoft.reacttestapp           W  Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2024-01-11 15:10:44.543  4836-4929  OpenGLRenderer          com.microsoft.reacttestapp           W  Failed to initialize 101010-2 format, error = EGL_SUCCESS
2024-01-11 15:10:44.543  4836-4836  ThemeUtils              com.microsoft.reacttestapp           E  View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2024-01-11 15:10:44.544  4836-4929  EGL_emulation           com.microsoft.reacttestapp           D  eglCreateContext: 0xb400006e36b50510: maj 3 min 0 rcv 3
2024-01-11 15:10:44.545  4836-4929  EGL_emulation           com.microsoft.reacttestapp           D  eglMakeCurrent: 0xb400006e36b50510: ver 3 0 (tinfo 0x705a07f080) (first time)
2024-01-11 15:10:44.555  4836-4929  Gralloc4                com.microsoft.reacttestapp           I  mapper 4.x is not supported
2024-01-11 15:10:44.557  4836-4929  Gralloc4                com.microsoft.reacttestapp           W  allocator 4.x is not supported
2024-01-11 15:10:44.561  4836-4929  HostConnection          com.microsoft.reacttestapp           D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-01-11 15:10:44.594  4836-4929  Parcel                  com.microsoft.reacttestapp           W  Expecting binder but got null!
2024-01-11 15:10:44.613  4836-4929  Parcel                  com.microsoft.reacttestapp           W  Expecting binder but got null!
2024-01-11 15:10:45.264  4836-4950  ReactNativeJNI          com.microsoft.reacttestapp           W  InspectorFlags::getEnableModernCDPRegistry was called before init
2024-01-11 15:10:46.058  4836-4836  unknown:ReactNative     com.microsoft.reacttestapp           W  Packager connection already open, nooping.
2024-01-11 15:10:46.207  4836-4951  WebViewFactory          com.microsoft.reacttestapp           I  Loading com.google.android.webview version 103.0.5060.71 (code 506007134)
2024-01-11 15:10:46.245  4836-4951  nativeloader            com.microsoft.reacttestapp           D  Configuring classloader-namespace for other apk /data/app/~~47FtKVFwlc8n4EGHcOriGg==/com.google.android.trichromelibrary_506007134-NKGW9tAa7cmhSJ0c-1r3SQ==/TrichromeLibrary.apk. target_sdk_version=33, uses_libraries=ALL, library_path=/data/app/~~yHKjiTHntsh1KwMPy4WP6A==/com.google.android.webview-T4BeHfJbMUojrVcjaPQEJA==/lib/arm64:/data/app/~~yHKjiTHntsh1KwMPy4WP6A==/com.google.android.webview-T4BeHfJbMUojrVcjaPQEJA==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~47FtKVFwlc8n4EGHcOriGg==/com.google.android.trichromelibrary_506007134-NKGW9tAa7cmhSJ0c-1r3SQ==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
2024-01-11 15:10:46.288  4836-4951  nativeloader            com.microsoft.reacttestapp           D  Configuring classloader-namespace for other apk /data/app/~~yHKjiTHntsh1KwMPy4WP6A==/com.google.android.webview-T4BeHfJbMUojrVcjaPQEJA==/WebViewGoogle.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~yHKjiTHntsh1KwMPy4WP6A==/com.google.android.webview-T4BeHfJbMUojrVcjaPQEJA==/lib/arm64:/data/app/~~yHKjiTHntsh1KwMPy4WP6A==/com.google.android.webview-T4BeHfJbMUojrVcjaPQEJA==/WebViewGoogle.apk!/lib/arm64-v8a:/data/app/~~47FtKVFwlc8n4EGHcOriGg==/com.google.android.trichromelibrary_506007134-NKGW9tAa7cmhSJ0c-1r3SQ==/TrichromeLibrary.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand
2024-01-11 15:10:46.331  4836-4951  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (unsupported, reflection, allowed)
2024-01-11 15:10:46.331  4836-4951  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (unsupported, reflection, allowed)
2024-01-11 15:10:46.331  4836-4951  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (unsupported, reflection, allowed)
2024-01-11 15:10:46.331  4836-4951  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2024-01-11 15:10:46.331  4836-4951  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (unsupported, reflection, allowed)
2024-01-11 15:10:46.334  4836-4951  cr_WVCFactoryProvider   com.microsoft.reacttestapp           I  Loaded version=103.0.5060.71 minSdkVersion=29 isBundle=false multiprocess=true packageId=2
2024-01-11 15:10:46.341  4836-4957  cr_VariationsUtils      com.microsoft.reacttestapp           I  Failed reading seed file "/data/user/0/com.microsoft.reacttestapp/app_webview/variations_seed_new"
2024-01-11 15:10:46.341  4836-4957  cr_VariationsUtils      com.microsoft.reacttestapp           I  Failed reading seed file "/data/user/0/com.microsoft.reacttestapp/app_webview/variations_seed"
2024-01-11 15:10:46.345  4836-4951  cr_LibraryLoader        com.microsoft.reacttestapp           I  Successfully loaded native library
2024-01-11 15:10:46.345  4836-4951  cr_CachingUmaRecorder   com.microsoft.reacttestapp           I  Flushed 8 samples from 8 histograms.
2024-01-11 15:10:46.349  4836-4960  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(141) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:10:46.353  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.debuggingoverlay.DebuggingOverlayManager
2024-01-11 15:10:46.356  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
2024-01-11 15:10:46.358  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.drawer.ReactDrawerLayoutManager
2024-01-11 15:10:46.359  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollViewManager
2024-01-11 15:10:46.360  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.scroll.ReactHorizontalScrollContainerViewManager
2024-01-11 15:10:46.361  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.progressbar.ReactProgressBarViewManager
2024-01-11 15:10:46.362  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.progressbar.ProgressBarShadowNode
2024-01-11 15:10:46.362  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.scroll.ReactScrollViewManager
2024-01-11 15:10:46.364  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager
2024-01-11 15:10:46.365  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.switchview.ReactSwitchManager$ReactSwitchShadowNode
2024-01-11 15:10:46.365  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.swiperefresh.SwipeRefreshLayoutManager
2024-01-11 15:10:46.366  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageViewManager
2024-01-11 15:10:46.367  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.frescosupport.FrescoBasedReactTextInlineImageShadowNode
2024-01-11 15:10:46.368  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.image.ReactImageManager
2024-01-11 15:10:46.369  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.modal.ReactModalHostManager
2024-01-11 15:10:46.370  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.modal.ModalHostShadowNode
2024-01-11 15:10:46.370  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactRawTextManager
2024-01-11 15:10:46.371  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactRawTextShadowNode
2024-01-11 15:10:46.371  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputManager
2024-01-11 15:10:46.373  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.textinput.ReactTextInputShadowNode
2024-01-11 15:10:46.375  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactTextViewManager
2024-01-11 15:10:46.375  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactTextShadowNode
2024-01-11 15:10:46.376  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.view.ReactViewManager
2024-01-11 15:10:46.377  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextViewManager
2024-01-11 15:10:46.378  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.text.ReactVirtualTextShadowNode
2024-01-11 15:10:46.378  4836-4950  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.views.unimplementedview.ReactUnimplementedViewManager
2024-01-11 15:10:46.451  4836-4962  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(141) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:10:49.553  4836-4848  System                  com.microsoft.reacttestapp           W  A resource failed to call close. 
2024-01-11 15:11:08.934  4836-4929  EGL_emulation           com.microsoft.reacttestapp           D  app_time_stats: avg=2423.32ms min=0.86ms max=24158.42ms count=10
2024-01-11 15:11:08.984  4836-4974  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(116) with statsTag=0xffffffff, statsUid=-1
2024-01-11 15:11:08.987  4836-4950  ReactNativeJS           com.microsoft.reacttestapp           I  Running "Example" with {"rootTag":11,"initialProps":{"concurrentRoot":true},"fabric":true}
2024-01-11 15:11:08.993  4836-4836  unknown:Vi...rtyUpdater com.microsoft.reacttestapp           W  Could not find generated setter for class com.facebook.react.uimanager.RootViewManager
2024-01-11 15:11:09.000  4836-4929  Parcel                  com.microsoft.reacttestapp           W  Expecting binder but got null!
2024-01-11 15:11:09.123  4836-4950  libc                    com.microsoft.reacttestapp           A  /root/react-native/packages/react-native/ReactCommon/jsi/jsi/jsi-inl.h:187: std::shared_ptr<T> facebook::jsi::Object::getHostObject(Runtime &) const [T = facebook::react::RuntimeSchedulerBinding]: assertion "isHostObject<T>(runtime)" failed

Reproducer

https://github.com/microsoft/react-native-test-app

Screenshots and Videos

No response

tido64 commented 10 months ago

cc @cortinico

github-actions[bot] commented 10 months ago
: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.
cortinico commented 10 months ago

@tido64 I've looked into this, the issue reproduces but RNTA is really complex and I can't tell you exactly if this is a problem on your end or if this is a problem on React Native's end.

As this happens on a nightly, are you able to bisect which nightly made this crash start?

tido64 commented 10 months ago

I tried switching to using DefaultReactNativeHost instead to see if it's any better. I am now getting a std::exception in installFabricUIManager instead:

2024-01-15 15:04:20.817  5610-5610  ActivityThread          com.microsoft.reacttestapp           W  Application com.microsoft.reacttestapp is waiting for the debugger on port 8100...
2024-01-15 15:04:20.817  5610-5610  System.out              com.microsoft.reacttestapp           I  Sending WAIT chunk
2024-01-15 15:04:22.105   440-440   adbd                    adbd                                 E  failed to connect to socket 'localabstract:/com.microsoft.reacttestapp-0/platform-1705327461206.sock': could not connect to localabstract address 'localabstract:/com.microsoft.reacttestapp-0/platform-1705327461206.sock'
2024-01-15 15:04:24.182  5610-5610  System.out              com.microsoft.reacttestapp           I  Debugger has connected
2024-01-15 15:04:24.182  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:24.388  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:24.591  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:24.797  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:24.997  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:25.201  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:25.402  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:25.603  5610-5610  System.out              com.microsoft.reacttestapp           I  waiting for debugger to settle...
2024-01-15 15:04:25.804  5610-5610  System.out              com.microsoft.reacttestapp           I  debugger has settled (1448)
2024-01-15 15:04:25.807  5610-5610  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/data/com.microsoft.reacttestapp/code_cache/.overlay/base.apk/classes11.dm': No such file or directory
2024-01-15 15:04:25.807  5610-5610  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/data/com.microsoft.reacttestapp/code_cache/.overlay/base.apk/classes12.dm': No such file or directory
2024-01-15 15:04:25.807  5610-5610  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/app/~~RESV-203TbttNt37MhFJDw==/com.microsoft.reacttestapp-b3TP7FKzdNwryjZt40CIIQ==/base.dm': No such file or directory
2024-01-15 15:04:25.807  5610-5610  ziparchive              com.microsoft.reacttestapp           W  Unable to open '/data/app/~~RESV-203TbttNt37MhFJDw==/com.microsoft.reacttestapp-b3TP7FKzdNwryjZt40CIIQ==/base.dm': No such file or directory
2024-01-15 15:04:25.928  5610-5610  nativeloader            com.microsoft.reacttestapp           D  Configuring classloader-namespace for other apk /data/app/~~RESV-203TbttNt37MhFJDw==/com.microsoft.reacttestapp-b3TP7FKzdNwryjZt40CIIQ==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~RESV-203TbttNt37MhFJDw==/com.microsoft.reacttestapp-b3TP7FKzdNwryjZt40CIIQ==/lib/arm64:/data/app/~~RESV-203TbttNt37MhFJDw==/com.microsoft.reacttestapp-b3TP7FKzdNwryjZt40CIIQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.microsoft.reacttestapp
2024-01-15 15:04:25.964  5610-5610  GraphicsEnvironment     com.microsoft.reacttestapp           V  ANGLE Developer option for 'com.microsoft.reacttestapp' set to: 'default'
2024-01-15 15:04:25.964  5610-5610  GraphicsEnvironment     com.microsoft.reacttestapp           V  ANGLE GameManagerService for com.microsoft.reacttestapp: false
2024-01-15 15:04:25.964  5610-5610  GraphicsEnvironment     com.microsoft.reacttestapp           V  Neither updatable production driver nor prerelease driver is supported.
2024-01-15 15:04:25.966  5610-5610  NetworkSecurityConfig   com.microsoft.reacttestapp           D  No Network Security Config specified, using platform default
2024-01-15 15:04:25.966  5610-5610  NetworkSecurityConfig   com.microsoft.reacttestapp           D  No Network Security Config specified, using platform default
2024-01-15 15:04:25.989  5610-5610  SoLoader                com.microsoft.reacttestapp           V  Init System Loader delegate
2024-01-15 15:04:27.540  5610-5688  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(83) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:27.540  5610-5689  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(84) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:27.541  5610-5687  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(85) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:27.543  5610-5689  unknown:In...Connection com.microsoft.reacttestapp           W  Couldn't connect to packager, will silently retry
2024-01-15 15:04:27.592  5610-5692  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libEGL_emulation.so
2024-01-15 15:04:27.592  5610-5687  unknown:ReactNative     com.microsoft.reacttestapp           W  The packager does not seem to be running as we got an IOException requesting its status: Failed to connect to /10.0.2.2:8081
2024-01-15 15:04:27.593  5610-5688  unknown:Re...gWebSocket com.microsoft.reacttestapp           W  Couldn't connect to "ws://10.0.2.2:8081/message?device=sdk_gphone64_arm64%20-%2013%20-%20API%2033&app=com.microsoft.reacttestapp&clientid=BridgeDevSupportManager", will silently retry
2024-01-15 15:04:27.624  5610-5692  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2024-01-15 15:04:27.672  5610-5610  AppCompatDelegate       com.microsoft.reacttestapp           D  Checking for metadata for AppLocalesMetadataHolderService : Service not found
2024-01-15 15:04:27.674  5610-5692  libEGL                  com.microsoft.reacttestapp           D  loaded /vendor/lib64/egl/libGLESv2_emulation.so
2024-01-15 15:04:27.695  5610-5610  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2024-01-15 15:04:27.695  5610-5610  ft.reacttestapp         com.microsoft.reacttestapp           W  Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2024-01-15 15:04:27.721  5610-5610  Compatibil...geReporter com.microsoft.reacttestapp           D  Compat change id reported: 210923482; UID 10172; state: ENABLED
2024-01-15 15:04:27.775  5610-5610  unknown:ReactNative     com.microsoft.reacttestapp           W  Packager connection already open, nooping.
2024-01-15 15:04:27.817  5610-5690  HostConnection          com.microsoft.reacttestapp           D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-01-15 15:04:27.819  5610-5690  OpenGLRenderer          com.microsoft.reacttestapp           W  Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2024-01-15 15:04:27.819  5610-5690  OpenGLRenderer          com.microsoft.reacttestapp           W  Failed to initialize 101010-2 format, error = EGL_SUCCESS
2024-01-15 15:04:27.820  5610-5697  ReactNativeJNI          com.microsoft.reacttestapp           W  InspectorFlags::getEnableModernCDPRegistry was called before init
2024-01-15 15:04:27.823  5610-5690  EGL_emulation           com.microsoft.reacttestapp           D  eglCreateContext: 0xb4000077b99feed0: maj 3 min 0 rcv 3
2024-01-15 15:04:27.824  5610-5690  EGL_emulation           com.microsoft.reacttestapp           D  eglMakeCurrent: 0xb4000077b99feed0: ver 3 0 (tinfo 0x79e33cd080) (first time)
2024-01-15 15:04:27.833  5610-5690  Gralloc4                com.microsoft.reacttestapp           I  mapper 4.x is not supported
2024-01-15 15:04:27.834  5610-5690  Gralloc4                com.microsoft.reacttestapp           W  allocator 4.x is not supported
2024-01-15 15:04:27.838  5610-5610  ThemeUtils              com.microsoft.reacttestapp           E  View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2024-01-15 15:04:27.838  5610-5690  HostConnection          com.microsoft.reacttestapp           D  HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_vulkan_async_qsri ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2024-01-15 15:04:27.840  5610-5610  ThemeUtils              com.microsoft.reacttestapp           E  View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant).
2024-01-15 15:04:27.882  5610-5690  Parcel                  com.microsoft.reacttestapp           W  Expecting binder but got null!
2024-01-15 15:04:27.916  5610-5695  ReactNativeJNI          com.microsoft.reacttestapp           W  UIManager::~UIManager() was called (address: 0xb400007819a0c6b0).
2024-01-15 15:04:27.917  5610-5695  unknown:ReactNative     com.microsoft.reacttestapp           E  Exception in native call
                                                                                                    com.facebook.jni.CppException: std::exception
                                                                                                        at com.facebook.react.fabric.BindingImpl.installFabricUIManager(Native Method)
                                                                                                        at com.facebook.react.fabric.BindingImpl.register(BindingImpl.java:99)
                                                                                                        at com.facebook.react.fabric.FabricUIManagerProviderImpl.createUIManager(FabricUIManagerProviderImpl.java:52)
                                                                                                        at com.facebook.react.defaults.DefaultReactNativeHost.getUIManagerProvider$lambda$0(DefaultReactNativeHost.kt:58)
                                                                                                        at com.facebook.react.defaults.DefaultReactNativeHost.$r8$lambda$2VfogkR5HlwUbg2OQzsEtshFrKA(Unknown Source:0)
                                                                                                        at com.facebook.react.defaults.DefaultReactNativeHost$$ExternalSyntheticLambda0.createUIManager(Unknown Source:2)
                                                                                                        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1400)
                                                                                                        at com.facebook.react.ReactInstanceManager.lambda$runCreateReactContextOnNewThread$2(ReactInstanceManager.java:1118)
                                                                                                        at com.facebook.react.ReactInstanceManager.$r8$lambda$AwGS8CysOZmWJw3kRVARHQvw9Ew(Unknown Source:0)
                                                                                                        at com.facebook.react.ReactInstanceManager$$ExternalSyntheticLambda5.run(Unknown Source:4)
                                                                                                        at java.lang.Thread.run(Thread.java:1012)
2024-01-15 15:04:27.927  5610-5610  Compatibil...geReporter com.microsoft.reacttestapp           D  Compat change id reported: 171228096; UID 10172; state: ENABLED
2024-01-15 15:04:27.993  5610-5690  Parcel                  com.microsoft.reacttestapp           W  Expecting binder but got null!
2024-01-15 15:04:29.555  5610-5689  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(99) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:29.557  5610-5690  EGL_emulation           com.microsoft.reacttestapp           D  app_time_stats: avg=123.19ms min=0.96ms max=1383.79ms count=12
2024-01-15 15:04:29.604  5610-5688  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(107) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:31.573  5610-5689  TrafficStats            com.microsoft.reacttestapp           D  tagSocket(121) with statsTag=0xffffffff, statsUid=-1
2024-01-15 15:04:31.597  5610-5622  System                  com.microsoft.reacttestapp           W  A resource failed to call close. 

I don't suppose this gives you any better sense of where something might've gone wrong? I've updated the repro in case you have time to take a look.

Screenshot_20240115_150651

tido64 commented 9 months ago

I tried switching to using DefaultReactNativeHost instead to see if it's any better. I am now getting a std::exception in installFabricUIManager instead…

I had to build React Native from source in order to debug this. Turns out it's throwing an exception on line 27 https://github.com/facebook/react-native/blob/258d8e51b451b221e557dad4647cbd210fe37392/packages/react-native/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp#L23-L30

Because we never really set DefaultComponentsRegistry::registerComponentDescriptorsFromEntryPoint in our OnLoad.cpp.

Closing this as resolved. I will follow up with a PR here to make it more obvious something is missing.

Thanks for all the help 😄