Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[Android] Missing native component crashes Fabric instead of rendering UnimplementedNativeView

Aberta
#57,693 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Pouca atividade
Stack de tecnologia
android, cpp, kotlin, typescript
Domínio
frontend, mobile

Direção de pesquisa

Comece em ComponentDescriptorRegistry::at() e rastreie o caminho de montagem do Android por meio de SurfaceMountingManager e ViewManagerRegistry.get(). Compare o comportamento do Android com a verificação de suporte e o caminho de fallback de RCTComponentViewFactory no iOS. Use o reproducer obrigatório para verificar se um componente nativo ausente renderiza UnimplementedNativeView, mantém a surface em execução e registra o nome do componente ausente.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Needs: Triage :mag: Platform: Android Type: New Architecture
Description

On Android, mounting a Fabric component whose native ViewManager is missing from the binary throws IllegalViewOperationException and tears down the surface. On iOS the same app renders the UnimplementedNativeView placeholder and keeps running. Reproduced on RN 0.86.0 with the New Architecture on both platforms.

The cause is in ComponentDescriptorRegistry::at(): an unknown component name is assumed to be a legacy view and gets an UnstableLegacyViewManagerAutomaticComponentDescriptor. Since useFabricInterop() defaults to true, the UnimplementedNativeViewComponentDescriptor branch never runs. Nothing checks the assumption, so the failure lands at mount in SurfaceMountingManagerViewManagerRegistry.get(), which throws. Android does install the fallback, and the crash message itself lists UnimplementedNativeView among the registered ViewManagers. It's wired up and simply unreachable. iOS doesn't have this problem because RCTComponentViewFactory checks isSupported: before taking the interop path and otherwise falls through to the placeholder.

JS can't catch it earlier: under bridgeless, view configs come from static Codegen definitions and the native side is never consulted.

Any app with a library's JS installed but its native code absent hits this: a dependency added without rebuilding, or a build that predates it.

Expected: Android behaves like iOS, rendering the placeholder plus a log naming the missing component. The name matters, since today's crash at least identifies the component and a silent placeholder would hide the problem entirely.

Steps to reproduce
  1. Clone https://github.com/TaduJR/rn-repro-fabric-interop-viewmanager the entire reproducer is App.tsx, which registers a Fabric component (via NativeComponentRegistry.get, the same registration Codegen emits) under a name no native code provides. Node 24+ required (the config files are TypeScript).
  2. npm install
  3. npx react-native run-android
  4. The screen shows Fabric = true, bridgeless = true and hasViewManagerConfig(ThisNativeComponentIsNotInTheBinary) = false, confirming the component exists in no native registry.
  5. Press Mount the component.
  6. The surface crashes with IllegalViewOperationException instead of rendering the UnimplementedNativeView placeholder.
React Native Version

0.86.0

Affected Platforms

Runtime - Android, Build - MacOS

Areas

Fabric - The New Renderer, Codegen

Output of npx @react-native-community/cli info
System:
  OS: macOS 26.5.2
  CPU: (14) arm64 Apple M4 Pro
  Memory: 194.66 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.13.0
    path: /Users/natu/.nvm/versions/node/v24.13.0/bin/node
  Yarn:
    version: 1.22.22
    path: /Users/natu/.nvm/versions/node/v24.13.0/bin/yarn
  npm:
    version: 11.6.2
    path: /Users/natu/.nvm/versions/node/v24.13.0/bin/npm
  Watchman:
    version: 2026.03.16.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/natu/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.5
      - iOS 26.5
      - macOS 26.5
      - tvOS 26.5
      - visionOS 26.5
      - watchOS 26.5
  Android SDK:
    API Levels:
      - "33"
      - "34"
      - "36"
      - "36"
      - "37"
    Build Tools:
      - 35.0.0
      - 36.0.0
      - 36.1.0
      - 37.0.0
    System Images:
      - android-35 | Google Play Tablet ARM 64 v8a
      - android-36.1 | Google Play ARM 64 v8a
      - android-36 | Google Play ARM 64 v8a
      - android-36 | Pre-Release 16 KB Page Size Google Play ARM 64 v8a
      - android-37.0 | 16 KB Page Size Google Play ARM 64 v8a
      - android-37.0 | 16 KB Page Size Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2026.1 AI-261.23567.138.2611.15646644
  Xcode:
    version: 26.6/17F113
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 25.0.3
    path: /usr/bin/javac
  Ruby:
    version: 3.3.4
    path: /Users/natu/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.86.0
    wanted: 0.86.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true
Stacktrace or Logs
com.facebook.react.uimanager.IllegalViewOperationException: Can't find ViewManager 'ThisNativeComponentIsNotInTheBinary' nor 'RCTThisNativeComponentIsNotInTheBinary' in ViewManagerRegistry, existing names are: [DebuggingOverlay, RCTSafeAreaView, RCTModalHostView, AndroidProgressBar, AndroidHorizontalScrollView, RCTImageView, RCTText, AndroidHorizontalScrollContentView, UnimplementedNativeView, RCTScrollView, RCTView, AndroidDrawerLayout, AndroidSwitch, AndroidSwipeRefreshLayout, AndroidTextInput, RCTSelectableText, VirtualView]
	at com.facebook.react.uimanager.ViewManagerRegistry.get(ViewManagerRegistry.kt:72)
	at com.facebook.react.fabric.mounting.SurfaceMountingManager.createViewUnsafe(SurfaceMountingManager.kt:610)
	at com.facebook.react.fabric.mounting.SurfaceMountingManager.preallocateView(SurfaceMountingManager.kt:1104)
	at com.facebook.react.fabric.mounting.mountitems.PreAllocateViewMountItem.execute(PreAllocateViewMountItem.kt:39)
	at com.facebook.react.fabric.mounting.MountItemDispatcher.executeOrEnqueue(MountItemDispatcher.kt:379)
	at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchPreMountItemsImpl(MountItemDispatcher.kt:331)
	at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchPreMountItems(MountItemDispatcher.kt:325)
	at com.facebook.react.fabric.FabricUIManager$DispatchUIFrameCallback.doFrameGuarded(FabricUIManager.java:1623)
	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:42)
	at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:58)
	at android.view.Choreographer.doCallbacks(Choreographer.java:1252)
	at android.view.Choreographer.doFrame(Choreographer.java:1205)
	at android.os.Looper.loop(Looper.java:397)
	at android.app.ActivityThread.main(ActivityThread.java:9523)
MANDATORY Reproducer

https://github.com/TaduJR/rn-repro-fabric-interop-viewmanager

Screenshots and Videos

Android:

Image

iOS:

Image
Linguagem predominante
C++
Estrelas
127k
Forks
25.3k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de react/react-native

Todas as issues de react/react-native

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.