Closed tido64 closed 9 months ago
cc @cortinico
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
@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?
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.
I tried switching to using
DefaultReactNativeHost
instead to see if it's any better. I am now getting astd::exception
ininstallFabricUIManager
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 😄
Description
Nightly build of Android + New Arch fails with
assertion "isHostObject<T>(runtime)" failed
on startup.Steps to reproduce
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
Stacktrace or Logs
Reproducer
https://github.com/microsoft/react-native-test-app
Screenshots and Videos
No response